Skip to content

Commit

Permalink
Use default alignment when loaning for request/response (ros2#76)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hoinkis <[email protected]>
  • Loading branch information
mossmaurice committed Jan 12, 2023
1 parent b186509 commit 6546111
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rmw_iceoryx_cpp/src/rmw_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ rmw_send_request(

iceoryx_client->loan(
iceoryx_client_abstraction->request_size_,
iceoryx_client_abstraction->request_alignment_)
iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT)
.and_then(
[&](void * requestPayload) {
auto requestHeader = iox::popo::RequestHeader::fromPayload(requestPayload);
Expand Down
2 changes: 1 addition & 1 deletion rmw_iceoryx_cpp/src/rmw_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ rmw_send_response(

iceoryx_server->loan(
iceoryx_request_header, iceoryx_server_abstraction->response_size_,
iceoryx_server_abstraction->response_alignment_)
iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT)
.and_then(
[&](void * responsePayload) {
if (iceoryx_server_abstraction->is_fixed_size_) {
Expand Down
2 changes: 0 additions & 2 deletions rmw_iceoryx_cpp/src/types/iceoryx_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ struct IceoryxClient
iox::popo::UntypedClient * const iceoryx_client_;
bool is_fixed_size_;
size_t request_size_;
/// @todo How can the full type be aquired via rosidl to do an 'alignof()'?
uint32_t request_alignment_{8};
int64_t sequence_id_;
};

Expand Down
2 changes: 0 additions & 2 deletions rmw_iceoryx_cpp/src/types/iceoryx_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ struct IceoryxServer
iox::popo::UntypedServer * const iceoryx_server_;
bool is_fixed_size_;
size_t response_size_;
/// @todo Is there a way to get the aligment for a complete type via the rosidl?
uint32_t response_alignment_{8};
const void * request_payload_{nullptr};
};

Expand Down

0 comments on commit 6546111

Please sign in to comment.