Coverage for abb_rws_client_python_rw6/rws/vision.py: 100%

39 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 → Integrated Vision (IV) Service → Get Vision Manager Resource 

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_vision_manager_resource(client: RWSClient) -> httpx.Response: 

20 """ 

21 Get Vision Manager Resource. 

22 

23 Route: ``GET /rw/vision`` 

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: NOT_FOUND(404) 

37 

38 Example: 

39 ```python 

40 >>> await get_vision_manager_resource(client) 

41 <Response [200]> 

42 ``` 

43 """ 

44 return await client.get("/rw/vision") 

45 

46 

47async def get_number_of_cameras_of_iv( 

48 client: RWSClient, 

49 resource: str | None = None, 

50) -> httpx.Response: 

51 """ 

52 Get Number of Cameras of IV. 

53 

54 Route: ``GET /rw/vision`` 

55 ABB constraints: Not supported in bootserver mode 

56 

57 Args: 

58 client: Open RWSClient instance. 

59 resource: Query parameter. Optional. 

60 

61 Returns: 

62 Raw HTTP response. Expected success: HTTP 200. 

63 

64 Raises: 

65 RWSAuthenticationError: On HTTP 401. 

66 RWSNotFoundError: On HTTP 404. 

67 RWSHTTPError: On any other HTTP >= 400. 

68 # ABB codes: BAD_REQUEST(400) 

69 

70 Example: 

71 ```python 

72 >>> await get_number_of_cameras_of_iv(client) 

73 <Response [200]> 

74 ``` 

75 """ 

76 return await client.get( 

77 "/rw/vision", 

78 params={k: v for k, v in {"resource": resource}.items() if v is not None}, 

79 ) 

80 

81 

82async def get_iv_camera_validity( 

83 client: RWSClient, 

84 resource: str | None = None, 

85 name: str | None = None, 

86) -> httpx.Response: 

87 """ 

88 Get IV Camera Validity. 

89 

90 Route: ``GET /rw/vision`` 

91 ABB constraints: Not supported in bootserver mode 

92 

93 Args: 

94 client: Open RWSClient instance. 

95 resource: Query parameter. Optional. 

96 name: Query parameter. Optional. 

97 

98 Returns: 

99 Raw HTTP response. Expected success: HTTP 200. 

100 

101 Raises: 

102 RWSAuthenticationError: On HTTP 401. 

103 RWSNotFoundError: On HTTP 404. 

104 RWSHTTPError: On any other HTTP >= 400. 

105 # ABB codes: BAD_REQUEST(400) 

106 

107 Example: 

108 ```python 

109 >>> await get_iv_camera_validity(client) 

110 <Response [200]> 

111 ``` 

112 """ 

113 return await client.get( 

114 "/rw/vision", 

115 params={k: v for k, v in {"resource": resource, "name": name}.items() if v is not None}, 

116 ) 

117 

118 

119async def get_vision_camera_resource_actions( 

120 client: RWSClient, 

121 action: str | None = None, 

122) -> httpx.Response: 

123 """ 

124 Get Vision (camera) Resource Actions. 

125 

126 Route: ``GET /rw/vision`` 

127 ABB constraints: Not supported in bootserver mode 

128 

129 Args: 

130 client: Open RWSClient instance. 

131 action: Query parameter. Optional. 

132 

133 Returns: 

134 Raw HTTP response. Expected success: HTTP 200. 

135 

136 Raises: 

137 RWSAuthenticationError: On HTTP 401. 

138 RWSNotFoundError: On HTTP 404. 

139 RWSHTTPError: On any other HTTP >= 400. 

140 # ABB codes: BAD_REQUEST(400) 

141 

142 Example: 

143 ```python 

144 >>> await get_vision_camera_resource_actions(client) 

145 <Response [200]> 

146 ``` 

147 """ 

148 return await client.get( 

149 "/rw/vision", 

150 params={k: v for k, v in {"action": action}.items() if v is not None}, 

151 ) 

152 

153 

154async def get_camera_jobname( 

155 client: RWSClient, 

156 resource: str | None = None, 

157 name: str | None = None, 

158) -> httpx.Response: 

