Coverage for abb_rws_client_python_rw6/rws/dipc.py: 100%
23 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 → DIPC service → Get DIPC 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_dipc_resources(client: RWSClient) -> httpx.Response:
20 """
21 Get DIPC Resources.
23 Route: ``GET /rw/dipc``
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_dipc_resources(client)
41 <Response [200]>
42 ```
43 """
44 return await client.get("/rw/dipc")
47async def get_dipc_actions(client: RWSClient) -> httpx.Response:
48 """
49 Get DIPC Actions.
51 Route: ``GET /rw/dipc``
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_dipc_actions(client)
69 <Response [200]>
70 ```
71 """
72 return await client.get("/rw/dipc")
75async def create_queue(
76 client: RWSClient,
77 action: str | None = None,
78) -> httpx.Response:
79 """
80 Create a queue.
82 Route: ``POST /rw/dipc``
83 ABB constraints: Not supported in bootserver mode
85 Args:
86 client: Open RWSClient instance.
87 action: Query parameter. Optional.
89 Returns:
90 Raw HTTP response. Expected success: HTTP 201.
92 Raises:
93 RWSAuthenticationError: On HTTP 401.
94 RWSNotFoundError: On HTTP 404.
95 RWSHTTPError: On any other HTTP >= 400.
96 # ABB codes: BAD_REQUEST(400)
98 Example:
99 ```python
100 >>> await create_queue(client)
101 <Response [201]>
102 ```
103 """
104 return await client.post(
105 "/rw/dipc",
106 params={k: v for k, v in {"action": action}.items() if v is not None},
107 data={},
108 )
111async def get_dipc_queue(
112 client: RWSClient,
113 queue_name: str,
114) -> httpx.Response:
115 """
116 Get DIPC Queue.
118 Route: ``GET /rw/dipc/{queue-name}``
119 ABB constraints: Not supported in bootserver mode
121 Args:
122 client: Open RWSClient instance.
123 queue_name: URL path parameter.
125 Returns:
126 Raw HTTP response. Expected success: HTTP 200.
128 Raises:
129 RWSAuthenticationError: On HTTP 401.
130 RWSNotFoundError: On HTTP 404.
131 RWSHTTPError: On any other HTTP >= 400.
132 # ABB codes: BAD REQUEST(400)
134 Example:
135 ```python
136 >>> await get_dipc_queue(client, "queue_name_value")
137 <Response [200]>
138 ```
139 """
140 return await client.get(f"/rw/dipc/{queue_name}")
143async def get_dipc_queue_actions(
144 client: RWSClient,
145 queue_name: str,
146 action: str | None = None,
147) -> httpx.Response:
148 """
149 Get DIPC Queue Actions.
151 Route: ``GET /rw/dipc/{queue-name}``
152 ABB constraints: Not supported in bootserver mode
154 Args:
155 client: Open RWSClient instance.
156 queue_name: URL path parameter.
157 action: Query parameter. Optional.
159 Returns:
160 Raw HTTP response. Expected success: HTTP 200.
162 Raises:
163 RWSAuthenticationError: On HTTP 401.
164 RWSNotFoundError: On HTTP 404.
165 RWSHTTPError: On any other HTTP >= 400.
166 # ABB codes: BAD REQUEST(400)
168 Example:
169 ```python
170 >>> await get_dipc_queue_actions(client, "queue_name_value")
171 <Response [200]>
172 ```
173 """
174 return await client.get(
175 f"/rw/dipc/{queue_name}",
176 params={k: v for k, v in {"action": action}.items() if v is not None},
177 )
180async def post_send_message(
181 client: RWSClient,
182 queue_name: str,
183 action: str | None = None,
184) -> httpx.Response:
185 """
186 Send message.
188 Route: ``POST /rw/dipc/{queue-name}``
189 ABB constraints: Not supported in bootserver mode
191 Args:
192 client: Open RWSClient instance.
193 queue_name: URL path parameter.
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 post_send_message(client, "queue_name_value")
208 <Response [200]>
209 ```
210 """
211 return await client.post(
212 f"/rw/dipc/{queue_name}",
213 params={k: v for k, v in {"action": action}.items() if v is not None},
214 data={},
215 )
218async def get_read_message(
219 client: RWSClient,
220 queue_name: str,
221 action: str | None = None,
222 timeout: str | None = None,
223) -> httpx.Response:
224 """
225 Read message.
227 Route: ``GET /rw/dipc/{queue-name}``
228 ABB constraints: Not supported in bootserver mode.
230 Args:
231 client: Open RWSClient instance.
232 queue_name: URL path parameter.
233 action: Query parameter. Optional.
234 timeout: Query parameter. Optional.
236 Returns:
237 Raw HTTP response. Expected success: HTTP 200.
239 Raises:
240 RWSAuthenticationError: On HTTP 401.
241 RWSNotFoundError: On HTTP 404.
242 RWSHTTPError: On any other HTTP >= 400.
243 # ABB codes: BAD_REQUEST (400)
245 Example:
246 ```python
247 >>> await get_read_message(client, "queue_name_value")
248 <Response [200]>
249 ```
250 """
251 return await client.get(
252 f"/rw/dipc/{queue_name}",
253 params={k: v for k, v in {"action": action, "timeout": timeout}.items() if v is not None},
254 )
257async def delete_dipc_queue(
258 client: RWSClient,
259 queue_name: str,
260) -> httpx.Response:
261 """
262 Delete DIPC Queue.
264 Route: ``DELETE /rw/dipc/{queue-name}``
265 ABB constraints: Not supported in bootserver mode User can delete DIPC queue only if the
266 queue is created by the same user
268 Args:
269 client: Open RWSClient instance.
270 queue_name: URL path parameter.
272 Returns:
273 Raw HTTP response. Expected success: HTTP 204.
275 Raises:
276 RWSAuthenticationError: On HTTP 401.
277 RWSNotFoundError: On HTTP 404.
278 RWSHTTPError: On any other HTTP >= 400.
279 # ABB codes: BAD REQUEST(400)
281 Example:
282 ```python
283 >>> await delete_dipc_queue(client, "queue_name_value")
284 <Response [204]>
285 ```
286 """
287 return await client.delete(f"/rw/dipc/{queue_name}")
290async def subscribe_dipc_queue(
291 client: RWSClient,
292 identifier: str | None = None,
293 identifier_p: str | None = None,
294) -> httpx.Response:
295 """
296 Subscribe DIPC Queue.
298 Route: ``POST /subscription``
299 ABB constraints: Not supported in bootserver mode
301 Args:
302 client: Open RWSClient instance.
303 identifier: Body parameter. Optional.
304 identifier_p: Body parameter. Optional.
306 Returns:
307 Raw HTTP response. Expected success: HTTP 201.
309 Raises:
310 RWSAuthenticationError: On HTTP 401.
311 RWSNotFoundError: On HTTP 404.
312 RWSHTTPError: On any other HTTP >= 400.
313 # ABB codes: BAD REQUEST(400)
315 Example:
316 ```python
317 >>> await subscribe_dipc_queue(client)
318 <Response [201]>
319 ```
320 """
321 return await client.post(
322 "/subscription",
323 data={
324 k: v
325 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
326 if v is not None
327 },
328 )
331async def subscribe_dipc_queue_without_reading_message(
332 client: RWSClient,
333 identifier: str | None = None,
334 identifier_p: str | None = None,
335) -> httpx.Response:
336 """
337 Subscribe DIPC Queue without reading message.
339 Route: ``POST /subscription``
341 Args:
342 client: Open RWSClient instance.
343 identifier: Body parameter. Optional.
344 identifier_p: Body parameter. Optional.
346 Returns:
347 Raw HTTP response. Expected success: HTTP 201.
349 Raises:
350 RWSAuthenticationError: On HTTP 401.
351 RWSNotFoundError: On HTTP 404.
352 RWSHTTPError: On any other HTTP >= 400.
353 # ABB codes: BAD REQUEST(400)
355 Example:
356 ```python
357 >>> await subscribe_dipc_queue_without_reading_message(client)
358 <Response [201]>
359 ```
360 """
361 return await client.post(
362 "/subscription",
363 data={
364 k: v
365 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
366 if v is not None
367 },
368 )