Refactor: move Node initialization to BaseNode#5
Closed
nadavelkabets wants to merge 2 commits into
Closed
Conversation
93198c3 to
84be7f4
Compare
* Feature: BaseClock Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Fix: JumpHandle accept BaseClock, generic __repr__ Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Fix: Use BaseClock type in TimeSource, no __init__ parameters for ROSClock Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Feature: add tests Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Feature: test ros time functions when clock type is not ros time Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Fix: called a property method Co-authored-by: Michael Carroll <carroll.michael@gmail.com> Signed-off-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com> * Refactor: initial extraction of BaseNode Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Move track_node to Node.__init__() Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> * Cr: add destroy_node method to BaseNode Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> --------- Signed-off-by: Nadav Elkabets <elnadav12@gmail.com> Signed-off-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com> Co-authored-by: Michael Carroll <carroll.michael@gmail.com>
…ice to BaseNode Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
d2728d7 to
98d1e5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of ros2#1620
Changes
BaseNodeinitialization logic fromNode.__init__intoBaseNode.__init__BaseNode(create_publisher,create_subscription,create_service,_create_service) so BaseNode can construct the parameter event publisher, parameter services and type description serviceBaseNode(_create_publisher_handle,_create_subscription_handle,_create_service_handle,_create_client_handle)TimeSource,ParameterService,LoggingService,TypeDescriptionServiceretyped to acceptBaseNodeinstead ofNodeTimeSource._clock_subcleans itself up viaself._clock_sub.destroy()instead ofnode.destroy_subscription(...)to decouple fromNode's entity listsTypeDescriptionService._start_servicenow callsnode._create_service(...)instead of directly constructing aServiceTimeSource.attach_clockis called withself.get_clock()inBaseNode.__init__instead ofself._clockNode.destroy_node()no longer callsself._type_description_service.destroy()explicitly and is destroyed by the entity teardown loop in Node.destroy_node() instead