Coverage for abb_rws_client_python_rw6/rws/rapid/taskpanel.py: 100%

7 statements  

« 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 taskpanel 

6 

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""" 

11 

12from __future__ import annotations 

13 

14import httpx 

15 

16from abb_rws_client_python_rw6.core.client import RWSClient 

17 

18 

19async def get_user_modify_from_taskpanel(client: RWSClient) -> httpx.Response: 

20 """ 

21 Get user modify from taskpanel. 

22 

23 Route: ``GET /rw/rapid/taskselection`` 

24 ABB constraints: Not supported in bootserver mode 

25 

26 Args: 

27 client: Open RWSClient instance. 

28 

29 Returns: 

30 Raw HTTP response. Expected success: HTTP 200. 

31 

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) , see 

37 

38 Example: 

39 ```python 

40 >>> await get_user_modify_from_taskpanel(client) 

41 <Response [200]> 

42 ``` 

43 """ 

44 return await client.get("/rw/rapid/taskselection") 

45 

46 

47async def subscribe_on_tasks_panel_change( 

48 client: RWSClient, 

49 identifier: str | None = None, 

50 identifier_p: str | None = None, 

51) -> httpx.Response: 

52 """ 

53 Subscribe on Tasks panel change. 

54 

55 Route: ``POST /subscription`` 

56 ABB constraints: Not supported in bootserver mode 

57 

58 Args: 

59 client: Open RWSClient instance. 

60 identifier: Body parameter. Optional. 

61 identifier_p: Body parameter. Optional. 

62 

63 Returns: 

64 Raw HTTP response. Expected success: HTTP 201. 

65 

66 Raises: 

67 RWSAuthenticationError: On HTTP 401. 

68 RWSNotFoundError: On HTTP 404. 

69 RWSHTTPError: On any other HTTP >= 400. 

70 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415) 

71 

72 Example: 

73 ```python 

74 >>> await subscribe_on_tasks_panel_change(client) 

75 <Response [201]> 

76 ``` 

77 """ 

78 return await client.post( 

79 "/subscription", 

80 data={ 

81 k: v 

82 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items() 

83 if v is not None 

84 }, 

85 )