159 """ 

160 Get Camera Jobname. 

161 

162 Route: ``GET /rw/vision`` 

163 ABB constraints: Not supported in bootserver mode 

164 

165 Args: 

166 client: Open RWSClient instance. 

167 resource: Query parameter. Optional. 

168 name: Query parameter. Optional. 

169 

170 Returns: 

171 Raw HTTP response. Expected success: HTTP 200. 

172 

173 Raises: 

174 RWSAuthenticationError: On HTTP 401. 

175 RWSNotFoundError: On HTTP 404. 

176 RWSHTTPError: On any other HTTP >= 400. 

177 # ABB codes: BAD_REQUEST(400) 

178 

179 Example: 

180 ```python 

181 >>> await get_camera_jobname(client) 

182 <Response [200]> 

183 ``` 

184 """ 

185 return await client.get( 

186 "/rw/vision", 

187 params={k: v for k, v in {"resource": resource, "name": name}.items() if v is not None}, 

188 ) 

189 

190 

191async def restart_camera( 

192 client: RWSClient, 

193 action: str | None = None, 

194 name: str | None = None, 

195) -> httpx.Response: 

196 """ 

197 Restart Camera. 

198 

199 Route: ``POST /rw/vision`` 

200 ABB constraints: Not supported in bootserver mode 

201 

202 Args: 

203 client: Open RWSClient instance. 

204 action: Query parameter. Optional. 

205 name: Body parameter. Optional. 

206 

207 Returns: 

208 Raw HTTP response. Expected success: HTTP 204. 

209 

210 Raises: 

211 RWSAuthenticationError: On HTTP 401. 

212 RWSNotFoundError: On HTTP 404. 

213 RWSHTTPError: On any other HTTP >= 400. 

214 # ABB codes: BAD_REQUEST(400) 

215 

216 Example: 

217 ```python 

218 >>> await restart_camera(client) 

219 <Response [204]> 

220 ``` 

221 """ 

222 return await client.post( 

223 "/rw/vision", 

224 params={k: v for k, v in {"action": action}.items() if v is not None}, 

225 data={k: v for k, v in {"name": name}.items() if v is not None}, 

226 ) 

227 

228 

229async def post_flash_led_of_camera( 

230 client: RWSClient, 

231 action: str | None = None, 

232 name: str | None = None, 

233) -> httpx.Response: 

234 """ 

235 Flash LED(s) of Camera. 

236 

237 Route: ``POST /rw/vision`` 

238 ABB constraints: Not supported in bootserver mode 

239 

240 Args: 

241 client: Open RWSClient instance. 

242 action: Query parameter. Optional. 

243 name: Body parameter. Optional. 

244 

245 Returns: 

246 Raw HTTP response. Expected success: HTTP 204. 

247 

248 Raises: 

249 RWSAuthenticationError: On HTTP 401. 

250 RWSNotFoundError: On HTTP 404. 

251 RWSHTTPError: On any other HTTP >= 400. 

252 # ABB codes: BAD_REQUEST(400) 

253 

254 Example: 

255 ```python 

256 >>> await post_flash_led_of_camera(client) 

257 <Response [204]> 

258 ``` 

259 """ 

260 return await client.post( 

261 "/rw/vision", 

262 params={k: v for k, v in {"action": action}.items() if v is not None}, 

263 data={k: v for k, v in {"name": name}.items() if v is not None}, 

264 ) 

265 

266 

267async def set_camera_state( 

268 client: RWSClient, 

269 action: str | None = None, 

270 name: str | None = None, 

271 state: str | None = None, 

272) -> httpx.Response: 

273 """ 

274 Set Camera State. 

275 

276 Route: ``POST /rw/vision`` 

277 ABB constraints: Not supported in bootserver mode 

278 

279 Args: 

280 client: Open RWSClient instance. 

281 action: Query parameter. Optional. 

282 name: Body parameter. Optional. 

283 state: Body parameter. Optional. 

284 

285 Returns: 

286 Raw HTTP response. Expected success: HTTP 204. 

287 

288 Raises: 

289 RWSAuthenticationError: On HTTP 401. 

290 RWSNotFoundError: On HTTP 404. 

291 RWSHTTPError: On any other HTTP >= 400. 

292 # ABB codes: BAD_REQUEST(400) 

293 

294 Example: 

295 ```python 

296 >>> await set_camera_state(client) 

297 <Response [204]> 

298 ``` 

299 """ 

300 return await client.post( 

301 "/rw/vision", 

302 params={k: v for k, v in {"action": action}.items() if v is not None}, 

303 data={k: v for k, v in {"name": name, "state": state}.items() if v is not None}, 

304 ) 

305 

306 

307async def post_refesh_the_camera( 

308 client: RWSClient, 

309 action: str | None = None, 

310) -> httpx.Response: 

