-
Notifications
You must be signed in to change notification settings - Fork 403
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
iox-eclipse-iceoryx#2040 support for iox::string in UnixDomainSocket #2122
iox-eclipse-iceoryx#2040 support for iox::string in UnixDomainSocket #2122
Conversation
c333659
to
dfba380
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2122 +/- ##
==========================================
+ Coverage 80.20% 80.22% +0.01%
==========================================
Files 419 420 +1
Lines 16276 16306 +30
Branches 2252 2257 +5
==========================================
+ Hits 13054 13081 +27
+ Misses 2424 2422 -2
- Partials 798 803 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not yet look at the tests.
Unfortunately there are some merge conflicts due to the ongoing restructuring of iceoryx hoofs. I hope they are not too severe.
Could you also refer to #1693 in the PR description.
iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/unix_domain_socket.hpp
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/unix_domain_socket.hpp
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/unix_domain_socket.hpp
Outdated
Show resolved
Hide resolved
1dbde0f
to
0f61db8
Compare
d857ba0
to
0a46ac7
Compare
@lucabart97 sorry for letting you wait so long. I was quite busy this week and will have a look at the PR tomorrow. |
@elBoberido no problem, take your time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just skimmed through the tests but with the new behavior of having buffers which are potentially smaller than the message, new tests need to check this behavior.
I think a test with a iox::string
full of e.g. a
will unveil an off by one error in the receive
method.
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
0a46ac7
to
1fb9063
Compare
I think the tests starting from this line do what do you suggest to do: |
Not quite. Currently the data array in There should be a test with a |
1fb9063
to
daa65e1
Compare
I added a test with the |
Will look at it tomorrow more closely. Just skimmed over the changes and found a small stylistic issue. For non type template parameter we usually use upper case for the name. |
daa65e1
to
14bd023
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a small nitpick and one additional tests and from my point of view this can be merged. :)
Btw, next Tuesday is the next developer meetup and the week after there is another one to introduce the Rust based iceoryx2. You are welcome to join.
iceoryx_hoofs/posix/ipc/include/iox/detail/unix_domain_socket.inl
Outdated
Show resolved
Hide resolved
By default, the UnixDomainSocket class relies on std::string objects to send and receive data, as defined by its interface. However, this approach can potentially lead to dynamic memory allocation when handling larger data payloads that exceed the stack space optimization (SSO) limit. To address this issue, an alternative API has been introduced that enables data transmission and reception using iox::string. This approach allows for direct data manipulation within stack memory, effectively eliminating the need for dynamic memory allocation. Signed-off-by: Luca Bartoli <[email protected]>
14bd023
to
641d81d
Compare
@elBoberido Sorry for the delay and thank you for the invitation, but last week I was on holiday! |
Thanks for your patience :) There is usually one meetup on the first Tuesday each month. Your welcome to join whenever it suits you :) |
By default, the UnixDomainSocket class relies on std::string objects to send and receive data, as defined by its interface. However, this approach can potentially lead to dynamic memory allocation when handling larger data payloads that exceed the stack space optimization (SSO) limit.
To address this issue, an alternative API has been introduced that enables data transmission and reception using iox::string. This approach allows for direct data manipulation within stack memory, effectively eliminating the need for dynamic memory allocation.
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References