Coverage for abb_rws_client_python_rw6/rws/rapid/execution.py: 100%
25 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-13 22:17 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-13 22:17 +0000
1# This file is AUTO-GENERATED by utils/generator/main.py
2# DO NOT EDIT MANUALLY — run the generator to regenerate.
3# Generator author: Clement RACINET
4"""
5RWS module: RobotWare Services → RAPID Service → Operations on RAPID execution
71:1 mirror of the ABB RobotWare 6 REST API.
8Each function maps to exactly one HTTP endpoint.
9No composed logic — see highlevel/ for wrappers.
10"""
12from __future__ import annotations
14import httpx
16from abb_rws_client_python_rw6.core.client import RWSClient
19async def get_rapid_execution_state(
20 client: RWSClient,
21 continue_on_err: str | None = None,
22) -> httpx.Response:
23 """
24 Get RAPID Execution state.
26 Route: ``GET /rw/rapid/execution``
27 ABB constraints: Not supported in bootserver mode. Use /rw/rapid/execution;ctrlexecstate to
28 filter ctrlexecstate value.
30 Args:
31 client: Open RWSClient instance.
32 continue_on_err: Query parameter. Optional.
34 Returns:
35 Raw HTTP response. Expected success: HTTP 200.
37 Raises:
38 RWSAuthenticationError: On HTTP 401.
39 RWSNotFoundError: On HTTP 404.
40 RWSHTTPError: On any other HTTP >= 400.
41 # ABB codes: BAD_REQUEST(400)
43 Example:
44 ```python
45 >>> await get_rapid_execution_state(client)
46 <Response [200]>
47 ```
48 """
49 return await client.get(
50 "/rw/rapid/execution",
51 params={k: v for k, v in {"continue_on_err": continue_on_err}.items() if v is not None},
52 )
55async def get_rapid_execution_actions(
56 client: RWSClient,
57 action: str | None = None,
58) -> httpx.Response:
59 """
60 Get RAPID Execution actions.
62 Route: ``GET /rw/rapid/execution``
63 ABB constraints: Not supported in bootserver mode
65 Args:
66 client: Open RWSClient instance.
67 action: Query parameter. Optional.
69 Returns:
70 Raw HTTP response. Expected success: HTTP 200.
72 Raises:
73 RWSAuthenticationError: On HTTP 401.
74 RWSNotFoundError: On HTTP 404.
75 RWSHTTPError: On any other HTTP >= 400.
76 # ABB codes: BAD_REQUEST(400)
78 Example:
79 ```python
80 >>> await get_rapid_execution_actions(client)
81 <Response [200]>
82 ```
83 """
84 return await client.get(
85 "/rw/rapid/execution",
86 params={k: v for k, v in {"action": action}.items() if v is not None},
87 )
90async def start_rapid_execution(
91 client: RWSClient,
92 action: str | None = None,
93 regain: str | None = None,
94 execmode: str | None = None,
95 cycle: str | None = None,
96 condition: str | None = None,
97 stopatbp: str | None = None,
98 alltaskbytsp: str | None = None,
99) -> httpx.Response:
100 """
101 Start RAPID Execution.
103 Route: ``POST /rw/rapid/execution``
104 ABB constraints: Not supported in bootserver mode.
106 Args:
107 client: Open RWSClient instance.
108 action: Query parameter. Optional.
109 regain: Body parameter. Optional.
110 execmode: Body parameter. Optional.
111 cycle: Body parameter. Optional.
112 condition: Body parameter. Optional.
113 stopatbp: Body parameter. Optional.
114 alltaskbytsp: Body parameter. Optional.
116 Returns:
117 Raw HTTP response. Expected success: HTTP 204.
119 Raises:
120 RWSAuthenticationError: On HTTP 401.
121 RWSNotFoundError: On HTTP 404.
122 RWSHTTPError: On any other HTTP >= 400.
123 # ABB codes: BAD_REQUEST(400)
125 Example:
126 ```python
127 >>> await start_rapid_execution(client)
128 <Response [204]>
129 ```
130 """
131 return await client.post(
132 "/rw/rapid/execution",
133 params={k: v for k, v in {"action": action}.items() if v is not None},
134 data={
135 k: v
136 for k, v in {
137 "regain": regain,
138 "execmode": execmode,
139 "cycle": cycle,
140 "condition": condition,
141 "stopatbp": stopatbp,
142 "alltaskbytsp": alltaskbytsp,
143 }.items()
144 if v is not None
145 },
146 )
149async def stop_rapid_execution(
150 client: RWSClient,
151 action: str | None = None,
152 stopmode: str | None = None,
153 usetsp: str | None = None,
154) -> httpx.Response:
155 """
156 Stop RAPID Execution.
158 Route: ``POST /rw/rapid/execution``
159 ABB constraints: Not supported in bootserver mode
161 Args:
162 client: Open RWSClient instance.
163 action: Query parameter. Optional.
164 stopmode: Body parameter. Optional.
165 usetsp: Body parameter. Optional.
167 Returns:
168 Raw HTTP response. Expected success: HTTP 204.
170 Raises:
171 RWSAuthenticationError: On HTTP 401.
172 RWSNotFoundError: On HTTP 404.
173 RWSHTTPError: On any other HTTP >= 400.
174 # ABB codes: BAD_REQUEST(400)
176 Example:
177 ```python
178 >>> await stop_rapid_execution(client)
179 <Response [204]>
180 ```
181 """
182 return await client.post(
183 "/rw/rapid/execution",
184 params={k: v for k, v in {"action": action}.items() if v is not None},
185 data={k: v for k, v in {"stopmode": stopmode, "usetsp": usetsp}.items() if v is not None},
186 )
189async def start_rapid_execution_from_production_entry(
190 client: RWSClient,
191 action: str | None = None,
192) -> httpx.Response:
193 """
194 Start RAPID Execution from production entry.
196 Route: ``POST /rw/rapid/execution``
197 ABB constraints: Not supported in bootserver mode
199 Args:
200 client: Open RWSClient instance.
201 action: Query parameter. Optional.
203 Returns:
204 Raw HTTP response. Expected success: HTTP 204.
206 Raises:
207 RWSAuthenticationError: On HTTP 401.
208 RWSNotFoundError: On HTTP 404.
209 RWSHTTPError: On any other HTTP >= 400.
210 # ABB codes: BAD_REQUEST(400)
212 Example:
213 ```python
214 >>> await start_rapid_execution_from_production_entry(client)
215 <Response [204]>
216 ```
217 """
218 return await client.post(
219 "/rw/rapid/execution",
220 params={k: v for k, v in {"action": action}.items() if v is not None},
221 data={},
222 )
225async def reset_rapid_program_pointer_to_main(
226 client: RWSClient,
227 action: str | None = None,
228) -> httpx.Response:
229 """
230 Reset RAPID program pointer to main.
232 Route: ``POST /rw/rapid/execution``
233 ABB constraints: Not supported in bootserver mode
235 Args:
236 client: Open RWSClient instance.
237 action: Query parameter. Optional.
239 Returns:
240 Raw HTTP response. Expected success: HTTP 204.
242 Raises:
243 RWSAuthenticationError: On HTTP 401.
244 RWSNotFoundError: On HTTP 404.
245 RWSHTTPError: On any other HTTP >= 400.
246 # ABB codes: BAD_REQUEST(400)
248 Example:
249 ```python
250 >>> await reset_rapid_program_pointer_to_main(client)
251 <Response [204]>
252 ```
253 """
254 return await client.post(
255 "/rw/rapid/execution",
256 params={k: v for k, v in {"action": action}.items() if v is not None},
257 data={},
258 )
261async def set_number_of_execution_cycles(
262 client: RWSClient,
263 action: str | None = None,
264 cycle: str | None = None,
265) -> httpx.Response:
266 """
267 Set number of execution cycles.
269 Route: ``POST /rw/rapid/execution``
270 ABB constraints: Not supported in bootserver mode. Mastership is required to set cycle.
272 Args:
273 client: Open RWSClient instance.
274 action: Query parameter. Optional.
275 cycle: Body parameter. Optional.
277 Returns:
278 Raw HTTP response. Expected success: HTTP 204.
280 Raises:
281 RWSAuthenticationError: On HTTP 401.
282 RWSNotFoundError: On HTTP 404.
283 RWSHTTPError: On any other HTTP >= 400.
284 # ABB codes: BAD_REQUEST(400)
286 Example:
287 ```python
288 >>> await set_number_of_execution_cycles(client)
289 <Response [204]>
290 ```
291 """
292 return await client.post(
293 "/rw/rapid/execution",
294 params={k: v for k, v in {"action": action}.items() if v is not None},
295 data={k: v for k, v in {"cycle": cycle}.items() if v is not None},
296 )
299async def subscribe_rapid_execution(
300 client: RWSClient,
301 resources: str | None = None,
302 identifier: str | None = None,
303 identifier_p: str | None = None,
304) -> httpx.Response:
305 """
306 Subscribe RAPID Execution.
308 Route: ``POST /subscription``
309 ABB constraints: Not supported in bootserver mode
311 Args:
312 client: Open RWSClient instance.
313 resources: Body parameter. Optional.
314 identifier: Body parameter. Optional.
315 identifier_p: Body parameter. Optional.
317 Returns:
318 Raw HTTP response. Expected success: HTTP 201.
320 Raises:
321 RWSAuthenticationError: On HTTP 401.
322 RWSNotFoundError: On HTTP 404.
323 RWSHTTPError: On any other HTTP >= 400.
324 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
326 Example:
327 ```python
328 >>> await subscribe_rapid_execution(client)
329 <Response [201]>
330 ```
331 """
332 return await client.post(
333 "/subscription",
334 data={
335 k: v
336 for k, v in {
337 "resources": resources,
338 "identifier": identifier,
339 "identifier_p": identifier_p,
340 }.items()
341 if v is not None
342 },
343 )
346async def subscribe_rapid_execution_cycle(
347 client: RWSClient,
348 resources: str | None = None,
349 identifier: str | None = None,
350 identifier_p: str | None = None,
351) -> httpx.Response:
352 """
353 Subscribe RAPID Execution Cycle.
355 Route: ``POST /subscription``
356 ABB constraints: Not supported in bootserver mode
358 Args:
359 client: Open RWSClient instance.
360 resources: Body parameter. Optional.
361 identifier: Body parameter. Optional.
362 identifier_p: Body parameter. Optional.
364 Returns:
365 Raw HTTP response. Expected success: HTTP 201.
367 Raises:
368 RWSAuthenticationError: On HTTP 401.
369 RWSNotFoundError: On HTTP 404.
370 RWSHTTPError: On any other HTTP >= 400.
371 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
373 Example:
374 ```python
375 >>> await subscribe_rapid_execution_cycle(client)
376 <Response [201]>
377 ```
378 """
379 return await client.post(
380 "/subscription",
381 data={
382 k: v
383 for k, v in {
384 "resources": resources,
385 "identifier": identifier,
386 "identifier_p": identifier_p,
387 }.items()
388 if v is not None
389 },
390 )
393async def subscribe_on_hold_to_run(
394 client: RWSClient,
395 identifier: str | None = None,
396 identifier_p: str | None = None,
397) -> httpx.Response:
398 """
399 Subscribe on Hold to Run.
401 Route: ``POST /subscription``
402 ABB constraints: Not supported in bootserver mode
404 Args:
405 client: Open RWSClient instance.
406 identifier: Body parameter. Optional.
407 identifier_p: Body parameter. Optional.
409 Returns:
410 Raw HTTP response. Expected success: HTTP 201.
412 Raises:
413 RWSAuthenticationError: On HTTP 401.
414 RWSNotFoundError: On HTTP 404.
415 RWSHTTPError: On any other HTTP >= 400.
416 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
418 Example:
419 ```python
420 >>> await subscribe_on_hold_to_run(client)
421 <Response [201]>
422 ```
423 """
424 return await client.post(
425 "/subscription",
426 data={
427 k: v
428 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
429 if v is not None
430 },
431 )
434async def set_hold_to_run_cmd(
435 client: RWSClient,
436 action: str | None = None,
437 state: str | None = None,
438) -> httpx.Response:
439 """
440 Set Hold to Run Cmd.
442 Route: ``POST /rw/rapid/execution``
443 ABB constraints: -Not supported in bootserver mode -Supported in VC only -Login as Local
444 Client -The Hold-To-Run control prevents RAPID-program execution to start until the
445 holdtorun state is changed to Press. -In the state Pressed the client must poll the
446 Hold-To-Run control every 2 second, otherwise the program...
448 Args:
449 client: Open RWSClient instance.
450 action: Query parameter. Optional.
451 state: Body parameter. Optional.
453 Returns:
454 Raw HTTP response. Expected success: HTTP 204.
456 Raises:
457 RWSAuthenticationError: On HTTP 401.
458 RWSNotFoundError: On HTTP 404.
459 RWSHTTPError: On any other HTTP >= 400.
460 # ABB codes: BAD_REQUEST(400),FORBIDDEN(403)
462 Example:
463 ```python
464 >>> await set_hold_to_run_cmd(client)
465 <Response [204]>
466 ```
467 """
468 return await client.post(
469 "/rw/rapid/execution",
470 params={k: v for k, v in {"action": action}.items() if v is not None},
471 data={k: v for k, v in {"state": state}.items() if v is not None},
472 )