Skip to content

introduce rcl_lifecycle_get_transition_label_by_id().#1229

Merged
fujitatomoya merged 1 commit intorollingfrom
fujitatomoya/introduce-rcl_lifecycle_get_transition_label_by_id
May 1, 2025
Merged

introduce rcl_lifecycle_get_transition_label_by_id().#1229
fujitatomoya merged 1 commit intorollingfrom
fujitatomoya/introduce-rcl_lifecycle_get_transition_label_by_id

Conversation

@fujitatomoya
Copy link
Copy Markdown
Collaborator

part of #991

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Copy link
Copy Markdown
Collaborator Author

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally going to deprecate rcl_lifecycle_get_transition_by_id, and look up the label based on the identification and call rcl_lifecycle_get_transition_by_label only. but we cannot do that, because id and label are not mapped identically in the transition map. (there can be same label for different identification)

so what we can do here is that introduce rcl_lifecycle_get_transition_label_by_id tries to get the label based on the identification from the transition map, and we still call rcl_lifecycle_get_transition_by_id with user specified id. with this, we can at least print the label based on the id as information.

since this bothers me a bit, i just went ahead to patch it for myself.

@fujitatomoya fujitatomoya requested a review from alsora April 28, 2025 20:51
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@alsora can you review this?

@fujitatomoya fujitatomoya merged commit d290ab9 into rolling May 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants