Coverage for abb_rws_client_python_rw6/rws/users/rmmp.py: 100%
17 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: User Service → Operations on RMMP → Get RMMP state
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_rmmp_state(client: RWSClient) -> httpx.Response:
20 """
21 Get RMMP state.
23 Route: ``GET /users/rmmp``
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.
37 Example:
38 ```python
39 >>> await get_rmmp_state(client)
40 <Response [200]>
41 ```
42 """
43 return await client.get("/users/rmmp")
46async def get_rmmp_actions(
47 client: RWSClient,
48 action: str | None = None,
49) -> httpx.Response:
50 """
51 Get RMMP Actions.
53 Route: ``GET /users/rmmp``
54 ABB constraints: Not Supported in bootserver mode
56 Args:
57 client: Open RWSClient instance.
58 action: Query parameter. Optional.
60 Returns:
61 Raw HTTP response. Expected success: HTTP 200.
63 Raises:
64 RWSAuthenticationError: On HTTP 401.
65 RWSNotFoundError: On HTTP 404.
66 RWSHTTPError: On any other HTTP >= 400.
68 Example:
69 ```python
70 >>> await get_rmmp_actions(client)
71 <Response [200]>
72 ```
73 """
74 return await client.get(
75 "/users/rmmp",
76 params={k: v for k, v in {"action": action}.items() if v is not None},
77 )
80async def request_rmmp(client: RWSClient) -> httpx.Response:
81 """
82 Request RMMP.
84 Route: ``POST /users/rmmp``
85 ABB constraints: Not Supported in bootserver mode
87 Args:
88 client: Open RWSClient instance.
90 Returns:
91 Raw HTTP response. Expected success: HTTP 202.
93 Raises:
94 RWSAuthenticationError: On HTTP 401.
95 RWSNotFoundError: On HTTP 404.
96 RWSHTTPError: On any other HTTP >= 400.
97 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400)
99 Example:
100 ```python
101 >>> await request_rmmp(client)
102 <Response [202]>
103 ```
104 """
105 return await client.post(
106 "/users/rmmp",
107 data={},
108 )
111async def grant_or_deny_an_rmmp_request(
112 client: RWSClient,
113 action: str | None = None,
114) -> httpx.Response:
115 """
116 Grant or deny an RMMP request.
118 Route: ``POST /users/rmmp``
119 ABB constraints: Not Supported in bootserver mode
121 Args:
122 client: Open RWSClient instance.
123 action: Query parameter. Optional.
125 Returns:
126 Raw HTTP response. Expected success: HTTP 204.
128 Raises:
129 RWSAuthenticationError: On HTTP 401.
130 RWSNotFoundError: On HTTP 404.
131 RWSHTTPError: On any other HTTP >= 400.
132 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400)
134 Example:
135 ```python
136 >>> await grant_or_deny_an_rmmp_request(client)
137 <Response [204]>
138 ```
139 """
140 return await client.post(
141 "/users/rmmp",
142 params={k: v for k, v in {"action": action}.items() if v is not None},
143 data={},
144 )
147async def cancel_held_or_requested_rmmp(
148 client: RWSClient,
149 action: str | None = None,
150) -> httpx.Response:
151 """
152 Cancel held or requested RMMP.
154 Route: ``POST /users/rmmp``
155 ABB constraints: Not Supported in bootserver mode
157 Args:
158 client: Open RWSClient instance.
159 action: Query parameter. Optional.
161 Returns:
162 Raw HTTP response. Expected success: HTTP 204.
164 Raises:
165 RWSAuthenticationError: On HTTP 401.
166 RWSNotFoundError: On HTTP 404.
167 RWSHTTPError: On any other HTTP >= 400.
169 Example:
170 ```python
171 >>> await cancel_held_or_requested_rmmp(client)
172 <Response [204]>
173 ```
174 """
175 return await client.post(
176 "/users/rmmp",
177 params={k: v for k, v in {"action": action}.items() if v is not None},
178 data={},
179 )
182async def subscribe_on_rmmp_request_event(
183 client: RWSClient,
184 identifier: str | None = None,
185 identifier_p: str | None = None,
186) -> httpx.Response:
187 """
188 Subscribe on RMMP Request event.
190 Route: ``POST /subscription``
191 ABB constraints: Not supported in bootserver mode.
193 Args:
194 client: Open RWSClient instance.
195 identifier: Body parameter. Optional.
196 identifier_p: Body parameter. Optional.
198 Returns:
199 Raw HTTP response. Expected success: HTTP 201.
201 Raises:
202 RWSAuthenticationError: On HTTP 401.
203 RWSNotFoundError: On HTTP 404.
204 RWSHTTPError: On any other HTTP >= 400.
205 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400)
207 Example:
208 ```python
209 >>> await subscribe_on_rmmp_request_event(client)
210 <Response [201]>
211 ```
212 """
213 return await client.post(
214 "/subscription",
215 data={
216 k: v
217 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
218 if v is not None
219 },
220 )
223async def poll_for_rmmp_grant_status(client: RWSClient) -> httpx.Response:
224 """
225 Poll for RMMP grant status.
227 Route: ``GET /users/rmmp/poll``
228 ABB constraints: Not Supported in bootserver mode
230 Args:
231 client: Open RWSClient instance.
233 Returns:
234 Raw HTTP response. Expected success: HTTP 200.
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 poll_for_rmmp_grant_status(client)
245 <Response [200]>
246 ```
247 """
248 return await client.get("/users/rmmp/poll")