311 """ 

312 Refesh the camera(s). 

313 

314 Route: ``POST /rw/vision`` 

315 ABB constraints: Not supported in bootserver mode 

316 

317 Args: 

318 client: Open RWSClient instance. 

319 action: Query parameter. Optional. 

320 

321 Returns: 

322 Raw HTTP response. Expected success: HTTP 204. 

323 

324 Raises: 

325 RWSAuthenticationError: On HTTP 401. 

326 RWSNotFoundError: On HTTP 404. 

327 RWSHTTPError: On any other HTTP >= 400. 

328 # ABB codes: BAD_REQUEST(400) 

329 

330 Example: 

331 ```python 

332 >>> await post_refesh_the_camera(client) 

333 <Response [204]> 

334 ``` 

335 """ 

336 return await client.post( 

337 "/rw/vision", 

338 params={k: v for k, v in {"action": action}.items() if v is not None}, 

339 data={}, 

340 ) 

341 

342 

343async def set_hostname_of_the_camera( 

344 client: RWSClient, 

345 action: str | None = None, 

346 name: str | None = None, 

347 host: str | None = None, 

348) -> httpx.Response: 

349 """ 

350 Set Hostname of the Camera. 

351 

352 Route: ``POST /rw/vision`` 

353 ABB constraints: A restart for the camera module is needed for the change to be visible. 

354 Switch Off and switch On the camera modeule. Not supported in bootserver mode 

355 

356 Args: 

357 client: Open RWSClient instance. 

358 action: Query parameter. Optional. 

359 name: Body parameter. Optional. 

360 host: Body parameter. Optional. 

361 

362 Returns: 

363 Raw HTTP response. Expected success: HTTP 204. 

364 

365 Raises: 

366 RWSAuthenticationError: On HTTP 401. 

367 RWSNotFoundError: On HTTP 404. 

368 RWSHTTPError: On any other HTTP >= 400. 

369 # ABB codes: BAD_REQUEST(400) 

370 

371 Example: 

372 ```python 

373 >>> await set_hostname_of_the_camera(client) 

374 <Response [204]> 

375 ``` 

376 """ 

377 return await client.post( 

378 "/rw/vision", 

379 params={k: v for k, v in {"action": action}.items() if v is not None}, 

380 data={k: v for k, v in {"name": name, "host": host}.items() if v is not None}, 

381 ) 

382 

383 

384async def set_camera_to_be_dhcp_client( 

385 client: RWSClient, 

386 action: str | None = None, 

387 name: str | None = None, 

388) -> httpx.Response: 

389 """ 

390 Set camera to be a DHCP client. 

391 

392 Route: ``POST /rw/vision`` 

393 ABB constraints: Not supported in bootserver mode Camera restart is required after DHCP 

394 settings 

395 

396 Args: 

397 client: Open RWSClient instance. 

398 action: Query parameter. Optional. 

399 name: Body parameter. Optional. 

400 

401 Returns: 

402 Raw HTTP response. Expected success: HTTP 204. 

403 

404 Raises: 

405 RWSAuthenticationError: On HTTP 401. 

406 RWSNotFoundError: On HTTP 404. 

407 RWSHTTPError: On any other HTTP >= 400. 

408 # ABB codes: BAD_REQUEST(400),FORBIDDEN(403),NOT_FOUND(404) 

409 

410 Example: 

411 ```python 

412 >>> await set_camera_to_be_dhcp_client(client) 

413 <Response [204]> 

414 ``` 

415 """ 

416 return await client.post( 

417 "/rw/vision", 

418 params={k: v for k, v in {"action": action}.items() if v is not None}, 

419 data={k: v for k, v in {"name": name}.items() if v is not None}, 

420 ) 

421 

422 

423async def set_camera_dns_settings( 

424 client: RWSClient, 

425 action: str | None = None, 

426 name: str | None = None, 

427 dns_server: str | None = None, 

428 dns_suffix: str | None = None, 

429) -> httpx.Response: 

