-
Notifications
You must be signed in to change notification settings - Fork 421
iox-#27 Add client and server port to PortPool and PortManager [stacked PR #2] #1084
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 Add client and server port to PortPool and PortManager [stacked PR #2] #1084
Conversation
6677cc1
to
c1dbf60
Compare
dd30a28
to
b17164e
Compare
c1dbf60
to
265ef74
Compare
b17164e
to
e4e90b6
Compare
265ef74
to
e35218f
Compare
e4e90b6
to
c0894b5
Compare
e35218f
to
a9ddacd
Compare
c0894b5
to
84a0fe5
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.
In my opinion we should add to every Log*
message as much information as possible since we do not know what may becomes important during debugging.
Furthermore, I would suggest to always call LogError
before calling the errorHandler to provide some context to the user. What do you think?
The rest looks fine - only minor things.
@@ -40,7 +40,7 @@ typedef struct | |||
bool offerOnCreate; | |||
|
|||
/// @brief describes whether a publisher blocks when subscriber queue is full |
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 adjust the comment.
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, the comment is stil true. It's only the data type that changed it's name, note the member
iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_enum_translation.hpp
Outdated
Show resolved
Hide resolved
// delete client port from list after DISCONNECT was processed | ||
m_portPool->removeClientPort(clientPortData); | ||
|
||
LogDebug() << "Destroyed client port"; |
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 would think it maybe helpful to add the process name and service description 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.
Unfortunately the process name is not available at this point, but I added the service description
/// @todo iox-#27 report to port introspection | ||
if (!this->sendToAllMatchingServerPorts(caproMessage, clientPort)) | ||
{ | ||
LogDebug() << "capro::CONNECT/DISCONNECT, no matching server!!"; |
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.
Could you add the process name of the port owner and the service description? This goes also for all the other log messages.
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.
same as above, the process name is not available ... or did you mean the runtime name?
3c9d622
to
1a53faa
Compare
9372d15
to
d10b138
Compare
Codecov Report
@@ Coverage Diff @@
## master #1084 +/- ##
==========================================
+ Coverage 77.23% 77.38% +0.14%
==========================================
Files 346 346
Lines 13159 13389 +230
Branches 1884 1917 +33
==========================================
+ Hits 10164 10361 +197
- Misses 2371 2395 +24
- Partials 624 633 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
34bc993
to
3738316
Compare
3738316
to
2b7e9f4
Compare
|
||
// BEGIN ClientPort tests | ||
|
||
TEST_F(PortPool_test, AddClientPortIsSuccessful) |
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'm not that happy with the naming but all tests in this file follow the same schema and this makes it easier to check if all ports have the same tests
e8a28b5
to
1f4c22b
Compare
… create a new one
a68ff3e
to
d2c13c1
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.
Please substitute elfenpiff with budrus :D
d2c13c1
to
4a550b8
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
This PR adds the client and server to the
PortPool
andPortManager
. With this changes, the discovery loop is also updated to handle the new ports and it is taken care of resource cleanup.Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References