-
Notifications
You must be signed in to change notification settings - Fork 78
Support getting logger name for subscription, publisher, service and client #1224
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
Conversation
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.
Pull Request Overview
This pull request adds support for getting the logger name for ROS 2 entities (subscription, publisher, service, and client) by exposing a loggerName
getter property on each entity class.
- Adds
loggerName
getter property to Publisher, Subscription, Service, and Client classes - Stores node references in Publisher and Subscription constructors to enable logger name access
- Adds comprehensive test coverage for the new
loggerName
property across all entity types
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
lib/publisher.js | Adds node reference storage and loggerName getter using rclnodejs.getNodeLoggerName() |
lib/subscription.js | Adds node reference storage and loggerName getter using rclnodejs.getNodeLoggerName() |
lib/service.js | Adds loggerName getter using existing _nodeHandle property |
lib/client.js | Adds loggerName getter using existing _nodeHandle property |
test/test-publisher.js | Adds test verifying loggerName returns a string for publishers |
test/test-subscription.js | Adds test verifying loggerName returns a string for subscriptions |
test/test-service.js | Adds test verifying loggerName returns a string for both services and clients |
test/types/index.test-d.ts | Adds TypeScript type assertions for loggerName property on all entity types |
result.sum = request.a + request.b; | ||
} | ||
); | ||
const client = node.createClient(AddTwoInts, 'single_ps_channel2'); |
Copilot
AI
Aug 12, 2025
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 variable AddTwoInts
is not defined in this scope. It should be defined as a string like 'example_interfaces/srv/AddTwoInts'
to match the service type used above.
const client = node.createClient(AddTwoInts, 'single_ps_channel2'); | |
const client = node.createClient('example_interfaces/srv/AddTwoInts', 'single_ps_channel2'); |
Copilot uses AI. Check for mistakes.
…client (#1224) This pull request adds support for getting the logger name for ROS 2 entities (subscription, publisher, service, and client) by exposing a `loggerName` getter property on each entity class. - Adds `loggerName` getter property to Publisher, Subscription, Service, and Client classes - Stores node references in Publisher and Subscription constructors to enable logger name access - Adds comprehensive test coverage for the new `loggerName` property across all entity types Fix: #1219
This pull request adds support for getting the logger name for ROS 2 entities (subscription, publisher, service, and client) by exposing a
loggerName
getter property on each entity class.loggerName
getter property to Publisher, Subscription, Service, and Client classesloggerName
property across all entity typesFix: #1219