430 """ 

431 Set Camera DNS Settings. 

432 

433 Route: ``POST /rw/vision`` 

434 ABB constraints: Not supported in bootserver mode Camera restart is required after DNS 

435 settings 

436 

437 Args: 

438 client: Open RWSClient instance. 

439 action: Query parameter. Optional. 

440 name: Body parameter. Optional. 

441 dns_server: Body parameter. Optional. 

442 dns_suffix: Body parameter. Optional. 

443 

444 Returns: 

445 Raw HTTP response. Expected success: HTTP 204. 

446 

447 Raises: 

448 RWSAuthenticationError: On HTTP 401. 

449 RWSNotFoundError: On HTTP 404. 

450 RWSHTTPError: On any other HTTP >= 400. 

451 # ABB codes: BAD_REQUEST(400),FORBIDDEN(403),NOT_FOUND(404) 

452 

453 Example: 

454 ```python 

455 >>> await set_camera_dns_settings(client) 

456 <Response [204]> 

457 ``` 

458 """ 

459 return await client.post( 

460 "/rw/vision", 

461 params={k: v for k, v in {"action": action}.items() if v is not None}, 

462 data={ 

463 k: v 

464 for k, v in {"name": name, "dns_server": dns_server, "dns_suffix": dns_suffix}.items() 

465 if v is not None 

466 }, 

467 ) 

468 

469 

470async def get_camera_status( 

471 client: RWSClient, 

472 resource: str | None = None, 

473 name: str | None = None, 

474) -> httpx.Response: 

475 """ 

476 Get Camera Status. 

477 

478 Route: ``GET /rw/vision`` 

479 ABB constraints: Not supported in bootserver mode 

480 

481 Args: 

482 client: Open RWSClient instance. 

483 resource: Query parameter. Optional. 

484 name: Query parameter. Optional. 

485 

486 Returns: 

487 Raw HTTP response. Expected success: HTTP 200. 

488 

489 Raises: 

490 RWSAuthenticationError: On HTTP 401. 

491 RWSNotFoundError: On HTTP 404. 

492 RWSHTTPError: On any other HTTP >= 400. 

493 # ABB codes: BAD_REQUEST(400) 

494 

495 Example: 

496 ```python 

497 >>> await get_camera_status(client) 

498 <Response [200]> 

499 ``` 

500 """ 

501 return await client.get( 

502 "/rw/vision", 

503 params={k: v for k, v in {"resource": resource, "name": name}.items() if v is not None}, 

504 ) 

505 

506 

507async def get_camera_info_using_index_of_the( 

508 client: RWSClient, 

509 resource: str | None = None, 

510 index: str | None = None, 

511) -> httpx.Response: 

512 """ 

513 Get Camera Info Using Index of the camera. 

514 

515 Route: ``GET /rw/vision`` 

516 ABB constraints: Not supported in bootserver mode 

517 

518 Args: 

519 client: Open RWSClient instance. 

520 resource: Query parameter. Optional. 

521 index: Query parameter. Optional. 

522 

523 Returns: 

524 Raw HTTP response. Expected success: HTTP 200. 

525 

526 Raises: 

527 RWSAuthenticationError: On HTTP 401. 

528 RWSNotFoundError: On HTTP 404. 

529 RWSHTTPError: On any other HTTP >= 400. 

530 # ABB codes: BAD_REQUEST(400) 

531 

532 Example: 

533 ```python 

534 >>> await get_camera_info_using_index_of_the(client) 

535 <Response [200]> 

536 ``` 

537 """ 

538 return await client.get( 

539 "/rw/vision", 

540 params={k: v for k, v in {"resource": resource, "index": index}.items() if v is not None}, 

541 ) 

542 

543 

544async def set_camera_name( 

545 client: RWSClient, 

546 action: str | None = None, 

547 index: str | None = None, 

548 name: str | None = None, 

549) -> httpx.Response: 

550 """ 

551 Set Camera Name. 

552 

553 Route: ``POST /rw/vision`` 

554 ABB constraints: Not supported in bootserver mode Restart the controller to aplly changes 

555 

556 Args: 

557 client: Open RWSClient instance. 

558 action: Query parameter. Optional. 

559 index: Body parameter. Optional. 

560 name: Body parameter. Optional. 

561 

562 Returns: 

563 Raw HTTP response. Expected success: HTTP 204. 

564 

565 Raises: 

566 RWSAuthenticationError: On HTTP 401. 

567 RWSNotFoundError: On HTTP 404. 

568 RWSHTTPError: On any other HTTP >= 400. 

569 # ABB codes: BAD_REQUEST(400) 

570 

571 Example: 

572 ```python 

573 >>> await set_camera_name(client) 

574 <Response [204]> 

575 ``` 

576 """ 

