rclnodejs 1.1.0 → 1.2.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/README.md +4 -4
- package/binding.gyp +4 -0
- package/lib/event_handler.js +474 -0
- package/lib/lifecycle_publisher.js +2 -2
- package/lib/node.js +57 -10
- package/lib/publisher.js +31 -4
- package/lib/subscription.js +48 -4
- package/package.json +1 -1
- package/scripts/npmjs-readme.md +4 -4
- package/src/addon.cpp +2 -0
- package/src/executor.cpp +3 -4
- package/src/handle_manager.cpp +13 -2
- package/src/handle_manager.h +4 -1
- package/src/rcl_event_handle_bindings.cpp +294 -0
- package/src/rcl_event_handle_bindings.h +26 -0
- package/src/rcl_node_bindings.cpp +6 -0
- package/types/node.d.ts +12 -2
package/types/node.d.ts
CHANGED
|
@@ -303,12 +303,14 @@ declare module 'rclnodejs' {
|
|
|
303
303
|
* @param typeClass - Type of message that will be published.
|
|
304
304
|
* @param topic - Name of the topic the publisher will publish to.
|
|
305
305
|
* @param options - Configuration options, see DEFAULT_OPTIONS
|
|
306
|
+
* @param eventCallbacks - Optional The event callbacks for the publisher.
|
|
306
307
|
* @returns New instance of Publisher.
|
|
307
308
|
*/
|
|
308
309
|
createPublisher<T extends TypeClass<MessageTypeClassName>>(
|
|
309
310
|
typeClass: T,
|
|
310
311
|
topic: string,
|
|
311
|
-
options?: Options
|
|
312
|
+
options?: Options,
|
|
313
|
+
eventCallbacks?: (event: object) => void
|
|
312
314
|
): Publisher<T>;
|
|
313
315
|
|
|
314
316
|
/**
|
|
@@ -333,6 +335,7 @@ declare module 'rclnodejs' {
|
|
|
333
335
|
* @param topic - Name of the topic the subcription will subscribe to.
|
|
334
336
|
* @param options - Configuration options, see DEFAULT_OPTIONS
|
|
335
337
|
* @param callback - Called when a new message is received. The serialized message will be null-terminated.
|
|
338
|
+
* @param eventCallbacks - Optional The event callbacks for the subscription.
|
|
336
339
|
* @returns New instance of Subscription.
|
|
337
340
|
* @throws Error - May throw an RMW error if options.content-filter is malformed.
|
|
338
341
|
* @see {@link https://www.omg.org/spec/DDS/1.4/PDF|Content-filter details at DDS 1.4 specification, Annex B}
|
|
@@ -341,7 +344,8 @@ declare module 'rclnodejs' {
|
|
|
341
344
|
typeClass: T,
|
|
342
345
|
topic: string,
|
|
343
346
|
options: Options,
|
|
344
|
-
callback: SubscriptionCallback<T> | SubscriptionWithRawMessageCallback
|
|
347
|
+
callback: SubscriptionCallback<T> | SubscriptionWithRawMessageCallback,
|
|
348
|
+
eventCallbacks?: (event: object) => void
|
|
345
349
|
): Subscription;
|
|
346
350
|
|
|
347
351
|
/**
|
|
@@ -828,5 +832,11 @@ declare module 'rclnodejs' {
|
|
|
828
832
|
* @returns String containing the fully qualified name of the node.
|
|
829
833
|
*/
|
|
830
834
|
getFullyQualifiedName(): string;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Get the RMW implementation identifier
|
|
838
|
+
* @returns - The RMW implementation identifier.
|
|
839
|
+
*/
|
|
840
|
+
getRMWImplementationIdentifier(): string;
|
|
831
841
|
}
|
|
832
842
|
}
|