@@ -145,7 +145,7 @@ impl Context {
145145 /// It can be set through the `ROS_DOMAIN_ID` environment variable.
146146 ///
147147 /// [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 {
149149 let mut domain_id: usize = 0 ;
150150 let ret = unsafe {
151151 rcl_context_get_domain_id (
@@ -155,7 +155,7 @@ impl Context {
155155 } ;
156156
157157 debug_assert_eq ! ( ret, 0 ) ;
158- domain_id as u8
158+ domain_id
159159 }
160160
161161 /// Checks if the context is still valid.
@@ -179,7 +179,7 @@ pub struct InitOptions {
179179 /// [ROS_DOMAIN_ID][1] environment variable.
180180 ///
181181 /// [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 > ,
183183}
184184
185185impl InitOptions {
@@ -189,19 +189,19 @@ impl InitOptions {
189189 }
190190
191191 /// 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 {
193193 self . domain_id = domain_id;
194194 self
195195 }
196196
197197 /// Set the domain_id of an InitOptions, or reset it to the default behavior
198198 /// (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 > ) {
200200 self . domain_id = domain_id;
201201 }
202202
203203 /// 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 > {
205205 self . domain_id
206206 }
207207
0 commit comments