rclnodejs 0.21.4 → 0.22.1
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/.github/workflows/identify-ros-distro.yml +1 -0
- package/.github/workflows/linux-build-and-test-compatibility.yml +7 -8
- package/.github/workflows/linux-build-and-test.yml +3 -3
- package/.github/workflows/windows-build-and-test-compatibility.yml +8 -6
- package/.github/workflows/windows-build-and-test.yml +9 -4
- package/bin/linux-x64-110/rclnodejs.node +0 -0
- package/binding.gyp +3 -0
- package/index.js +4 -0
- package/lib/action/client.js +1 -2
- package/lib/action/server.js +1 -2
- package/lib/client.js +3 -2
- package/lib/distro.js +1 -1
- package/lib/entity.js +40 -0
- package/lib/node.js +86 -38
- package/lib/rmw.js +29 -0
- package/lib/subscription.js +52 -2
- package/package.json +12 -5
- package/rosidl_gen/blocklist.json +8 -0
- package/rosidl_gen/filter.js +104 -0
- package/rosidl_gen/idl_generator.js +7 -0
- package/rosidl_gen/index.js +19 -6
- package/rosidl_gen/packages.js +39 -39
- package/rostsd_gen/index.js +9 -1
- package/rostsd_gen/readme.md +1 -1
- package/scripts/run_test.js +0 -6
- package/src/rcl_bindings.cpp +185 -1
- package/types/entity.d.ts +1 -0
- package/types/interfaces.d.ts +20 -0
- package/types/node.d.ts +50 -2
- package/types/subscription.d.ts +28 -0
package/types/entity.d.ts
CHANGED
package/types/interfaces.d.ts
CHANGED
|
@@ -1751,6 +1751,22 @@ declare module 'rclnodejs' {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
1753
|
namespace rosbag2_interfaces {
|
|
1754
|
+
namespace msg {
|
|
1755
|
+
export interface ReadSplitEvent {
|
|
1756
|
+
closed_file: string;
|
|
1757
|
+
opened_file: string;
|
|
1758
|
+
}
|
|
1759
|
+
export interface ReadSplitEventConstructor {
|
|
1760
|
+
new(other?: ReadSplitEvent): ReadSplitEvent;
|
|
1761
|
+
}
|
|
1762
|
+
export interface WriteSplitEvent {
|
|
1763
|
+
closed_file: string;
|
|
1764
|
+
opened_file: string;
|
|
1765
|
+
}
|
|
1766
|
+
export interface WriteSplitEventConstructor {
|
|
1767
|
+
new(other?: WriteSplitEvent): WriteSplitEvent;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1754
1770
|
namespace srv {
|
|
1755
1771
|
export interface BurstConstructor extends ROSService {
|
|
1756
1772
|
readonly Request: Burst_RequestConstructor;
|
|
@@ -3901,6 +3917,8 @@ declare module 'rclnodejs' {
|
|
|
3901
3917
|
'ros2cli_test_interfaces/msg/ShortVariedNested': ros2cli_test_interfaces.msg.ShortVariedNested,
|
|
3902
3918
|
'ros2cli_test_interfaces/srv/ShortVariedMultiNested_Request': ros2cli_test_interfaces.srv.ShortVariedMultiNested_Request,
|
|
3903
3919
|
'ros2cli_test_interfaces/srv/ShortVariedMultiNested_Response': ros2cli_test_interfaces.srv.ShortVariedMultiNested_Response,
|
|
3920
|
+
'rosbag2_interfaces/msg/ReadSplitEvent': rosbag2_interfaces.msg.ReadSplitEvent,
|
|
3921
|
+
'rosbag2_interfaces/msg/WriteSplitEvent': rosbag2_interfaces.msg.WriteSplitEvent,
|
|
3904
3922
|
'rosbag2_interfaces/srv/Burst_Request': rosbag2_interfaces.srv.Burst_Request,
|
|
3905
3923
|
'rosbag2_interfaces/srv/Burst_Response': rosbag2_interfaces.srv.Burst_Response,
|
|
3906
3924
|
'rosbag2_interfaces/srv/GetRate_Request': rosbag2_interfaces.srv.GetRate_Request,
|
|
@@ -4285,6 +4303,8 @@ declare module 'rclnodejs' {
|
|
|
4285
4303
|
'ros2cli_test_interfaces/msg/ShortVariedNested': ros2cli_test_interfaces.msg.ShortVariedNestedConstructor,
|
|
4286
4304
|
'ros2cli_test_interfaces/srv/ShortVariedMultiNested_Request': ros2cli_test_interfaces.srv.ShortVariedMultiNested_RequestConstructor,
|
|
4287
4305
|
'ros2cli_test_interfaces/srv/ShortVariedMultiNested_Response': ros2cli_test_interfaces.srv.ShortVariedMultiNested_ResponseConstructor,
|
|
4306
|
+
'rosbag2_interfaces/msg/ReadSplitEvent': rosbag2_interfaces.msg.ReadSplitEventConstructor,
|
|
4307
|
+
'rosbag2_interfaces/msg/WriteSplitEvent': rosbag2_interfaces.msg.WriteSplitEventConstructor,
|
|
4288
4308
|
'rosbag2_interfaces/srv/Burst_Request': rosbag2_interfaces.srv.Burst_RequestConstructor,
|
|
4289
4309
|
'rosbag2_interfaces/srv/Burst_Response': rosbag2_interfaces.srv.Burst_ResponseConstructor,
|
|
4290
4310
|
'rosbag2_interfaces/srv/GetRate_Request': rosbag2_interfaces.srv.GetRate_RequestConstructor,
|
package/types/node.d.ts
CHANGED
|
@@ -13,6 +13,30 @@ declare module 'rclnodejs' {
|
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* A filter description similar to a SQL WHERE clause that limits
|
|
18
|
+
* the data wanted by a Subscription.
|
|
19
|
+
*
|
|
20
|
+
* The `expression` grammar is defined in the DDS 1.4 specification, Annex B.
|
|
21
|
+
* https://www.omg.org/spec/DDS/1.4/PDF
|
|
22
|
+
*/
|
|
23
|
+
interface SubscriptionContentFilter {
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the criteria to select the data samples of
|
|
26
|
+
* interest. It is similar to the WHERE part of an SQL clause.
|
|
27
|
+
* Must be a valid query clause.
|
|
28
|
+
*/
|
|
29
|
+
readonly expression: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The values for the ‘parameters’ (i.e., "%n" tokens) in
|
|
33
|
+
* the filter_expression string. There must be a 1-1 match
|
|
34
|
+
* between values and expression parameters. The maximum
|
|
35
|
+
* number of parameters is 100.
|
|
36
|
+
*/
|
|
37
|
+
readonly parameters?: Array<any>;
|
|
38
|
+
}
|
|
39
|
+
|
|
16
40
|
/**
|
|
17
41
|
* Configuration options when creating new Publishers, Subscribers,
|
|
18
42
|
* Clients and Services.
|
|
@@ -37,16 +61,23 @@ declare module 'rclnodejs' {
|
|
|
37
61
|
* ROS Middleware "quality of service" setting, default: QoS.profileDefault.
|
|
38
62
|
*/
|
|
39
63
|
qos?: T;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* An optional filter descriptions similar to a SQL WHERE clause used by a Subscription to
|
|
67
|
+
* inspect and limit messages that it accepts.
|
|
68
|
+
*/
|
|
69
|
+
contentFilter?: SubscriptionContentFilter;
|
|
40
70
|
}
|
|
41
71
|
|
|
42
72
|
/**
|
|
43
|
-
* Default options when creating a
|
|
73
|
+
* Default options when creating a Publisher, Subscription, Client or Service
|
|
44
74
|
*
|
|
45
75
|
* ```ts
|
|
46
76
|
* {
|
|
47
77
|
* enableTypedArray: true,
|
|
48
78
|
* qos: QoS.profileDefault,
|
|
49
|
-
* isRaw: false
|
|
79
|
+
* isRaw: false,
|
|
80
|
+
* contentFilter: undefined
|
|
50
81
|
* }
|
|
51
82
|
* ```
|
|
52
83
|
*/
|
|
@@ -133,6 +164,21 @@ declare module 'rclnodejs' {
|
|
|
133
164
|
options?: NodeOptions
|
|
134
165
|
);
|
|
135
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Create an Options instance initialized with default values.
|
|
169
|
+
* @returns {Options} - The new initialized instance.
|
|
170
|
+
* @example
|
|
171
|
+
* ```
|
|
172
|
+
* {
|
|
173
|
+
* enableTypedArray: true,
|
|
174
|
+
* isRaw: false,
|
|
175
|
+
* qos: QoS.profileDefault,
|
|
176
|
+
* contentFilter: undefined,
|
|
177
|
+
* }
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
static getDefaultOptions(): Options;
|
|
181
|
+
|
|
136
182
|
/**
|
|
137
183
|
* Get the name of the node.
|
|
138
184
|
*
|
|
@@ -271,6 +317,8 @@ declare module 'rclnodejs' {
|
|
|
271
317
|
* @param options - Configuration options, see DEFAULT_OPTIONS
|
|
272
318
|
* @param callback - Called when a new message is received. The serialized message will be null-terminated.
|
|
273
319
|
* @returns New instance of Subscription.
|
|
320
|
+
* @throws Error - May throw an RMW error if options.content-filter is malformed.
|
|
321
|
+
* @see {@link https://www.omg.org/spec/DDS/1.4/PDF|Content-filter details at DDS 1.4 specification, Annex B}
|
|
274
322
|
*/
|
|
275
323
|
createSubscription<T extends TypeClass<MessageTypeClassName>>(
|
|
276
324
|
typeClass: T,
|
package/types/subscription.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare module 'rclnodejs' {
|
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* See {@link Node#createSubscription | Node.createSubscription}
|
|
9
|
+
* See {@link SubscriptionContentFilter}
|
|
9
10
|
* See {@link Node#createPublisher | Node.createPublisher}
|
|
10
11
|
* See {@link Publisher}
|
|
11
12
|
* See {@link Subscription}
|
|
@@ -22,5 +23,32 @@ declare module 'rclnodejs' {
|
|
|
22
23
|
* Topic to listen for messages on.
|
|
23
24
|
*/
|
|
24
25
|
readonly topic: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Specifies if messages are in raw (binary) format
|
|
29
|
+
*/
|
|
30
|
+
readonly isRaw: boolean;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Test if the RMW supports content-filtered topics and that this subscription
|
|
34
|
+
* is configured with a well formed content-filter.
|
|
35
|
+
* @returns {boolean} True if content-filtering will be applied; otherwise false.
|
|
36
|
+
*/
|
|
37
|
+
hasContentFilter(): boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Set a content-filter if the RMW supports content-filtered topics.
|
|
41
|
+
* @param contentFilter - The content-filter description to apply.
|
|
42
|
+
* @returns True if successful; false otherwise
|
|
43
|
+
* @remarks
|
|
44
|
+
* @see {@link https://www.omg.org/spec/DDS/1.4/PDF|DDS 1.4 specification, Annex B}
|
|
45
|
+
*/
|
|
46
|
+
setContentFilter(filter: SubscriptionContentFilter): boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Clear the current content-filter. No filtering is to be applied.
|
|
50
|
+
* @returns True if successful; false otherwise
|
|
51
|
+
*/
|
|
52
|
+
clearContentFilter(): boolean;
|
|
25
53
|
}
|
|
26
54
|
}
|