-
Notifications
You must be signed in to change notification settings - Fork 421
Iox #27 client port implementation and test part 2 #863
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 client port implementation and test part 2 #863
Conversation
Codecov Report
@@ Coverage Diff @@
## master #863 +/- ##
==========================================
+ Coverage 74.79% 75.60% +0.81%
==========================================
Files 334 335 +1
Lines 12020 12215 +195
Branches 2017 2037 +20
==========================================
+ Hits 8990 9235 +245
+ Misses 2255 2195 -60
- Partials 775 785 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
b024697
to
06bab82
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.
@budrus @elfenpiff @MatthiasKillat what do you think about this ideas?
@Indra5196 please also have a look at the additions to the design document
@@ -110,6 +110,21 @@ A client can ask a server to block if its response queue is full. | |||
The server will obey if the corresponding `clientTooSlowPolicy` is set to `ConsumerTooSlowPolicy::WAIT_FOR_CONSUMER`. | |||
If the options don't match, the client will not be connected to the server, similar to the behavior of publisher and subscriber. | |||
|
|||
#### Client Service Discovery |
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.
To view this with rendered diagrams use the three dots on the right and select View file
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
2621221
to
d16c368
Compare
doc/design/diagrams/request_response/client_and_server_service_discovery.puml
Outdated
Show resolved
Hide resolved
return "MESSGAGE_TYPE_END"; | ||
} | ||
|
||
return "UNKNOWN_TYPE"; |
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.
Please move this into the switch case as default
and you will earn a MISRA badge ;)
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.
Moving this into default would mean we might miss a new message added to the enum. Without a default
case, the compiler will complain. There is still the return after the switch, in order to catch errors when a dummy enum value was provided. In this case, it's clear that MISRA is for C type enums and not enum class
from C++
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.
Ok, can you please double check the Axivion scan with our custom AUTOSAR ruleset?
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.
ahem, let's assume I'm a new contributor ... how would I do that?
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.
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.
You can find the config files with all the rules in here
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.
@mossmaurice according to dkroenke the dashboard currently only works with the master branch. We currently use this pattern (no default but return statement) in several places already, e.g. https://github.com/eclipse-iceoryx/iceoryx/blob/master/iceoryx_posh/source/popo/trigger.cpp#L32-L41.
Furthermore it is semantically the same as with the default
case when all enum
tags are handled and compiles down to the exact same assembly with the benefit of a compile time error instead of a silent fallback to default
when the enum
is extended.
Assuming our current rule set doesn't allow this, we need to change it anyway since it doesn't make sense and results in bad code where errors need to be catched by tests instead of the compiler.
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_roudi.hpp
Show resolved
Hide resolved
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
iceoryx_posh/include/iceoryx_posh/internal/popo/ports/client_port_roudi.hpp
Show resolved
Hide resolved
|
||
serverRequestQueue.tryPop() | ||
.and_then([&](auto& sharedChunk) { | ||
auto requestHeader = static_cast<RequestHeader*>(sharedChunk.getChunkHeader()->userHeader()); |
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.
ASSERT_NE(requestHeader, nullptr)
?
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.
Like before, ASSERT_NE
is not possible in this context. I would need to rewrite this completely if necessary
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.
Besides small nitpicks, LGTM
e2019b3
to
2af5101
Compare
Pre-Review Checklist for the PR Author
iox-#123-this-is-a-branch
)iox-#123 commit text
)git commit -s
)task-list-completed
)Notes for Reviewer
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References