@@ -34,10 +34,10 @@ impl PyPoulpeRemoteClient {
34
34
35
35
/// Get the mode of operation
36
36
///
37
- /// Args:
38
- /// slave_id (int): The slave id
39
- /// Returns:
40
- /// int: The mode of operation - 1: Profile Position Mode, 3: Profile Velocity Mode, 4: Profile Torque Mode
37
+ /// # Args:
38
+ /// * slave_id (int): The slave id
39
+ /// # Returns:
40
+ /// * int: The mode of operation - 1: Profile Position Mode, 3: Profile Velocity Mode, 4: Profile Torque Mode
41
41
pub fn get_mode_of_operation ( & mut self , slave_id : u16 ) -> u32 {
42
42
match self . client . get_mode_of_operation ( slave_id) {
43
43
Ok ( mode) => mode,
@@ -47,17 +47,17 @@ impl PyPoulpeRemoteClient {
47
47
48
48
/// Set the mode of operation
49
49
///
50
- /// Args:
51
- /// slave_id (int): The slave id
52
- /// mode (int): The mode of operation - 1: Profile Position Mode, 3: Profile Velocity Mode, 4: Profile Torque Mode
50
+ /// # Args:
51
+ /// * slave_id (int): The slave id
52
+ /// * mode (int): The mode of operation - 1: Profile Position Mode, 3: Profile Velocity Mode, 4: Profile Torque Mode
53
53
pub fn set_mode_of_operation ( & mut self , slave_id : u16 , mode : u32 ) {
54
54
self . client . set_mode_of_operation ( slave_id, mode) ;
55
55
}
56
56
57
57
/// Print the mode of operation
58
58
///
59
- /// Args:
60
- /// slave_id (int): The slave id
59
+ /// # Args:
60
+ /// * slave_id (int): The slave id
61
61
///
62
62
/// Outputs the mode of operation
63
63
pub fn print_mode_of_operation ( & mut self , slave_id : u16 ) {
@@ -71,53 +71,53 @@ impl PyPoulpeRemoteClient {
71
71
72
72
/// Enable the actuators
73
73
///
74
- /// Args:
75
- /// slave_id (int): The slave id
74
+ /// # Args:
75
+ /// * slave_id (int): The slave id
76
76
pub fn turn_on ( & mut self , slave_id : u16 ) {
77
77
self . client . turn_on ( slave_id) ;
78
78
}
79
79
80
80
/// Disable the actuators
81
81
///
82
- /// Args:
83
- /// slave_id (int): The slave id
82
+ /// # Args:
83
+ /// * slave_id (int): The slave id
84
84
pub fn turn_off ( & mut self , slave_id : u16 ) {
85
85
self . client . turn_off ( slave_id) ;
86
86
}
87
87
88
88
/// Set the target position
89
89
///
90
- /// Args:
91
- /// slave_id (int): The slave id
92
- /// position (list): The target position
90
+ /// # Args:
91
+ /// * slave_id (int): The slave id
92
+ /// * position (list): The target position
93
93
pub fn set_target_position ( & mut self , slave_id : u16 , position : Vec < f32 > ) {
94
94
self . client . set_target_position ( slave_id, position) ;
95
95
}
96
96
97
97
/// Set the velocity limit
98
98
///
99
- /// Args:
100
- /// slave_id (int): The slave id
101
- /// velocity_limit (list): Relative velocity limit from 0 to 1
99
+ /// # Args:
100
+ /// * slave_id (int): The slave id
101
+ /// * velocity_limit (list): Relative velocity limit from 0 to 1
102
102
pub fn set_velocity_limit ( & mut self , slave_id : u16 , velocity : Vec < f32 > ) {
103
103
self . client . set_velocity_limit ( slave_id, velocity) ;
104
104
}
105
105
106
106
/// Set the torque limit
107
107
///
108
- /// Args:
109
- /// slave_id (int): The slave id
110
- /// torque_limit (list): Relative torque limit from 0 to 1
108
+ /// # Args:
109
+ /// * slave_id (int): The slave id
110
+ /// * torque_limit (list): Relative torque limit from 0 to 1
111
111
pub fn set_torque_limit ( & mut self , slave_id : u16 , torque : Vec < f32 > ) {
112
112
self . client . set_torque_limit ( slave_id, torque) ;
113
113
}
114
114
115
115
/// Get the actual position
116
116
///
117
- /// Args:
118
- /// slave_id (int): The slave id
119
- /// Returns:
120
- /// list: The actual position
117
+ /// # Args:
118
+ /// * slave_id (int): The slave id
119
+ /// # Returns:
120
+ /// * list: The actual position
121
121
pub fn get_position_actual_value ( & mut self , slave_id : u16 ) -> Vec < f32 > {
122
122
match self . client . get_position_actual_value ( slave_id) {
123
123
Ok ( position) => position,
@@ -127,10 +127,10 @@ impl PyPoulpeRemoteClient {
127
127
128
128
/// Get the target position
129
129
///
130
- /// Args:
131
- /// slave_id (int): The slave id
132
- /// Returns:
133
- /// list: The target position
130
+ /// # Args:
131
+ /// * slave_id (int): The slave id
132
+ /// # Returns:
133
+ /// * list: The target position
134
134
pub fn get_target_position ( & mut self , slave_id : u16 ) -> Vec < f32 > {
135
135
match self . client . get_target_position ( slave_id) {
136
136
Ok ( position) => position,
@@ -140,29 +140,29 @@ impl PyPoulpeRemoteClient {
140
140
141
141
/// Get the target velocity
142
142
///
143
- /// Args:
144
- /// slave_id (int): The slave id
145
- /// Returns:
146
- /// list: The target velocity
143
+ /// # Args:
144
+ /// * slave_id (int): The slave id
145
+ /// # Returns:
146
+ /// * list: The target velocity
147
147
pub fn set_target_velocity ( & mut self , slave_id : u16 , velocity : Vec < f32 > ) {
148
148
self . client . set_target_velocity ( slave_id, velocity) ;
149
149
}
150
150
151
151
/// Set the target torque
152
152
///
153
- /// Args:
154
- /// slave_id (int): The slave id
155
- /// torque (list): The target torque
153
+ /// # Args:
154
+ /// * slave_id (int): The slave id
155
+ /// * torque (list): The target torque
156
156
pub fn set_target_torque ( & mut self , slave_id : u16 , torque : Vec < f32 > ) {
157
157
self . client . set_target_torque ( slave_id, torque) ;
158
158
}
159
159
160
160
/// Get the actual velocity
161
161
///
162
- /// Args:
163
- /// slave_id (int): The slave id
164
- /// Returns:
165
- /// list: The actual velocity
162
+ /// # Args:
163
+ /// * slave_id (int): The slave id
164
+ /// # Returns:
165
+ /// * list: The actual velocity
166
166
pub fn get_velocity_actual_value ( & mut self , slave_id : u16 ) -> Vec < f32 > {
167
167
match self . client . get_velocity_actual_value ( slave_id) {
168
168
Ok ( velocity) => velocity,
@@ -172,10 +172,10 @@ impl PyPoulpeRemoteClient {
172
172
173
173
/// Get the torque velocity
174
174
///
175
- /// Args:
176
- /// slave_id (int): The slave id
177
- /// Returns:
178
- /// list: The actual torque
175
+ /// # Args:
176
+ /// * slave_id (int): The slave id
177
+ /// # Returns:
178
+ /// * list: The actual torque
179
179
pub fn get_torque_actual_value ( & mut self , slave_id : u16 ) -> Vec < f32 > {
180
180
match self . client . get_torque_actual_value ( slave_id) {
181
181
Ok ( torque) => torque,
@@ -185,10 +185,10 @@ impl PyPoulpeRemoteClient {
185
185
186
186
/// Get the current axis sensor values
187
187
///
188
- /// Args:
189
- /// slave_id (int): The slave id
190
- /// Returns:
191
- /// list: The current axis sensor values
188
+ /// # Args:
189
+ /// * slave_id (int): The slave id
190
+ /// # Returns:
191
+ /// * list: The current axis sensor values
192
192
pub fn get_axis_sensors ( & mut self , slave_id : u16 ) -> Vec < f32 > {
193
193
match self . client . get_axis_sensors ( slave_id) {
194
194
Ok ( sensors) => sensors,
@@ -198,10 +198,10 @@ impl PyPoulpeRemoteClient {
198
198
199
199
/// Get the axis sensor zeros in firmware
200
200
///
201
- /// Args:
202
- /// slave_id (int): The slave id
203
- /// Returns:
204
- /// list: The axis sensor zero values
201
+ /// # Args:
202
+ /// * slave_id (int): The slave id
203
+ /// # Returns:
204
+ /// * list: The axis sensor zero values
205
205
pub fn get_axis_sensor_zeros ( & mut self , slave_id : u16 ) -> Vec < f32 > {
206
206
match self . client . get_axis_sensor_zeros ( slave_id) {
207
207
Ok ( zeros) => zeros,
@@ -211,10 +211,10 @@ impl PyPoulpeRemoteClient {
211
211
212
212
/// Check if motors are activated
213
213
///
214
- /// Args:
215
- /// slave_id (int): The slave id
216
- /// Returns:
217
- /// bool: True if the motor is activated, False otherwise
214
+ /// # Args:
215
+ /// * slave_id (int): The slave id
216
+ /// # Returns:
217
+ /// * bool: True if the motor is activated, False otherwise
218
218
pub fn get_torque_state ( & mut self , slave_id : u16 ) -> bool {
219
219
match self . client . get_torque_state ( slave_id) {
220
220
Ok ( state) => state,
@@ -224,10 +224,10 @@ impl PyPoulpeRemoteClient {
224
224
225
225
/// Get the state
226
226
///
227
- /// Args:
228
- /// slave_id (int): The slave id
229
- /// Returns:
230
- /// int: The state (CiA402 state machine)
227
+ /// # Args:
228
+ /// * slave_id (int): The slave id
229
+ /// # Returns:
230
+ /// * int: The state (CiA402 state machine)
231
231
pub fn get_state ( & mut self , slave_id : u16 ) -> u32 {
232
232
match self . client . get_state ( slave_id) {
233
233
Ok ( state) => state,
@@ -238,8 +238,8 @@ impl PyPoulpeRemoteClient {
238
238
/// Print the state
239
239
/// Outputs the CiA402 state machine state
240
240
///
241
- /// Args:
242
- /// slave_id (int): The slave id
241
+ /// # Args:
242
+ /// * slave_id (int): The slave id
243
243
pub fn print_state ( & mut self , slave_id : u16 ) {
244
244
let state = match self . client . get_cia402_state ( slave_id) {
245
245
Ok ( state) => state,
@@ -252,10 +252,10 @@ impl PyPoulpeRemoteClient {
252
252
253
253
/// Get the error codes
254
254
///
255
- /// Args:
256
- /// slave_id (int): The slave id
257
- /// Returns:
258
- /// list: The error codes (see poule_ethercat_controller/src/state_machine.rs)
255
+ /// # Args:
256
+ /// * slave_id (int): The slave id
257
+ /// # Returns:
258
+ /// * list: The error codes (see poule_ethercat_controller/src/state_machine.rs)
259
259
pub fn get_error_codes ( & mut self , slave_id : u16 ) -> Vec < i32 > {
260
260
match self . client . get_error_codes ( slave_id) {
261
261
Ok ( codes) => codes,
@@ -265,8 +265,8 @@ impl PyPoulpeRemoteClient {
265
265
266
266
/// Print the error codes
267
267
///
268
- /// Args:
269
- /// slave_id (int): The slave id
268
+ /// # Args:
269
+ /// * slave_id (int): The slave id
270
270
pub fn print_error_codes ( & mut self , slave_id : u16 ) {
271
271
let error_codes = match self . client . get_error_codes ( slave_id) {
272
272
Ok ( codes) => codes,
@@ -294,8 +294,8 @@ impl PyPoulpeRemoteClient {
294
294
295
295
/// Get the connected devices
296
296
///
297
- /// Returns:
298
- /// list(tuple): The connected devices (slave ids, device names)
297
+ /// # Returns:
298
+ /// * list(tuple): The connected devices (slave ids, device names)
299
299
pub fn get_connected_devices ( & mut self ) -> ( Vec < u16 > , Vec < String > ) {
300
300
( self . client . ids . clone ( ) , self . client . names . clone ( ) )
301
301
}
@@ -309,10 +309,10 @@ impl PyPoulpeRemoteClient {
309
309
310
310
/// Get the motor temperatures
311
311
///
312
- /// Args:
313
- /// slave_id (int): The slave id
314
- /// Returns:
315
- /// list: The motor temperatures
312
+ /// # Args:
313
+ /// * slave_id (int): The slave id
314
+ /// # Returns:
315
+ /// * list: The motor temperatures
316
316
pub fn get_motor_temperatures ( & mut self , slave_id : u16 ) -> Vec < f32 > {
317
317
match self . client . get_motor_temperatures ( slave_id) {
318
318
Ok ( temps) => temps,
@@ -321,10 +321,10 @@ impl PyPoulpeRemoteClient {
321
321
}
322
322
/// Get the board temperatures
323
323
///
324
- /// Args:
325
- /// slave_id (int): The slave id
326
- /// Returns:
327
- /// list: The board temperatures
324
+ /// ## Args:
325
+ /// * slave_id (int): The slave id
326
+ /// ## Returns:
327
+ /// * list: The board temperatures
328
328
pub fn get_board_temperatures ( & mut self , slave_id : u16 ) -> Vec < f32 > {
329
329
match self . client . get_board_temperatures ( slave_id) {
330
330
Ok ( temps) => temps,
@@ -334,8 +334,8 @@ impl PyPoulpeRemoteClient {
334
334
335
335
/// Do an emergency stop
336
336
///
337
- /// Args:
338
- /// slave_id (int): The slave id
337
+ /// ## Args:
338
+ /// * slave_id (int): The slave id
339
339
pub fn emergency_stop ( & mut self , slave_id : u16 ) {
340
340
self . client . emergency_stop ( slave_id) ;
341
341
}
@@ -344,11 +344,11 @@ impl PyPoulpeRemoteClient {
344
344
}
345
345
346
346
/// Launch the server
347
- ///
348
- /// Args:
349
- /// file_name (str): The path to the configuration file (default: ../config/ethercat.yaml
350
- /// Returns:
351
- /// str: The URL address of the server
347
+ ///
348
+ /// ## Args:
349
+ /// * file_name (str): The path to the configuration file (default: ../config/ethercat.yaml
350
+ /// ## Returns:
351
+ /// * str: The URL address of the server
352
352
#[ pyfunction]
353
353
#[ pyo3( signature = ( file_name=None ) ) ]
354
354
pub fn launch_server ( file_name : Option < & str > ) -> String {
@@ -369,11 +369,11 @@ pub fn launch_server(file_name: Option<&str>) -> String {
369
369
}
370
370
371
371
/// Get all slaves connected to the master
372
- ///
373
- /// Args:
374
- /// addr (str): The URL address of the master
375
- /// Returns:
376
- /// tuple: The slave ids and device names
372
+ ///
373
+ /// ## Args:
374
+ /// * addr (str): The URL address of the master
375
+ /// ## Returns:
376
+ /// * tuple: The slave ids and device names
377
377
#[ pyfunction]
378
378
pub fn get_all_slaves_in_network ( addr : & str ) -> ( Vec < u16 > , Vec < String > ) {
379
379
let addr_uri = match addr. parse :: < Uri > ( ) {
0 commit comments