-
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 #27 1 client server port interfaces #275
Iox #27 1 client server port interfaces #275
Conversation
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_roudi.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Outdated
Show resolved
Hide resolved
|
||
/// @brief check if there was a queue overflow since the last call of hasLostResponseChunks | ||
/// @return true if the underlying queue overflowed since last call of this method, otherwise false | ||
bool hasLostResponses() noexcept; |
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.
This method should be const.
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.
this will reset the flag in ChunkQueueData, and I would not make it mutable because this is a state change for the user
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_server_port_types.hpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
private: | ||
int64_t m_sequenceNumber{0}; |
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.
Why is the sequence number not an uint64_t
. Do we have negative sequence numbers?
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.
because I saw that ROS is using an int64....
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.
Maybe it's worth raising a PR in rcl? O:-) Or where did you find it?
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.
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_server_port_types.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/server_port_user.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/server_port_user.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/server_port_user.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/server_port_user.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
…clipse-iceoryx#27-1-client_server_port_interfaces
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_receiver_data.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_sender_data.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/server_port_user.hpp
Outdated
Show resolved
Hide resolved
ClientPortRouDi(ClientPortRouDi&& rhs) = default; | ||
ClientPortRouDi& operator=(ClientPortRouDi&& rhs) = default; |
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.
noexcept
missing?
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.
Good question. I saw that we normally don't have the no except keyword for the default c'tors. We didn't do that when we had the big noexcept refactoring last year. So if it shall be no except we have to change > 100 files I guess. I would do it in a separate PR if we decide to go this way
@elfenpiff @elBoberido your opinion?
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.
IMHO we should always try to be explicit as possible. Then we are aligned with MISRA and the AUTOSAR rules most of the time.
Standard says default c'tors are mostly not throwing, however, there are some exemptions http://eel.is/c++draft/except.spec#7 I'll vote for the explicit way. I'll check ISO/IEC14882:2014 (C++14)
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.
Cppref also provides a good read on this topic: https://en.cppreference.com/w/cpp/language/noexcept_spec
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.
As @mossmaurice said "c'tors are mostly not throwing", which means some still can. So it's probably good to be explicit.
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.
Will not be handled here, I added it to #130
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_roudi.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_user.hpp
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_server_port_types.hpp
Outdated
Show resolved
Hide resolved
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_server_port_types.hpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
private: | ||
int64_t m_sequenceNumber{0}; |
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.
Maybe it's worth raising a PR in rcl? O:-) Or where did you find it?
relative_ptr<ClientChunkQueueData_t> m_responseQueue; | ||
}; | ||
|
||
class ResponseHeader |
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.
Move class to its own file
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.
will do when I implement things. This was just the API so far
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.
Well, it's not a big deal to create a new file, isn't it? ;-) But no hard feelings on this, but IMHO it would be cleaner start.
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.
Sure. My intention was also to get feedback on the general interface. Maybe it would have turned out that the request and response headers are no good idea. So I wanted to save effort until it is consolidated
{ | ||
return m_chunkReceiver.get(); | ||
return m_chunkReceiver.tryGet(); |
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.
Try to get what? Bananas or apples?
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.
A chunk receiver gets chunks. somehow obvious. On the next API layer we are more precise and have allocateChunk. I was thinking about that when I implemented the ChunkReceiver. But then decided against it as I felt it is somehow redundant. The ChunkReceiver has only one job and this is receiving chunks. So I thought get() gets a chunk. Like open() for a Door class and not openDoor()
constexpr uint64_t SHARED_MEMORY_ALIGNMENT = 32u; | ||
constexpr uint32_t MAX_NUMBER_OF_MEMPOOLS = 32u; | ||
constexpr uint32_t MAX_SHM_SEGMENTS = 100u; | ||
constexpr uint64_t SHARED_MEMORY_ALIGNMENT = 32U; |
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 like capital literals. Makes it harder to confuse a "one" and a lower case L. So, that's the new style for iceoryx! 👍
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
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.
LGTM, having RPCBaseHeader
, RequestHeader
and ResponseHeader
in their own hpp and cpp would be nice. You might want to do it now or in the follow-up pull request.
Signed-off-by: Poehnl Michael (CC-AD/ESW1) <michael.poehnl@de.bosch.com>
constexpr uint32_t MAX_CLIENTS_PER_SERVER = 256U; | ||
constexpr uint32_t MAX_REQUESTS_PROCESSED_SIMULTANEOUSLY = 4U; | ||
constexpr uint32_t MAX_RESPONSES_ALLOCATED_SIMULTANEOUSLY = MAX_REQUESTS_PROCESSED_SIMULTANEOUSLY; | ||
constexpr uint32_t MAX_REQUEST_QUEUE_CAPACITY = 1024; |
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.
Missing U
Hello, We've requirement related to request/response communication and would like to know when this solution would be available? |
Thanks for asking @hemalbavishi. Top prio has the new C and C++ API for pub/sub communication. This we want to finalize in the next weeks and this is prio 1. But request/response is the next on the list. I would assume that we have a first version end of this or latest beginning of next year |
initial PR for #27, step 1 in the list