rclnodejs 0.32.5 → 1.0.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 +3 -3
- package/binding.gyp +17 -2
- package/lib/client.js +2 -3
- package/lib/context.js +8 -0
- package/lib/logging.js +26 -9
- package/lib/node.js +68 -1
- package/lib/publisher.js +8 -0
- package/lib/service.js +9 -2
- package/lib/subscription.js +8 -0
- package/lib/timer.js +32 -0
- package/package.json +4 -4
- package/rostsd_gen/index.js +167 -67
- package/scripts/config.js +1 -0
- package/scripts/npmjs-readme.md +3 -3
- package/src/addon.cpp +54 -53
- package/src/executor.cpp +19 -10
- package/src/{executor.hpp → executor.h} +7 -5
- package/src/handle_manager.cpp +30 -56
- package/src/{handle_manager.hpp → handle_manager.h} +8 -7
- package/src/{macros.hpp → macros.h} +7 -5
- package/src/rcl_action_client_bindings.cpp +231 -0
- package/src/{rcl_action_bindings.hpp → rcl_action_client_bindings.h} +6 -11
- package/src/rcl_action_goal_bindings.cpp +117 -0
- package/src/rcl_action_goal_bindings.h +26 -0
- package/src/rcl_action_server_bindings.cpp +470 -0
- package/src/rcl_action_server_bindings.h +26 -0
- package/src/rcl_bindings.cpp +42 -1979
- package/src/{rcl_bindings.hpp → rcl_bindings.h} +5 -25
- package/src/rcl_client_bindings.cpp +183 -0
- package/src/rcl_client_bindings.h +26 -0
- package/src/rcl_context_bindings.cpp +156 -0
- package/src/rcl_context_bindings.h +26 -0
- package/src/rcl_graph_bindings.cpp +280 -0
- package/src/rcl_graph_bindings.h +26 -0
- package/src/rcl_guard_condition_bindings.cpp +75 -0
- package/src/rcl_guard_condition_bindings.h +26 -0
- package/src/rcl_handle.cpp +41 -57
- package/src/{rcl_handle.hpp → rcl_handle.h} +18 -17
- package/src/rcl_lifecycle_bindings.cpp +135 -114
- package/src/{rcl_lifecycle_bindings.hpp → rcl_lifecycle_bindings.h} +5 -7
- package/src/rcl_logging_bindings.cpp +96 -0
- package/src/rcl_logging_bindings.h +26 -0
- package/src/rcl_names_bindings.cpp +255 -0
- package/src/rcl_names_bindings.h +26 -0
- package/src/rcl_node_bindings.cpp +447 -0
- package/src/rcl_node_bindings.h +26 -0
- package/src/rcl_publisher_bindings.cpp +141 -0
- package/src/rcl_publisher_bindings.h +26 -0
- package/src/rcl_service_bindings.cpp +185 -0
- package/src/rcl_service_bindings.h +26 -0
- package/src/rcl_subscription_bindings.cpp +335 -0
- package/src/rcl_subscription_bindings.h +26 -0
- package/src/rcl_time_point_bindings.cpp +194 -0
- package/src/rcl_time_point_bindings.h +26 -0
- package/src/rcl_timer_bindings.cpp +237 -0
- package/src/rcl_timer_bindings.h +26 -0
- package/src/rcl_utilities.cpp +166 -1
- package/src/{rcl_utilities.hpp → rcl_utilities.h} +21 -3
- package/src/shadow_node.cpp +56 -75
- package/src/{shadow_node.hpp → shadow_node.h} +18 -17
- package/types/context.d.ts +6 -0
- package/types/interfaces.d.ts +4377 -0
- package/types/node.d.ts +53 -0
- package/types/publisher.d.ts +6 -0
- package/types/service.d.ts +6 -0
- package/types/subscription.d.ts +6 -0
- package/types/timer.d.ts +18 -0
- package/src/rcl_action_bindings.cpp +0 -826
package/types/node.d.ts
CHANGED
|
@@ -685,6 +685,22 @@ declare module 'rclnodejs' {
|
|
|
685
685
|
namespace?: string
|
|
686
686
|
): Array<NamesAndTypesQueryResult>;
|
|
687
687
|
|
|
688
|
+
/**
|
|
689
|
+
* Get a remote node's client topics.
|
|
690
|
+
*
|
|
691
|
+
* @param remoteNodeName - Name of the remote node.
|
|
692
|
+
* @param namespace - Name of the remote namespace.
|
|
693
|
+
* @returns An array of the names and types.
|
|
694
|
+
* [
|
|
695
|
+
* { name: '/rosout', types: [ 'rcl_interfaces/msg/Log' ] },
|
|
696
|
+
* ...
|
|
697
|
+
* ]
|
|
698
|
+
*/
|
|
699
|
+
getClientNamesAndTypesByNode(
|
|
700
|
+
remoteNodeName: string,
|
|
701
|
+
namespace?: string
|
|
702
|
+
): Array<NamesAndTypesQueryResult>;
|
|
703
|
+
|
|
688
704
|
/**
|
|
689
705
|
* Get this node's topics and corresponding types.
|
|
690
706
|
*
|
|
@@ -711,6 +727,29 @@ declare module 'rclnodejs' {
|
|
|
711
727
|
*/
|
|
712
728
|
getServiceNamesAndTypes(): Array<NamesAndTypesQueryResult>;
|
|
713
729
|
|
|
730
|
+
/**
|
|
731
|
+
* Get an array of publishers on a given topic.
|
|
732
|
+
*
|
|
733
|
+
* @param topic - The name of the topic.
|
|
734
|
+
* @param noDemangle - if `true`, `topic_name` needs to be a valid middleware topic name,
|
|
735
|
+
* otherwise it should be a valid ROS topic name.
|
|
736
|
+
* @returns An array of publishers.
|
|
737
|
+
*/
|
|
738
|
+
getPublishersInfoByTopic(topic: string, noDemangle: boolean): Array<object>;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Get an array of subscriptions on a given topic.
|
|
742
|
+
*
|
|
743
|
+
* @param topic - The name of the topic.
|
|
744
|
+
* @param noDemangle - if `true`, `topic_name` needs to be a valid middleware topic name,
|
|
745
|
+
* otherwise it should be a valid ROS topic name.
|
|
746
|
+
* @returns An array of subscriptions.
|
|
747
|
+
*/
|
|
748
|
+
getSubscriptionsInfoByTopic(
|
|
749
|
+
topic: string,
|
|
750
|
+
noDemangle: boolean
|
|
751
|
+
): Array<object>;
|
|
752
|
+
|
|
714
753
|
/**
|
|
715
754
|
* Get the list of nodes discovered by the provided node.
|
|
716
755
|
*
|
|
@@ -743,5 +782,19 @@ declare module 'rclnodejs' {
|
|
|
743
782
|
* @returns Number of subscribers on the given topic.
|
|
744
783
|
*/
|
|
745
784
|
countSubscribers(topic: string): number;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Get the number of clients on a given service name.
|
|
788
|
+
* @param serviceName - The service name.
|
|
789
|
+
* @returns Number of clients.
|
|
790
|
+
*/
|
|
791
|
+
countClients(serviceName: string): number;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Get the number of services on a given service name.
|
|
795
|
+
* @param serviceName - The service name.
|
|
796
|
+
* @returns Number of services.
|
|
797
|
+
*/
|
|
798
|
+
countServices(serviceName: string): number;
|
|
746
799
|
}
|
|
747
800
|
}
|
package/types/publisher.d.ts
CHANGED
|
@@ -14,5 +14,11 @@ declare module 'rclnodejs' {
|
|
|
14
14
|
* @param message - The message to be sent.
|
|
15
15
|
*/
|
|
16
16
|
publish(message: MessageType<T> | Buffer): void;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get the number of subscriptions to this publisher.
|
|
20
|
+
* @returns The number of subscriptions
|
|
21
|
+
*/
|
|
22
|
+
subscriptionCount(): number;
|
|
17
23
|
}
|
|
18
24
|
}
|
package/types/service.d.ts
CHANGED
package/types/subscription.d.ts
CHANGED
|
@@ -66,5 +66,11 @@ declare module 'rclnodejs' {
|
|
|
66
66
|
* @returns True if successful; false otherwise
|
|
67
67
|
*/
|
|
68
68
|
clearContentFilter(): boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get the number of publishers to this subscription.
|
|
72
|
+
* @returns The number of publishers
|
|
73
|
+
*/
|
|
74
|
+
publisherCount(): number;
|
|
69
75
|
}
|
|
70
76
|
}
|
package/types/timer.d.ts
CHANGED
|
@@ -45,5 +45,23 @@ declare module 'rclnodejs' {
|
|
|
45
45
|
* @returns The interval value in nanoseconds
|
|
46
46
|
*/
|
|
47
47
|
timeUntilNextCall(): bigint;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Change the timer period.
|
|
51
|
+
* @param period - The new period in nanoseconds.
|
|
52
|
+
*/
|
|
53
|
+
changeTimerPeriod(period: bigint): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get the timer period.
|
|
57
|
+
* @return The period in nanoseconds.
|
|
58
|
+
*/
|
|
59
|
+
timerPeriod(): bigint;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Call a timer and starts counting again, retrieves actual and expected call time.
|
|
63
|
+
* @return - The timer information.
|
|
64
|
+
*/
|
|
65
|
+
callTimerWithInfo(): object;
|
|
48
66
|
}
|
|
49
67
|
}
|