Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented May 19, 2025

This PR introduces support for retrieving the lifecycle state machine status by adding a new "isInitialized" property.

  • Added a type test for the new boolean property in the TypeScript tests.
  • Implemented a corresponding native binding in C++ to expose the state.
  • Exposed the property via a getter in the JavaScript lifecycle module.

Fix: #1135

@minggangw minggangw requested a review from Copilot May 19, 2025 08:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for retrieving the lifecycle state machine status by adding a new "isInitialized" property.

  • Added a type test for the new boolean property in the TypeScript tests.
  • Implemented a corresponding native binding in C++ to expose the state.
  • Exposed the property via a getter in the JavaScript lifecycle module.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

File Description
test/types/index.test-d.ts Added a type test to ensure isInitialized returns a boolean.
test/test-lifecycle.js Added an assertion verifying that isInitialized is true.
src/rcl_lifecycle_bindings.cpp Introduced the IsInitialized native binding and exported it.
lib/lifecycle.js Provided a getter property that leverages the new native binding.

@coveralls
Copy link

Coverage Status

coverage: 84.713% (+0.006%) from 84.707%
when pulling d00286a on minggangw:fix-1135
into aeaf2e8 on RobotWebTools:develop.

@minggangw minggangw merged commit 711e42a into RobotWebTools:develop May 19, 2025
14 checks passed
minggangw added a commit that referenced this pull request May 23, 2025
This PR introduces support for retrieving the lifecycle state machine status by adding a new "isInitialized" property.  
- Added a type test for the new boolean property in the TypeScript tests.  
- Implemented a corresponding native binding in C++ to expose the state.  
- Exposed the property via a getter in the JavaScript lifecycle module.

Fix: #1135
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.

Support getting the status of lifecycle state machine

2 participants