Coverage for abb_rws_client_python_rw6/rws/panel.py: 100%
47 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 → Panel service → Get Panel Resources
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_panel_resources(client: RWSClient) -> httpx.Response:
20 """
21 Get Panel Resources.
23 Route: ``GET /rw/panel``
24 ABB constraints: Not supported in bootserver mode
26 Args:
27 client: Open RWSClient instance.
29 Returns:
30 Raw HTTP response. Expected success: HTTP 200.
32 Raises:
33 RWSAuthenticationError: On HTTP 401.
34 RWSNotFoundError: On HTTP 404.
35 RWSHTTPError: On any other HTTP >= 400.
36 # ABB codes: BAD_REQUEST(400)
38 Example:
39 ```python
40 >>> await get_panel_resources(client)
41 <Response [200]>
42 ```
43 """
44 return await client.get("/rw/panel")
47async def get_panel_actions(client: RWSClient) -> httpx.Response:
48 """
49 Get Panel Actions.
51 Route: ``GET /rw/panel``
52 ABB constraints: Not supported in bootserver mode
54 Args:
55 client: Open RWSClient instance.
57 Returns:
58 Raw HTTP response. Expected success: HTTP 200.
60 Raises:
61 RWSAuthenticationError: On HTTP 401.
62 RWSNotFoundError: On HTTP 404.
63 RWSHTTPError: On any other HTTP >= 400.
64 # ABB codes: BAD_REQUEST(400)
66 Example:
67 ```python
68 >>> await get_panel_actions(client)
69 <Response [200]>
70 ```
71 """
72 return await client.get("/rw/panel")
75async def set_the_language(
76 client: RWSClient,
77 action: str | None = None,
78 lang_code: str | None = None,
79) -> httpx.Response:
80 """
81 Set the language.
83 Route: ``POST /rw/panel``
84 ABB constraints: Not supported in bootserver mode
86 Args:
87 client: Open RWSClient instance.
88 action: Query parameter. Optional.
89 lang_code: Body parameter. Optional.
91 Returns:
92 Raw HTTP response. Expected success: HTTP 204.
94 Raises:
95 RWSAuthenticationError: On HTTP 401.
96 RWSNotFoundError: On HTTP 404.
97 RWSHTTPError: On any other HTTP >= 400.
98 # ABB codes: BAD_REQUEST(400)
100 Example:
101 ```python
102 >>> await set_the_language(client)
103 <Response [204]>
104 ```
105 """
106 return await client.post(
107 "/rw/panel",
108 params={k: v for k, v in {"action": action}.items() if v is not None},
109 data={k: v for k, v in {"lang_code": lang_code}.items() if v is not None},
110 )
113async def restart_the_controller(
114 client: RWSClient,
115 action: str | None = None,
116 restart_mode: str | None = None,
117) -> httpx.Response:
118 """
119 Restart the Controller.
121 Route: ``POST /rw/panel``
122 ABB constraints: Not supported in bootserver mode
124 Args:
125 client: Open RWSClient instance.
126 action: Query parameter. Optional.
127 restart_mode: Body parameter. Optional.
129 Returns:
130 Raw HTTP response. Expected success: HTTP 204.
132 Raises:
133 RWSAuthenticationError: On HTTP 401.
134 RWSNotFoundError: On HTTP 404.
135 RWSHTTPError: On any other HTTP >= 400.
136 # ABB codes: BAD_REQUEST(400)
138 Example:
139 ```python
140 >>> await restart_the_controller(client)
141 <Response [204]>
142 ```
143 """
144 return await client.post(
145 "/rw/panel",
146 params={k: v for k, v in {"action": action}.items() if v is not None},
147 data={k: v for k, v in {"restart_mode": restart_mode}.items() if v is not None},
148 )
151async def get_controller_state(client: RWSClient) -> httpx.Response:
152 """
153 Get Controller State.
155 Route: ``GET /rw/panel/ctrlstate``
156 ABB constraints: init : The robot is starting up. It will shift to state motors off when it
157 has started. motoroff : The robot is in a standby state where there is no power to the
158 robot's motors. The state has to be shifted to motors on before the robot can move.
159 motoron : The robot is ready to move, either by jog...
161 Args:
162 client: Open RWSClient instance.
164 Returns:
165 Raw HTTP response. Expected success: HTTP 200.
167 Raises:
168 RWSAuthenticationError: On HTTP 401.
169 RWSNotFoundError: On HTTP 404.
170 RWSHTTPError: On any other HTTP >= 400.
171 # ABB codes: BAD REQUEST(400)
173 Example:
174 ```python
175 >>> await get_controller_state(client)
176 <Response [200]>
177 ```
178 """
179 return await client.get("/rw/panel/ctrlstate")
182async def get_controller_state_actions(
183 client: RWSClient,
184 action: str | None = None,
185) -> httpx.Response:
186 """
187 Get Controller State Actions.
189 Route: ``GET /rw/panel/ctrlstate``
190 ABB constraints: Not supported in bootserver mode
192 Args:
193 client: Open RWSClient instance.
194 action: Query parameter. Optional.
196 Returns:
197 Raw HTTP response. Expected success: HTTP 200.
199 Raises:
200 RWSAuthenticationError: On HTTP 401.
201 RWSNotFoundError: On HTTP 404.
202 RWSHTTPError: On any other HTTP >= 400.
203 # ABB codes: BAD_REQUEST(400)
205 Example:
206 ```python
207 >>> await get_controller_state_actions(client)
208 <Response [200]>
209 ```
210 """
211 return await client.get(
212 "/rw/panel/ctrlstate",
213 params={k: v for k, v in {"action": action}.items() if v is not None},
214 )
217async def set_controller_state(
218 client: RWSClient,
219 action: str | None = None,
220 ctrl_state: str | None = None,
221) -> httpx.Response:
222 """
223 Set Controller State.
225 Route: ``POST /rw/panel/ctrlstate``
226 ABB constraints: Not supported in bootserver mode.
228 Args:
229 client: Open RWSClient instance.
230 action: Query parameter. Optional.
231 ctrl_state: Body parameter. Optional.
233 Returns:
234 Raw HTTP response. Expected success: HTTP 204.
236 Raises:
237 RWSAuthenticationError: On HTTP 401.
238 RWSNotFoundError: On HTTP 404.
239 RWSHTTPError: On any other HTTP >= 400.
240 # ABB codes: BAD REQUEST(400)
242 Example:
243 ```python
244 >>> await set_controller_state(client)
245 <Response [204]>
246 ```
247 """
248 return await client.post(
249 "/rw/panel/ctrlstate",
250 params={k: v for k, v in {"action": action}.items() if v is not None},
251 data={k: v for k, v in {"ctrl_state": ctrl_state}.items() if v is not None},
252 )
255async def subscribe_controller_state(
256 client: RWSClient,
257 identifier: str | None = None,
258 identifier_p: str | None = None,
259) -> httpx.Response:
260 """
261 Subscribe Controller state.
263 Route: ``POST /subscription``
264 ABB constraints: init : The robot is starting up. It will shift to state motors off when it
265 has started. motoroff : The robot is in a standby state where there is no power to the
266 robot's motors. The state has to be shifted to motors on before the robot can move.
267 motoron : The robot is ready to move, either by jog...
269 Args:
270 client: Open RWSClient instance.
271 identifier: Body parameter. Optional.
272 identifier_p: Body parameter. Optional.
274 Returns:
275 Raw HTTP response. Expected success: HTTP 201.
277 Raises:
278 RWSAuthenticationError: On HTTP 401.
279 RWSNotFoundError: On HTTP 404.
280 RWSHTTPError: On any other HTTP >= 400.
281 # ABB codes: BAD_REQUEST(400)
283 Example:
284 ```python
285 >>> await subscribe_controller_state(client)
286 <Response [201]>
287 ```
288 """
289 return await client.post(
290 "/subscription",
291 data={
292 k: v
293 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
294 if v is not None
295 },
296 )
299async def get_operation_mode(client: RWSClient) -> httpx.Response:
300 """
301 Get Operation Mode.
303 Route: ``GET /rw/panel/opmode``
304 ABB constraints: Not supported in bootserver mode
306 Args:
307 client: Open RWSClient instance.
309 Returns:
310 Raw HTTP response. Expected success: HTTP 200.
312 Raises:
313 RWSAuthenticationError: On HTTP 401.
314 RWSNotFoundError: On HTTP 404.
315 RWSHTTPError: On any other HTTP >= 400.
316 # ABB codes: BAD_REQUEST(400)
318 Example:
319 ```python
320 >>> await get_operation_mode(client)
321 <Response [200]>
322 ```
323 """
324 return await client.get("/rw/panel/opmode")
327async def get_operation_mode_actions(
328 client: RWSClient,
329 action: str | None = None,
330) -> httpx.Response:
331 """
332 Get Operation Mode Actions.
334 Route: ``GET /rw/panel/opmode``
335 ABB constraints: Not supported in bootserver mode
337 Args:
338 client: Open RWSClient instance.
339 action: Query parameter. Optional.
341 Returns:
342 Raw HTTP response. Expected success: HTTP 200.
344 Raises:
345 RWSAuthenticationError: On HTTP 401.
346 RWSNotFoundError: On HTTP 404.
347 RWSHTTPError: On any other HTTP >= 400.
348 # ABB codes: BAD_REQUEST(400)
350 Example:
351 ```python
352 >>> await get_operation_mode_actions(client)
353 <Response [200]>
354 ```
355 """
356 return await client.get(
357 "/rw/panel/opmode",
358 params={k: v for k, v in {"action": action}.items() if v is not None},
359 )
362async def subscribe_operation_mode(
363 client: RWSClient,
364 identifier: str | None = None,
365 identifier_p: str | None = None,
366) -> httpx.Response:
367 """
368 Subscribe Operation Mode.
370 Route: ``POST /subscription``
371 ABB constraints: Not supported in bootserver mode
373 Args:
374 client: Open RWSClient instance.
375 identifier: Body parameter. Optional.
376 identifier_p: Body parameter. Optional.
378 Returns:
379 Raw HTTP response. Expected success: HTTP 201.
381 Raises:
382 RWSAuthenticationError: On HTTP 401.
383 RWSNotFoundError: On HTTP 404.
384 RWSHTTPError: On any other HTTP >= 400.
385 # ABB codes: BAD_REQUEST(400)
387 Example:
388 ```python
389 >>> await subscribe_operation_mode(client)
390 <Response [201]>
391 ```
392 """
393 return await client.post(
394 "/subscription",
395 data={
396 k: v
397 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
398 if v is not None
399 },
400 )
403async def post_acknowledgement_for_operation_mode(
404 client: RWSClient,
405 action: str | None = None,
406 opmode: str | None = None,
407) -> httpx.Response:
408 """
409 Acknowledgement for Operation Mode.
411 Route: ``POST /rw/panel/opmode``
412 ABB constraints: Client should have Local Client previliges to execute the functionality.
413 Auto acknowledgement option should be deactivated. Not supported in bootserver mode.
415 Args:
416 client: Open RWSClient instance.
417 action: Query parameter. Optional.
418 opmode: Body parameter. Optional.
420 Returns:
421 Raw HTTP response. Expected success: HTTP 204.
423 Raises:
424 RWSAuthenticationError: On HTTP 401.
425 RWSNotFoundError: On HTTP 404.
426 RWSHTTPError: On any other HTTP >= 400.
427 # ABB codes: BAD_REQUEST (400)
429 Example:
430 ```python
431 >>> await post_acknowledgement_for_operation_mode(client)
432 <Response [204]>
433 ```
434 """
435 return await client.post(
436 "/rw/panel/opmode",
437 params={k: v for k, v in {"action": action}.items() if v is not None},
438 data={k: v for k, v in {"opmode": opmode}.items() if v is not None},
439 )
442async def get_operation_mode_lock_status(
443 client: RWSClient,
444 resource: str | None = None,
445) -> httpx.Response:
446 """
447 Get Operation Mode Lock Status.
449 Route: ``GET /rw/panel/opmode``
450 ABB constraints: Not supported in bootserver mode
452 Args:
453 client: Open RWSClient instance.
454 resource: Query parameter. Optional.
456 Returns:
457 Raw HTTP response. Expected success: HTTP 200.
459 Raises:
460 RWSAuthenticationError: On HTTP 401.
461 RWSNotFoundError: On HTTP 404.
462 RWSHTTPError: On any other HTTP >= 400.
463 # ABB codes: BAD_REQUEST(400)
465 Example:
466 ```python
467 >>> await get_operation_mode_lock_status(client)
468 <Response [200]>
469 ```
470 """
471 return await client.get(
472 "/rw/panel/opmode",
473 params={k: v for k, v in {"resource": resource}.items() if v is not None},
474 )
477async def post_lock_operation_mode_selection(
478 client: RWSClient,
479 action: str | None = None,
480 pin: str | None = None,
481 permanent: str | None = None,
482) -> httpx.Response:
483 """
484 Lock operation mode selection..
486 Route: ``POST /rw/panel/opmode``
487 ABB constraints: Not supported in bootserver mode. UAS_GRANT "Lock saftey controller config"
488 is needed to lock/unlock. For permenant lock/unlock "Key-less mode selector" UAS_GRANT is
489 needed.
491 Args:
492 client: Open RWSClient instance.
493 action: Query parameter. Optional.
494 pin: Body parameter. Optional.
495 permanent: Body parameter. Optional.
497 Returns:
498 Raw HTTP response. Expected success: HTTP 204.
500 Raises:
501 RWSAuthenticationError: On HTTP 401.
502 RWSNotFoundError: On HTTP 404.
503 RWSHTTPError: On any other HTTP >= 400.
504 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403)
506 Example:
507 ```python
508 >>> await post_lock_operation_mode_selection(client)
509 <Response [204]>
510 ```
511 """
512 return await client.post(
513 "/rw/panel/opmode",
514 params={k: v for k, v in {"action": action}.items() if v is not None},
515 data={k: v for k, v in {"pin": pin, "permanent": permanent}.items() if v is not None},
516 )
519async def post_unlock_operation_mode_selection(
520 client: RWSClient,
521 action: str | None = None,
522 pin: str | None = None,
523) -> httpx.Response:
524 """
525 Unlock operation mode selection..
527 Route: ``POST /rw/panel/opmode``
528 ABB constraints: Not supported in bootserver mode. UAS_GRANT "Lock saftey controller config"
529 is needed to lock/unlock. For permenant lock/unlock "Key-less mode selector" UAS_GRANT is
530 needed.
532 Args:
533 client: Open RWSClient instance.
534 action: Query parameter. Optional.
535 pin: Body parameter. Optional.
537 Returns:
538 Raw HTTP response. Expected success: HTTP 204.
540 Raises:
541 RWSAuthenticationError: On HTTP 401.
542 RWSNotFoundError: On HTTP 404.
543 RWSHTTPError: On any other HTTP >= 400.
544 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403)
546 Example:
547 ```python
548 >>> await post_unlock_operation_mode_selection(client)
549 <Response [204]>
550 ```
551 """
552 return await client.post(
553 "/rw/panel/opmode",
554 params={k: v for k, v in {"action": action}.items() if v is not None},
555 data={k: v for k, v in {"pin": pin}.items() if v is not None},
556 )
559async def get_speed_ratio(client: RWSClient) -> httpx.Response:
560 """
561 Get Speed Ratio.
563 Route: ``GET /rw/panel/speedratio``
564 ABB constraints: Not supported in bootserver mode
566 Args:
567 client: Open RWSClient instance.
569 Returns:
570 Raw HTTP response. Expected success: HTTP 200.
572 Raises:
573 RWSAuthenticationError: On HTTP 401.
574 RWSNotFoundError: On HTTP 404.
575 RWSHTTPError: On any other HTTP >= 400.
576 # ABB codes: BAD_REQUEST (400)
578 Example:
579 ```python
580 >>> await get_speed_ratio(client)
581 <Response [200]>
582 ```
583 """
584 return await client.get("/rw/panel/speedratio")
587async def get_speed_ratio_actions(
588 client: RWSClient,
589 action: str | None = None,
590) -> httpx.Response:
591 """
592 Get Speed Ratio Actions.
594 Route: ``GET /rw/panel/speedratio``
595 ABB constraints: Not supported in bootserver mode
597 Args:
598 client: Open RWSClient instance.
599 action: Query parameter. Optional.
601 Returns:
602 Raw HTTP response. Expected success: HTTP 200.
604 Raises:
605 RWSAuthenticationError: On HTTP 401.
606 RWSNotFoundError: On HTTP 404.
607 RWSHTTPError: On any other HTTP >= 400.
608 # ABB codes: BAD_REQUEST(400)
610 Example:
611 ```python
612 >>> await get_speed_ratio_actions(client)
613 <Response [200]>
614 ```
615 """
616 return await client.get(
617 "/rw/panel/speedratio",
618 params={k: v for k, v in {"action": action}.items() if v is not None},
619 )
622async def set_speed_ratio(
623 client: RWSClient,
624 action: str | None = None,
625 speed_ratio: str | None = None,
626) -> httpx.Response:
627 """
628 Set Speed Ratio.
630 Route: ``POST /rw/panel/speedratio``
631 ABB constraints: Only supported in auto mode. Not supported in bootserver mode
633 Args:
634 client: Open RWSClient instance.
635 action: Query parameter. Optional.
636 speed_ratio: Body parameter. Optional.
638 Returns:
639 Raw HTTP response. Expected success: HTTP 204.
641 Raises:
642 RWSAuthenticationError: On HTTP 401.
643 RWSNotFoundError: On HTTP 404.
644 RWSHTTPError: On any other HTTP >= 400.
645 # ABB codes: BAD_REQUEST (400), UNSUPPORTED_MEDIA (415), FORBIDDEN (403)
647 Example:
648 ```python
649 >>> await set_speed_ratio(client)
650 <Response [204]>
651 ```
652 """
653 return await client.post(
654 "/rw/panel/speedratio",
655 params={k: v for k, v in {"action": action}.items() if v is not None},
656 data={k: v for k, v in {"speed_ratio": speed_ratio}.items() if v is not None},
657 )
660async def subscribe_speed_ratio(
661 client: RWSClient,
662 identifier: str | None = None,
663 identifier_p: str | None = None,
664) -> httpx.Response:
665 """
666 Subscribe Speed Ratio.
668 Route: ``POST /subscription``
669 ABB constraints: Not supported in bootserver mode
671 Args:
672 client: Open RWSClient instance.
673 identifier: Body parameter. Optional.
674 identifier_p: Body parameter. Optional.
676 Returns:
677 Raw HTTP response. Expected success: HTTP 201.
679 Raises:
680 RWSAuthenticationError: On HTTP 401.
681 RWSNotFoundError: On HTTP 404.
682 RWSHTTPError: On any other HTTP >= 400.
683 # ABB codes: BAD_REQUEST(400)
685 Example:
686 ```python
687 >>> await subscribe_speed_ratio(client)
688 <Response [201]>
689 ```
690 """
691 return await client.post(
692 "/subscription",
693 data={
694 k: v
695 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
696 if v is not None
697 },
698 )
701async def get_collision_detection_state(client: RWSClient) -> httpx.Response:
702 """
703 Get Collision Detection State.
705 Route: ``GET /rw/panel/coldetstate``
706 ABB constraints: Not supported in bootserver mode
708 Args:
709 client: Open RWSClient instance.
711 Returns:
712 Raw HTTP response. Expected success: HTTP 200.
714 Raises:
715 RWSAuthenticationError: On HTTP 401.
716 RWSNotFoundError: On HTTP 404.
717 RWSHTTPError: On any other HTTP >= 400.
718 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404)
720 Example:
721 ```python
722 >>> await get_collision_detection_state(client)
723 <Response [200]>
724 ```
725 """
726 return await client.get("/rw/panel/coldetstate")
729async def get_collision_detection_state_actions(
730 client: RWSClient,
731 action: str | None = None,
732) -> httpx.Response:
733 """
734 Get Collision Detection State Actions.
736 Route: ``GET /rw/panel/coldetstate``
737 ABB constraints: Not supported in bootserver mode
739 Args:
740 client: Open RWSClient instance.
741 action: Query parameter. Optional.
743 Returns:
744 Raw HTTP response. Expected success: HTTP 200.
746 Raises:
747 RWSAuthenticationError: On HTTP 401.
748 RWSNotFoundError: On HTTP 404.
749 RWSHTTPError: On any other HTTP >= 400.
750 # ABB codes: BAD_REQUEST(400)
752 Example:
753 ```python
754 >>> await get_collision_detection_state_actions(client)
755 <Response [200]>
756 ```
757 """
758 return await client.get(
759 "/rw/panel/coldetstate",
760 params={k: v for k, v in {"action": action}.items() if v is not None},
761 )
764async def subscribe_on_collision_detection_state(
765 client: RWSClient,
766 identifier: str | None = None,
767 identifier_p: str | None = None,
768) -> httpx.Response:
769 """
770 Subscribe on Collision Detection State.
772 Route: ``POST /subscription``
773 ABB constraints: Not supported in bootserver mode
775 Args:
776 client: Open RWSClient instance.
777 identifier: Body parameter. Optional.
778 identifier_p: Body parameter. Optional.
780 Returns:
781 Raw HTTP response. Expected success: HTTP 201.
783 Raises:
784 RWSAuthenticationError: On HTTP 401.
785 RWSNotFoundError: On HTTP 404.
786 RWSHTTPError: On any other HTTP >= 400.
787 # ABB codes: BAD_REQUEST(400)
789 Example:
790 ```python
791 >>> await subscribe_on_collision_detection_state(client)
792 <Response [201]>
793 ```
794 """
795 return await client.post(
796 "/subscription",
797 data={
798 k: v
799 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
800 if v is not None
801 },
802 )