@@ -145,7 +145,7 @@ impl Context {
145
145
/// It can be set through the `ROS_DOMAIN_ID` environment variable.
146
146
///
147
147
/// [1]: https://docs.ros.org/en/rolling/Concepts/About-Domain-ID.html
148
- pub fn domain_id ( & self ) -> u8 {
148
+ pub fn domain_id ( & self ) -> usize {
149
149
let mut domain_id: usize = 0 ;
150
150
let ret = unsafe {
151
151
rcl_context_get_domain_id (
@@ -155,7 +155,7 @@ impl Context {
155
155
} ;
156
156
157
157
debug_assert_eq ! ( ret, 0 ) ;
158
- domain_id as u8
158
+ domain_id
159
159
}
160
160
161
161
/// Checks if the context is still valid.
@@ -179,7 +179,7 @@ pub struct InitOptions {
179
179
/// [ROS_DOMAIN_ID][1] environment variable.
180
180
///
181
181
/// [1]: https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Domain-ID.html#the-ros-domain-id
182
- domain_id : Option < u8 > ,
182
+ domain_id : Option < usize > ,
183
183
}
184
184
185
185
impl InitOptions {
@@ -189,19 +189,19 @@ impl InitOptions {
189
189
}
190
190
191
191
/// Transform an InitOptions into a new one with a certain domain_id
192
- pub fn with_domain_id ( mut self , domain_id : Option < u8 > ) -> InitOptions {
192
+ pub fn with_domain_id ( mut self , domain_id : Option < usize > ) -> InitOptions {
193
193
self . domain_id = domain_id;
194
194
self
195
195
}
196
196
197
197
/// Set the domain_id of an InitOptions, or reset it to the default behavior
198
198
/// (determined by environment variables) by providing None.
199
- pub fn set_domain_id ( & mut self , domain_id : Option < u8 > ) {
199
+ pub fn set_domain_id ( & mut self , domain_id : Option < usize > ) {
200
200
self . domain_id = domain_id;
201
201
}
202
202
203
203
/// Get the domain_id that will be provided by these InitOptions.
204
- pub fn domain_id ( & self ) -> Option < u8 > {
204
+ pub fn domain_id ( & self ) -> Option < usize > {
205
205
self . domain_id
206
206
}
207
207
0 commit comments