-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make the trigger of the DDS Pipe callbacks configurable #67
Conversation
cf4ca36
to
fa0397b
Compare
fa0397b
to
2bb6136
Compare
cf34e92
to
b9d2c47
Compare
76c60bb
to
076148d
Compare
Merge once the following PRs are ready: |
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
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
3d5113d
to
b92a08b
Compare
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
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 with green CI
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 change name of PR.
{ | ||
return entity.active && | ||
entity.is_reader() && | ||
is_endpoint_kind_relevant_(entity) && |
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 makes little sense to me, as this logic specific to the remove unused entities feature is not supported for a discovery trigger value other than READER
. But ok, it will need to be this way if we ever add support. However, I think it would be good to fail (add condition to some is_valid
) if an unsupported configuration is provided.
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.
Related suggestion, although does not tackle the previous comment (cannot hold it back): I suggest having an if-else with remove_unused_entities
within is_relevant
method, and return endpoint.active
when false.
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 think it is more appropriate to address that change in a new branch, since it changes the dynamic of the DdsPipe at it should be thoroughly thought about and tested. I will also take the liberty to change other things which I think would improve the DdsPipe readability.
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.
Write an error trace in is_valid
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.
"Different to" is apparently colloquial, use "from" or "than".
https://dictionary.cambridge.org/es/gramatica/gramatica-britanica/different-from-different-to-or-different-than
https://www.wordreference.com/es/translation.asp?tranword=different%20to
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
ddspipe_core/include/ddspipe_core/configuration/DdsPipeConfiguration.hpp
Outdated
Show resolved
Hide resolved
//! Possible kinds of the endpoint | ||
ENUMERATION_BUILDER( | ||
DiscoveryTrigger, | ||
READER, //! The discovery callbacks get triggered by the discovery of a reader. |
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.
Use lower case to simplify your life (and reviewer's).
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.
"Example is not another way to teach, it's the only way." — Albert Einstein
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, it wouldn't simplify anything. We would have to rename the enum and all its occurrences to avoid copying an int. And in the future to_uppercase
and to_lowercase
would return the string in uppercase or lowercase anyway.
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.
"The fool knows after he's suffered." — Hesiod
Signed-off-by: tempate <[email protected]>
Signed-off-by: tempate <[email protected]>
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
* Dynamically trigger the creation of entities Signed-off-by: tempate <[email protected]> * Rebase fix Signed-off-by: tempate <[email protected]> * Add none entity-creation-trigger Signed-off-by: tempate <[email protected]> * Avoid adding endpoints in the SchemaParticipant Signed-off-by: tempate <[email protected]> * Rename entity_creation_trigger to discovery_trigger Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Check discovery trigger in services Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> --------- Signed-off-by: tempate <[email protected]>
In the previous version, the DDS Pipe's callbacks were only triggered by the discovery of readers. In this version, the entity type that triggers the callbacks is configurable. They can be triggered by readers (by default), writers, both readers and writers, and neither readers nor writers.
Merge after: