forked from ros2/rmw_fastrtps
-
Notifications
You must be signed in to change notification settings - Fork 2
[20310] Feature: topic keys with non breaking ABI #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mario-DL
wants to merge
20
commits into
vulcanexus
Choose a base branch
from
feature/no-abi-break-keys
base: vulcanexus
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7e65f38
Add support for PKCS#11 in security files (#5)
JLBuenoLopez 989f3d6
Refs #20164: rmw_fastrtps_shared: prepare api for keys support
Mario-DL 3c39dd0
Refs #20164: rmw_fastrtps_shared: getKey() implementation
Mario-DL 80607b8
Refs #20164: rmw_fastrtps* interface methods update for keys support
Mario-DL 034792d
Refs #20164: rmw_fastrtps_cpp empty implementation
Mario-DL 94b1568
Refs #20164: rmw_fastrtps_dynamic_cpp Message & Service Typesupport c…
Mario-DL d041cdd
Refs #20164: rmw_fastrtps_dynamic_cpp type_support_proxy updates impl…
Mario-DL 82f9397
Refs #20164: rmw_fastrtps_dynamic_cpp type_support implementation
Mario-DL 1858d24
Refs #20164: Move typesupport key vars to rmw_fastrtps_shared_cpp
Mario-DL 2b9c5f6
Refs #20164: Initialize Typesupport key members in rmw_fastrtps_cpp
Mario-DL 5cdfff7
Refs #20310: rmw_fastrtps_shared_cpp: add abi_version enum and type s…
Mario-DL d74475b
Refs #20310: rmw_fastrtps_cpp: adopt abi version v2
Mario-DL 3c3801b
Refs #20310: rmw_fastrtps_dynamic_cpp: adopt abi version v2
Mario-DL 1bf49f5
Refs #20310: rmw_fastrtps_shared_cpp: apply_qos_resource_limits_for_k…
Mario-DL 6bc210f
Refs #20310: rmw_fastrtps_cpp: apply qos for keys
Mario-DL 02e367c
Refs #20310: rmw_fastrtps_dynamic_cpp: apply qos for keys
Mario-DL c2fa779
Refs #20310: Review suggestions
Mario-DL 914358a
Refs #20310: fix: include checking for the v2 identifier when trying …
Mario-DL ba0eda9
Refs #20310: rmw_fastrtps_cpp review 2 suggestion
Mario-DL 4462d31
Refs #20310: Updates according latest message_type_support structure …
Mario-DL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,11 +23,30 @@ | |||||||||
| namespace rmw_fastrtps_cpp | ||||||||||
| { | ||||||||||
|
|
||||||||||
| uint8_t get_type_support_abi_version(const char * identifier) | ||||||||||
| { | ||||||||||
| uint8_t abi_version = rmw_fastrtps_shared_cpp::TypeSupport::AbiVersion::ABI_V1; | ||||||||||
|
|
||||||||||
| if (strcmp(identifier, RMW_FASTRTPS_CPP_TYPESUPPORT_C_V2) == 0 || | ||||||||||
| strcmp(identifier, RMW_FASTRTPS_CPP_TYPESUPPORT_CPP_V2) == 0) | ||||||||||
| { | ||||||||||
| abi_version = rmw_fastrtps_shared_cpp::TypeSupport::AbiVersion::ABI_V2; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| return abi_version; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| TypeSupport::TypeSupport() | ||||||||||
| { | ||||||||||
| abi_version_ = AbiVersion::ABI_V1; | ||||||||||
| m_isGetKeyDefined = false; | ||||||||||
| max_size_bound_ = false; | ||||||||||
| is_plain_ = false; | ||||||||||
| key_is_unbounded_ = false; | ||||||||||
| key_max_serialized_size_ = 0; | ||||||||||
| members_ = nullptr; | ||||||||||
| key_callbacks_ = nullptr; | ||||||||||
| has_data_ = false; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| void TypeSupport::set_members(const message_type_support_callbacks_t * members) | ||||||||||
|
|
@@ -59,6 +78,24 @@ void TypeSupport::set_members(const message_type_support_callbacks_t * members) | |||||||||
| m_typeSize = (m_typeSize + 3) & ~3; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| void TypeSupport::set_members_v2(const message_type_support_callbacks_t * members) | ||||||||||
| { | ||||||||||
|
|
||||||||||
| set_members(members); | ||||||||||
|
|
||||||||||
| if (nullptr != members->key_callbacks) | ||||||||||
| { | ||||||||||
| key_callbacks_ = members->key_callbacks; | ||||||||||
| m_isGetKeyDefined = true; | ||||||||||
|
|
||||||||||
| key_max_serialized_size_ = key_callbacks_->max_serialized_size_key(0, key_is_unbounded_); | ||||||||||
| if (!key_is_unbounded_) | ||||||||||
| { | ||||||||||
| key_buffer_.reserve(key_max_serialized_size_); | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| size_t TypeSupport::getEstimatedSerializedSize(const void * ros_message, const void * impl) const | ||||||||||
| { | ||||||||||
| if (is_plain_) { | ||||||||||
|
|
@@ -129,14 +166,92 @@ bool TypeSupport::deserializeROSmessage( | |||||||||
| return true; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| MessageTypeSupport::MessageTypeSupport(const message_type_support_callbacks_t * members) | ||||||||||
| bool TypeSupport::get_key_hash_from_ros_message( | ||||||||||
| void * ros_message, | ||||||||||
| eprosima::fastrtps::rtps::InstanceHandle_t * ihandle, | ||||||||||
| bool force_md5, | ||||||||||
| const void * impl) const | ||||||||||
| { | ||||||||||
| assert(ros_message); | ||||||||||
| (void)impl; | ||||||||||
|
|
||||||||||
| // retrieve estimated serialized size in case key is unbounded | ||||||||||
| if (key_is_unbounded_) | ||||||||||
| { | ||||||||||
| key_max_serialized_size_ = (std::max) (key_callbacks_->get_serialized_size_key(ros_message, 0), (size_t)0); | ||||||||||
|
||||||||||
| key_max_serialized_size_ = (std::max) (key_callbacks_->get_serialized_size_key(ros_message, 0), (size_t)0); | |
| key_max_serialized_size_ = (std::max) ( | |
| key_max_serialized_size_, | |
| key_callbacks_->get_serialized_size_key(ros_message, 0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.