rclnodejs 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +2 -0
- package/index.js +93 -0
- package/lib/action/client.js +54 -1
- package/lib/client.js +66 -1
- package/lib/clock.js +178 -0
- package/lib/clock_change.js +49 -0
- package/lib/clock_event.js +88 -0
- package/lib/errors.js +50 -0
- package/lib/logging.js +78 -0
- package/lib/message_introspector.js +123 -0
- package/lib/message_validation.js +512 -0
- package/lib/node.js +133 -1
- package/lib/node_options.js +40 -1
- package/lib/observable_subscription.js +105 -0
- package/lib/publisher.js +56 -1
- package/lib/qos.js +57 -0
- package/lib/subscription.js +8 -0
- package/lib/timer.js +42 -0
- package/lib/validator.js +63 -7
- package/package.json +4 -2
- package/prebuilds/linux-arm64/humble-jammy-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-arm64/jazzy-noble-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-arm64/kilted-noble-arm64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/humble-jammy-x64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/jazzy-noble-x64-rclnodejs.node +0 -0
- package/prebuilds/linux-x64/kilted-noble-x64-rclnodejs.node +0 -0
- package/rosidl_gen/message_translator.js +0 -61
- package/scripts/config.js +1 -0
- package/src/addon.cpp +2 -0
- package/src/clock_event.cpp +268 -0
- package/src/clock_event.hpp +62 -0
- package/src/macros.h +2 -4
- package/src/rcl_action_server_bindings.cpp +21 -3
- package/src/rcl_bindings.cpp +59 -0
- package/src/rcl_context_bindings.cpp +5 -0
- package/src/rcl_graph_bindings.cpp +73 -0
- package/src/rcl_logging_bindings.cpp +158 -0
- package/src/rcl_node_bindings.cpp +14 -2
- package/src/rcl_publisher_bindings.cpp +12 -0
- package/src/rcl_service_bindings.cpp +7 -6
- package/src/rcl_subscription_bindings.cpp +51 -14
- package/src/rcl_time_point_bindings.cpp +135 -0
- package/src/rcl_timer_bindings.cpp +140 -0
- package/src/rcl_utilities.cpp +103 -2
- package/src/rcl_utilities.h +7 -1
- package/types/action_client.d.ts +27 -2
- package/types/base.d.ts +3 -0
- package/types/client.d.ts +29 -1
- package/types/clock.d.ts +86 -0
- package/types/clock_change.d.ts +27 -0
- package/types/clock_event.d.ts +51 -0
- package/types/errors.d.ts +49 -0
- package/types/index.d.ts +10 -0
- package/types/interfaces.d.ts +1 -1910
- package/types/logging.d.ts +32 -0
- package/types/message_introspector.d.ts +75 -0
- package/types/message_validation.d.ts +183 -0
- package/types/node.d.ts +67 -0
- package/types/node_options.d.ts +13 -0
- package/types/observable_subscription.d.ts +39 -0
- package/types/publisher.d.ts +28 -1
- package/types/qos.d.ts +18 -0
- package/types/subscription.d.ts +6 -0
- package/types/timer.d.ts +18 -0
- package/types/validator.d.ts +86 -0
package/types/errors.d.ts
CHANGED
|
@@ -149,6 +149,55 @@ declare module 'rclnodejs' {
|
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* A single validation issue found during message validation
|
|
154
|
+
*/
|
|
155
|
+
export interface MessageValidationIssue {
|
|
156
|
+
/** Field path where issue occurred (e.g., 'linear.x' or 'data') */
|
|
157
|
+
field: string;
|
|
158
|
+
/** Problem type (UNKNOWN_FIELD, TYPE_MISMATCH, etc.) */
|
|
159
|
+
problem: string;
|
|
160
|
+
/** Expected type or value */
|
|
161
|
+
expected?: string;
|
|
162
|
+
/** Actual value received */
|
|
163
|
+
received?: any;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Message validation error for ROS message structure/type issues
|
|
168
|
+
*/
|
|
169
|
+
export class MessageValidationError extends ValidationError {
|
|
170
|
+
/** The ROS message type (e.g., 'std_msgs/msg/String') */
|
|
171
|
+
messageType: string;
|
|
172
|
+
/** Array of validation issues found */
|
|
173
|
+
issues: MessageValidationIssue[];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @param messageType - The ROS message type
|
|
177
|
+
* @param issues - Array of validation issues
|
|
178
|
+
* @param options - Additional options
|
|
179
|
+
*/
|
|
180
|
+
constructor(
|
|
181
|
+
messageType: string,
|
|
182
|
+
issues: MessageValidationIssue[],
|
|
183
|
+
options?: RclNodeErrorOptions
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Get issues filtered by problem type
|
|
188
|
+
* @param problemType - Problem type to filter by
|
|
189
|
+
* @returns Filtered issues
|
|
190
|
+
*/
|
|
191
|
+
getIssuesByType(problemType: string): MessageValidationIssue[];
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Check if a specific field has validation issues
|
|
195
|
+
* @param fieldPath - Field path to check
|
|
196
|
+
* @returns True if field has issues
|
|
197
|
+
*/
|
|
198
|
+
hasFieldIssue(fieldPath: string): boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
152
201
|
/**
|
|
153
202
|
* ROS name validation error (topics, nodes, services)
|
|
154
203
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference path="./base.d.ts" />
|
|
2
|
+
/// <reference path="./clock_event.d.ts" />
|
|
3
|
+
/// <reference path="./clock_change.d.ts" />
|
|
4
|
+
/// <reference path="./message_validation.d.ts" />
|
|
2
5
|
|
|
3
6
|
import { ChildProcess } from 'child_process';
|
|
4
7
|
|
|
@@ -58,6 +61,13 @@ declare module 'rclnodejs' {
|
|
|
58
61
|
*/
|
|
59
62
|
function init(context?: Context, argv?: string[]): Promise<void>;
|
|
60
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Remove ROS-specific arguments from the given argument list.
|
|
66
|
+
* @param argv - The argument list to process.
|
|
67
|
+
* @returns The argument list with ROS arguments removed.
|
|
68
|
+
*/
|
|
69
|
+
function removeROSArgs(argv: string[]): string[];
|
|
70
|
+
|
|
61
71
|
/**
|
|
62
72
|
* Start detection and processing of units of work.
|
|
63
73
|
*
|