Coverage for abb_rws_client_python_rw6/rws/system.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 → System service → System Information
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_system_information(client: RWSClient) -> httpx.Response:
20 """
21 System Information.
23 Route: ``GET /rw/system``
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_system_information(client)
41 <Response [200]>
42 ```
43 """
44 return await client.get("/rw/system")
47async def get_robot_type(client: RWSClient) -> httpx.Response:
48 """
49 Get robot type.
51 Route: ``GET /rw/system/robottype``
52 ABB constraints: Not supported in bootserver mode. The API supports only ABB standard robots.
53 Positioners, track motion etc. are not supported. In case, there is no ABB standard
54 robots, NO_CONTENT will be returned.
56 Args:
57 client: Open RWSClient instance.
59 Returns:
60 Raw HTTP response. Expected success: HTTP 200.
62 Raises:
63 RWSAuthenticationError: On HTTP 401.
64 RWSNotFoundError: On HTTP 404.
65 RWSHTTPError: On any other HTTP >= 400.
66 # ABB codes: Robot controller errors, see
68 Example:
69 ```python
70 >>> await get_robot_type(client)
71 <Response [200]>
72 ```
73 """
74 return await client.get("/rw/system/robottype")
77async def get_system_options(client: RWSClient) -> httpx.Response:
78 """
79 System Options.
81 Route: ``GET /rw/system/options``
82 ABB constraints: Not supported in bootserver mode
84 Args:
85 client: Open RWSClient instance.
87 Returns:
88 Raw HTTP response. Expected success: HTTP 200.
90 Raises:
91 RWSAuthenticationError: On HTTP 401.
92 RWSNotFoundError: On HTTP 404.
93 RWSHTTPError: On any other HTTP >= 400.
94 # ABB codes: BAD_REQUEST(400)
96 Example:
97 ```python
98 >>> await get_system_options(client)
99 <Response [200]>
100 ```
101 """
102 return await client.get("/rw/system/options")
105async def get_system_energy_actions(
106 client: RWSClient,
107 action: str | None = None,
108) -> httpx.Response:
109 """
110 Get System Energy Actions.
112 Route: ``GET /rw/system/energy``
113 ABB constraints: Not supported in bootserver mode
115 Args:
116 client: Open RWSClient instance.
117 action: Query parameter. Optional.
119 Returns:
120 Raw HTTP response. Expected success: HTTP 200.
122 Raises:
123 RWSAuthenticationError: On HTTP 401.
124 RWSNotFoundError: On HTTP 404.
125 RWSHTTPError: On any other HTTP >= 400.
126 # ABB codes: BAD_REQUEST(400)
128 Example:
129 ```python
130 >>> await get_system_energy_actions(client)
131 <Response [200]>
132 ```
133 """
134 return await client.get(
135 "/rw/system/energy",
136 params={k: v for k, v in {"action": action}.items() if v is not None},
137 )
140async def get_system_energy_info_change_count(
141 client: RWSClient,
142 resource: str | None = None,
143) -> httpx.Response:
144 """
145 System Energy Info Change Count.
147 Route: ``GET /rw/system/energy``
148 ABB constraints: Not supported in bootserver mode
150 Args:
151 client: Open RWSClient instance.
152 resource: Query parameter. Optional.
154 Returns:
155 Raw HTTP response. Expected success: HTTP 200.
157 Raises:
158 RWSAuthenticationError: On HTTP 401.
159 RWSNotFoundError: On HTTP 404.
160 RWSHTTPError: On any other HTTP >= 400.
161 # ABB codes: BAD_REQUEST(400)
163 Example:
164 ```python
165 >>> await get_system_energy_info_change_count(client)
166 <Response [200]>
167 ```
168 """
169 return await client.get(
170 "/rw/system/energy",
171 params={k: v for k, v in {"resource": resource}.items() if v is not None},
172 )
175async def reset_accumulated_energy(
176 client: RWSClient,
177 action: str | None = None,
178) -> httpx.Response:
179 """
180 Reset Accumulated Energy.
182 Route: ``POST /rw/system/energy``
183 ABB constraints: Not supported in bootserver mode
185 Args:
186 client: Open RWSClient instance.
187 action: Query parameter. Optional.
189 Returns:
190 Raw HTTP response. Expected success: HTTP 204.
192 Raises:
193 RWSAuthenticationError: On HTTP 401.
194 RWSNotFoundError: On HTTP 404.
195 RWSHTTPError: On any other HTTP >= 400.
196 # ABB codes: BAD_REQUEST(400),NOT_FOUND(404)
198 Example:
199 ```python
200 >>> await reset_accumulated_energy(client)
201 <Response [204]>
202 ```
203 """
204 return await client.post(
205 "/rw/system/energy",
206 params={k: v for k, v in {"action": action}.items() if v is not None},
207 data={},
208 )
211async def get_system_energy(client: RWSClient) -> httpx.Response:
212 """
213 System Energy.
215 Route: ``GET /rw/system/energy``
216 ABB constraints: Not supported in bootserver mode
218 Args:
219 client: Open RWSClient instance.
221 Returns:
222 Raw HTTP response. Expected success: HTTP 200.
224 Raises:
225 RWSAuthenticationError: On HTTP 401.
226 RWSNotFoundError: On HTTP 404.
227 RWSHTTPError: On any other HTTP >= 400.
228 # ABB codes: BAD_REQUEST(400)
230 Example:
231 ```python
232 >>> await get_system_energy(client)
233 <Response [200]>
234 ```
235 """
236 return await client.get("/rw/system/energy")
239async def subscribe_on_system_energy_changes(
240 client: RWSClient,
241 identifier: str | None = None,
242 identifier_p: str | None = None,
243) -> httpx.Response:
244 """
245 Subscribe on System Energy Changes..
247 Route: ``POST /subscription``
248 ABB constraints: Not supported in bootserver mode
250 Args:
251 client: Open RWSClient instance.
252 identifier: Body parameter. Optional.
253 identifier_p: Body parameter. Optional.
255 Returns:
256 Raw HTTP response. Expected success: HTTP 201.
258 Raises:
259 RWSAuthenticationError: On HTTP 401.
260 RWSNotFoundError: On HTTP 404.
261 RWSHTTPError: On any other HTTP >= 400.
262 # ABB codes: UNSUPPORTED_MEDIA(415),BAD_REQUEST(400)
264 Example:
265 ```python
266 >>> await subscribe_on_system_energy_changes(client)
267 <Response [201]>
268 ```
269 """
270 return await client.post(
271 "/subscription",
272 data={
273 k: v
274 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
275 if v is not None
276 },
277 )
280async def get_system_robotware_license(client: RWSClient) -> httpx.Response:
281 """
282 Get System Robotware License.
284 Route: ``GET /rw/system/license``
285 ABB constraints: Not supported in bootserver mode.
287 Args:
288 client: Open RWSClient instance.
290 Returns:
291 Raw HTTP response. Expected success: HTTP 200.
293 Raises:
294 RWSAuthenticationError: On HTTP 401.
295 RWSNotFoundError: On HTTP 404.
296 RWSHTTPError: On any other HTTP >= 400.
297 # ABB codes: BAD_REQUEST(400)
299 Example:
300 ```python
301 >>> await get_system_robotware_license(client)
302 <Response [200]>
303 ```
304 """
305 return await client.get("/rw/system/license")
308async def get_installed_products(
309 client: RWSClient,
310 name: str | None = None,
311) -> httpx.Response:
312 """
313 Get Installed Products.
315 Route: ``GET /rw/system/products``
316 ABB constraints: In case, there is no products, NO_CONTENT(204) will be returned.
318 Args:
319 client: Open RWSClient instance.
320 name: Query parameter. Optional.
322 Returns:
323 Raw HTTP response. Expected success: HTTP 200.
325 Raises:
326 RWSAuthenticationError: On HTTP 401.
327 RWSNotFoundError: On HTTP 404.
328 RWSHTTPError: On any other HTTP >= 400.
329 # ABB codes: BAD_REQUEST(400)
331 Example:
332 ```python
333 >>> await get_installed_products(client)
334 <Response [200]>
335 ```
336 """
337 return await client.get(
338 "/rw/system/products",
339 params={k: v for k, v in {"name": name}.items() if v is not None},
340 )