577 return await client.post( 

578 "/rw/vision", 

579 params={k: v for k, v in {"action": action}.items() if v is not None}, 

580 data={k: v for k, v in {"index": index, "name": name}.items() if v is not None}, 

581 ) 

582 

583 

584async def set_camera_user_credentials( 

585 client: RWSClient, 

586 action: str | None = None, 

587 index: str | None = None, 

588 user: str | None = None, 

589 password: str | None = None, 

590) -> httpx.Response: 

591 """ 

592 Set Camera User Credentials. 

593 

594 Route: ``POST /rw/vision`` 

595 ABB constraints: Not supported in bootserver mode Restart is required to be activated 

596 

597 Args: 

598 client: Open RWSClient instance. 

599 action: Query parameter. Optional. 

600 index: Body parameter. Optional. 

601 user: Body parameter. Optional. 

602 password: Body parameter. Optional. 

603 

604 Returns: 

605 Raw HTTP response. Expected success: HTTP 204. 

606 

607 Raises: 

608 RWSAuthenticationError: On HTTP 401. 

609 RWSNotFoundError: On HTTP 404. 

610 RWSHTTPError: On any other HTTP >= 400. 

611 # ABB codes: BAD_REQUEST(400) 

612 

613 Example: 

614 ```python 

615 >>> await set_camera_user_credentials(client) 

616 <Response [204]> 

617 ``` 

618 """ 

619 return await client.post( 

620 "/rw/vision", 

621 params={k: v for k, v in {"action": action}.items() if v is not None}, 

622 data={ 

623 k: v 

624 for k, v in {"index": index, "user": user, "password": password}.items() 

625 if v is not None 

626 }, 

627 ) 

628 

629 

630async def set_camera_ip_settings( 

631 client: RWSClient, 

632 action: str | None = None, 

633 name: str | None = None, 

634 address: str | None = None, 

635 netmask: str | None = None, 

636 gateway: str | None = None, 

637) -> httpx.Response: 

638 """ 

639 Set Camera IP Settings. 

640 

641 Route: ``POST /rw/vision`` 

642 ABB constraints: Not supported in bootserver mode. Restart the controller to apply IP 

643 settings. 

644 

645 Args: 

646 client: Open RWSClient instance. 

647 action: Query parameter. Optional. 

648 name: Body parameter. Optional. 

649 address: Body parameter. Optional. 

650 netmask: Body parameter. Optional. 

651 gateway: Body parameter. Optional. 

652 

653 Returns: 

654 Raw HTTP response. Expected success: HTTP 204. 

655 

656 Raises: 

657 RWSAuthenticationError: On HTTP 401. 

658 RWSNotFoundError: On HTTP 404. 

659 RWSHTTPError: On any other HTTP >= 400. 

660 # ABB codes: BAD_REQUEST(400),FORBIDDEN(403),NOT_FOUND(404) 

661 

662 Example: 

663 ```python 

664 >>> await set_camera_ip_settings(client) 

665 <Response [204]> 

666 ``` 

667 """ 

668 return await client.post( 

669 "/rw/vision", 

670 params={k: v for k, v in {"action": action}.items() if v is not None}, 

671 data={ 

672 k: v 

673 for k, v in { 

674 "name": name, 

675 "address": address, 

676 "netmask": netmask, 

677 "gateway": gateway, 

678 }.items() 

679 if v is not None 

680 }, 

681 ) 

682 

683 

684async def get_iv_camera_info( 

685 client: RWSClient, 

686 resource: str | None = None, 

687 name: str | None = None, 

688) -> httpx.Response: 

689 """ 

690 Get IV Camera Info. 

691 

692 Route: ``GET /rw/vision`` 

693 ABB constraints: Not supported in bootserver mode 

694 

695 Args: 

696 client: Open RWSClient instance. 

697 resource: Query parameter. Optional. 

698 name: Query parameter. Optional. 

699 

700 Returns: 

701 Raw HTTP response. Expected success: HTTP 200. 

702 

703 Raises: 

704 RWSAuthenticationError: On HTTP 401. 

705 RWSNotFoundError: On HTTP 404. 

706 RWSHTTPError: On any other HTTP >= 400. 

707 # ABB codes: BAD_REQUEST(400) 

708 

709 Example: 

710 ```python 

711 >>> await get_iv_camera_info(client) 

712 <Response [200]> 

713 ``` 

714 """ 

715 return await client.get( 

716 "/rw/vision", 

717 params={k: v for k, v in {"resource": resource, "name": name}.items() if v is not None}, 

718 )