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

47 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 → Panel service → Get Panel Resources 

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

20 """ 

21 Get Panel Resources. 

22 

23 Route: ``GET /rw/panel`` 

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) 

37 

38 Example: 

39 ```python 

40 >>> await get_panel_resources(client) 

41 <Response [200]> 

42 ``` 

43 """ 

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

45 

46 

47async def get_panel_actions(client: RWSClient) -> httpx.Response: 

48 """ 

49 Get Panel Actions. 

50 

51 Route: ``GET /rw/panel`` 

52 ABB constraints: Not supported in bootserver mode 

53 

54 Args: 

55 client: Open RWSClient instance. 

56 

57 Returns: 

58 Raw HTTP response. Expected success: HTTP 200. 

59 

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) 

65 

66 Example: 

67 ```python 

68 >>> await get_panel_actions(client) 

69 <Response [200]> 

70 ``` 

71 """ 

72 return await client.get("/rw/panel") 

73 

74 

75async def set_the_language( 

76 client: RWSClient, 

77 action: str | None = None, 

78 lang_code: str | None = None, 

79) -> httpx.Response: 

80 """ 

81 Set the language. 

82 

83 Route: ``POST /rw/panel`` 

84 ABB constraints: Not supported in bootserver mode 

85 

86 Args: 

87 client: Open RWSClient instance. 

88 action: Query parameter. Optional. 

89 lang_code: Body parameter. Optional. 

90 

91 Returns: 

92 Raw HTTP response. Expected success: HTTP 204. 

93 

94 Raises: 

95 RWSAuthenticationError: On HTTP 401. 

96 RWSNotFoundError: On HTTP 404. 

97 RWSHTTPError: On any other HTTP >= 400. 

98 # ABB codes: BAD_REQUEST(400) 

99 

100 Example: 

101 ```python 

102 >>> await set_the_language(client) 

103 <Response [204]> 

104 ``` 

105 """ 

106 return await client.post( 

107 "/rw/panel", 

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

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

110 ) 

111 

112 

113async def restart_the_controller( 

114 client: RWSClient, 

115 action: str | None = None, 

116 restart_mode: str | None = None, 

117) -> httpx.Response: 

118 """ 

119 Restart the Controller. 

120 

121 Route: ``POST /rw/panel`` 

122 ABB constraints: Not supported in bootserver mode 

123 

124 Args: 

125 client: Open RWSClient instance. 

126 action: Query parameter. Optional. 

127 restart_mode: Body parameter. Optional. 

128 

129 Returns: 

130 Raw HTTP response. Expected success: HTTP 204. 

131 

132 Raises: 

133 RWSAuthenticationError: On HTTP 401. 

134 RWSNotFoundError: On HTTP 404. 

135 RWSHTTPError: On any other HTTP >= 400. 

136 # ABB codes: BAD_REQUEST(400) 

137 

138 Example: 

139 ```python 

140 >>> await restart_the_controller(client) 

141 <Response [204]> 

142 ``` 

143 """ 

144 return await client.post( 

145 "/rw/panel", 

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

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

148 ) 

149 

150 

151async def get_controller_state(client: RWSClient) -> httpx.Response: 

152 """ 

153 Get Controller State. 

154 

155 Route: ``GET /rw/panel/ctrlstate`` 

156 ABB constraints: init : The robot is starting up. It will shift to state motors off when it 

157 has started. motoroff : The robot is in a standby state where there is no power to the 

158 robot's motors. The state has to be shifted to motors on before the robot can move. 

159 motoron : The robot is ready to move, either by jog... 

160 

161 Args: 

162 client: Open RWSClient instance. 

163 

164 Returns: 

165 Raw HTTP response. Expected success: HTTP 200. 

166 

167 Raises: 

168 RWSAuthenticationError: On HTTP 401. 

169 RWSNotFoundError: On HTTP 404. 

170 RWSHTTPError: On any other HTTP >= 400. 

171 # ABB codes: BAD REQUEST(400) 

172 

173 Example: 

174 ```python 

175 >>> await get_controller_state(client) 

176 <Response [200]> 

177 ``` 

178 """ 

179 return await client.get("/rw/panel/ctrlstate") 

180 

181 

182async def get_controller_state_actions( 

183 client: RWSClient, 

184 action: str | None = None, 

185) -> httpx.Response: 

186 """ 

187 Get Controller State Actions. 

188 

189 Route: ``GET /rw/panel/ctrlstate`` 

190 ABB constraints: Not supported in bootserver mode 

191 

192 Args: 

193 client: Open RWSClient instance. 

194 action: Query parameter. Optional. 

195 

196 Returns: 

197 Raw HTTP response. Expected success: HTTP 200. 

198 

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) 

204 

205 Example: 

206 ```python 

207 >>> await get_controller_state_actions(client) 

208 <Response [200]> 

209 ``` 

210 """ 

211 return await client.get( 

212 "/rw/panel/ctrlstate", 

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

214 ) 

215 

216 

217async def set_controller_state( 

218 client: RWSClient, 

219 action: str | None = None, 

220 ctrl_state: str | None = None, 

221) -> httpx.Response: 

222 """ 

223 Set Controller State. 

224 

225 Route: ``POST /rw/panel/ctrlstate`` 

226 ABB constraints: Not supported in bootserver mode. 

227 

228 Args: 

229 client: Open RWSClient instance. 

230 action: Query parameter. Optional. 

231 ctrl_state: Body parameter. Optional. 

232 

233 Returns: 

234 Raw HTTP response. Expected success: HTTP 204. 

235 

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) 

241 

242 Example: 

243 ```python 

244 >>> await set_controller_state(client) 

245 <Response [204]> 

246 ``` 

247 """ 

248 return await client.post( 

249 "/rw/panel/ctrlstate", 

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

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

252 ) 

253 

254 

255async def subscribe_controller_state( 

256 client: RWSClient, 

257 identifier: str | None = None, 

258 identifier_p: str | None = None, 

259) -> httpx.Response: 

260 """ 

261 Subscribe Controller state. 

262 

263 Route: ``POST /subscription`` 

264 ABB constraints: init : The robot is starting up. It will shift to state motors off when it 

265 has started. motoroff : The robot is in a standby state where there is no power to the 

266 robot's motors. The state has to be shifted to motors on before the robot can move. 

267 motoron : The robot is ready to move, either by jog... 

268 

269 Args: 

270 client: Open RWSClient instance. 

271 identifier: Body parameter. Optional. 

272 identifier_p: Body parameter. Optional. 

273 

274 Returns: 

275 Raw HTTP response. Expected success: HTTP 201. 

276 

277 Raises: 

278 RWSAuthenticationError: On HTTP 401. 

279 RWSNotFoundError: On HTTP 404. 

280 RWSHTTPError: On any other HTTP >= 400. 

281 # ABB codes: BAD_REQUEST(400) 

282 

283 Example: 

284 ```python 

285 >>> await subscribe_controller_state(client) 

286 <Response [201]> 

287 ``` 

288 """ 

289 return await client.post( 

290 "/subscription", 

291 data={ 

292 k: v 

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

294 if v is not None 

295 }, 

296 ) 

297 

298 

299async def get_operation_mode(client: RWSClient) -> httpx.Response: 

300 """ 

301 Get Operation Mode. 

302 

303 Route: ``GET /rw/panel/opmode`` 

304 ABB constraints: Not supported in bootserver mode 

305 

306 Args: 

307 client: Open RWSClient instance. 

308 

309 Returns: 

310 Raw HTTP response. Expected success: HTTP 200. 

311 

312 Raises: 

313 RWSAuthenticationError: On HTTP 401. 

314 RWSNotFoundError: On HTTP 404. 

315 RWSHTTPError: On any other HTTP >= 400. 

316 # ABB codes: BAD_REQUEST(400) 

317 

318 Example: 

319 ```python 

320 >>> await get_operation_mode(client) 

321 <Response [200]> 

322 ``` 

323 """ 

324 return await client.get("/rw/panel/opmode") 

325 

326 

327async def get_operation_mode_actions( 

328 client: RWSClient, 

329 action: str | None = None, 

330) -> httpx.Response: 

331 """ 

332 Get Operation Mode Actions. 

333 

334 Route: ``GET /rw/panel/opmode`` 

335 ABB constraints: Not supported in bootserver mode 

336 

337 Args: 

338 client: Open RWSClient instance. 

339 action: Query parameter. Optional. 

340 

341 Returns: 

342 Raw HTTP response. Expected success: HTTP 200. 

343 

344 Raises: 

345 RWSAuthenticationError: On HTTP 401. 

346 RWSNotFoundError: On HTTP 404. 

347 RWSHTTPError: On any other HTTP >= 400. 

348 # ABB codes: BAD_REQUEST(400) 

349 

350 Example: 

351 ```python 

352 >>> await get_operation_mode_actions(client) 

353 <Response [200]> 

354 ``` 

355 """ 

356 return await client.get( 

357 "/rw/panel/opmode", 

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

359 ) 

360 

361 

362async def subscribe_operation_mode( 

363 client: RWSClient, 

364 identifier: str | None = None, 

365 identifier_p: str | None = None, 

366) -> httpx.Response: 

367 """ 

368 Subscribe Operation Mode. 

369 

370 Route: ``POST /subscription`` 

371 ABB constraints: Not supported in bootserver mode 

372 

373 Args: 

374 client: Open RWSClient instance. 

375 identifier: Body parameter. Optional. 

376 identifier_p: Body parameter. Optional. 

377 

378 Returns: 

379 Raw HTTP response. Expected success: HTTP 201. 

380 

381 Raises: 

382 RWSAuthenticationError: On HTTP 401. 

383 RWSNotFoundError: On HTTP 404. 

384 RWSHTTPError: On any other HTTP >= 400. 

385 # ABB codes: BAD_REQUEST(400) 

386 

387 Example: 

388 ```python 

389 >>> await subscribe_operation_mode(client) 

390 <Response [201]> 

391 ``` 

392 """ 

393 return await client.post( 

394 "/subscription", 

395 data={ 

396 k: v 

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

398 if v is not None 

399 }, 

400 ) 

401 

402 

403async def post_acknowledgement_for_operation_mode( 

404 client: RWSClient, 

405 action: str | None = None, 

406 opmode: str | None = None, 

407) -> httpx.Response: 

408 """ 

409 Acknowledgement for Operation Mode. 

410 

411 Route: ``POST /rw/panel/opmode`` 

412 ABB constraints: Client should have Local Client previliges to execute the functionality. 

413 Auto acknowledgement option should be deactivated. Not supported in bootserver mode. 

414 

415 Args: 

416 client: Open RWSClient instance. 

417 action: Query parameter. Optional. 

418 opmode: Body parameter. Optional. 

419 

420 Returns: 

421 Raw HTTP response. Expected success: HTTP 204. 

422 

423 Raises: 

424 RWSAuthenticationError: On HTTP 401. 

425 RWSNotFoundError: On HTTP 404. 

426 RWSHTTPError: On any other HTTP >= 400. 

427 # ABB codes: BAD_REQUEST (400) 

428 

429 Example: 

430 ```python 

431 >>> await post_acknowledgement_for_operation_mode(client) 

432 <Response [204]> 

433 ``` 

434 """ 

435 return await client.post( 

436 "/rw/panel/opmode", 

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

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

439 ) 

440 

441 

442async def get_operation_mode_lock_status( 

443 client: RWSClient, 

444 resource: str | None = None, 

445) -> httpx.Response: 

446 """ 

447 Get Operation Mode Lock Status. 

448 

449 Route: ``GET /rw/panel/opmode`` 

450 ABB constraints: Not supported in bootserver mode 

451 

452 Args: 

453 client: Open RWSClient instance. 

454 resource: Query parameter. Optional. 

455 

456 Returns: 

457 Raw HTTP response. Expected success: HTTP 200. 

458 

459 Raises: 

460 RWSAuthenticationError: On HTTP 401. 

461 RWSNotFoundError: On HTTP 404. 

462 RWSHTTPError: On any other HTTP >= 400. 

463 # ABB codes: BAD_REQUEST(400) 

464 

465 Example: 

466 ```python 

467 >>> await get_operation_mode_lock_status(client) 

468 <Response [200]> 

469 ``` 

470 """ 

471 return await client.get( 

472 "/rw/panel/opmode", 

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

474 ) 

475 

476 

477async def post_lock_operation_mode_selection( 

478 client: RWSClient, 

479 action: str | None = None, 

480 pin: str | None = None, 

481 permanent: str | None = None, 

482) -> httpx.Response: 

483 """ 

484 Lock operation mode selection.. 

485 

486 Route: ``POST /rw/panel/opmode`` 

487 ABB constraints: Not supported in bootserver mode. UAS_GRANT "Lock saftey controller config" 

488 is needed to lock/unlock. For permenant lock/unlock "Key-less mode selector" UAS_GRANT is 

489 needed. 

490 

491 Args: 

492 client: Open RWSClient instance. 

493 action: Query parameter. Optional. 

494 pin: Body parameter. Optional. 

495 permanent: Body parameter. Optional. 

496 

497 Returns: 

498 Raw HTTP response. Expected success: HTTP 204. 

499 

500 Raises: 

501 RWSAuthenticationError: On HTTP 401. 

502 RWSNotFoundError: On HTTP 404. 

503 RWSHTTPError: On any other HTTP >= 400. 

504 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403) 

505 

506 Example: 

507 ```python 

508 >>> await post_lock_operation_mode_selection(client) 

509 <Response [204]> 

510 ``` 

511 """ 

512 return await client.post( 

513 "/rw/panel/opmode", 

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

515 data={k: v for k, v in {"pin": pin, "permanent": permanent}.items() if v is not None}, 

516 ) 

517 

518 

519async def post_unlock_operation_mode_selection( 

520 client: RWSClient, 

521 action: str | None = None, 

522 pin: str | None = None, 

523) -> httpx.Response: 

524 """ 

525 Unlock operation mode selection.. 

526 

527 Route: ``POST /rw/panel/opmode`` 

528 ABB constraints: Not supported in bootserver mode. UAS_GRANT "Lock saftey controller config" 

529 is needed to lock/unlock. For permenant lock/unlock "Key-less mode selector" UAS_GRANT is 

530 needed. 

531 

532 Args: 

533 client: Open RWSClient instance. 

534 action: Query parameter. Optional. 

535 pin: Body parameter. Optional. 

536 

537 Returns: 

538 Raw HTTP response. Expected success: HTTP 204. 

539 

540 Raises: 

541 RWSAuthenticationError: On HTTP 401. 

542 RWSNotFoundError: On HTTP 404. 

543 RWSHTTPError: On any other HTTP >= 400. 

544 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403) 

545 

546 Example: 

547 ```python 

548 >>> await post_unlock_operation_mode_selection(client) 

549 <Response [204]> 

550 ``` 

551 """ 

552 return await client.post( 

553 "/rw/panel/opmode", 

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

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

556 ) 

557 

558 

559async def get_speed_ratio(client: RWSClient) -> httpx.Response: 

560 """ 

561 Get Speed Ratio. 

562 

563 Route: ``GET /rw/panel/speedratio`` 

564 ABB constraints: Not supported in bootserver mode 

565 

566 Args: 

567 client: Open RWSClient instance. 

568 

569 Returns: 

570 Raw HTTP response. Expected success: HTTP 200. 

571 

572 Raises: 

573 RWSAuthenticationError: On HTTP 401. 

574 RWSNotFoundError: On HTTP 404. 

575 RWSHTTPError: On any other HTTP >= 400. 

576 # ABB codes: BAD_REQUEST (400) 

577 

578 Example: 

579 ```python 

580 >>> await get_speed_ratio(client) 

581 <Response [200]> 

582 ``` 

583 """ 

584 return await client.get("/rw/panel/speedratio") 

585 

586 

587async def get_speed_ratio_actions( 

588 client: RWSClient, 

589 action: str | None = None, 

590) -> httpx.Response: 

591 """ 

592 Get Speed Ratio Actions. 

593 

594 Route: ``GET /rw/panel/speedratio`` 

595 ABB constraints: Not supported in bootserver mode 

596 

597 Args: 

598 client: Open RWSClient instance. 

599 action: Query parameter. Optional. 

600 

601 Returns: 

602 Raw HTTP response. Expected success: HTTP 200. 

603 

604 Raises: 

605 RWSAuthenticationError: On HTTP 401. 

606 RWSNotFoundError: On HTTP 404. 

607 RWSHTTPError: On any other HTTP >= 400. 

608 # ABB codes: BAD_REQUEST(400) 

609 

610 Example: 

611 ```python 

612 >>> await get_speed_ratio_actions(client) 

613 <Response [200]> 

614 ``` 

615 """ 

616 return await client.get( 

617 "/rw/panel/speedratio", 

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

619 ) 

620 

621 

622async def set_speed_ratio( 

623 client: RWSClient, 

624 action: str | None = None, 

625 speed_ratio: str | None = None, 

626) -> httpx.Response: 

627 """ 

628 Set Speed Ratio. 

629 

630 Route: ``POST /rw/panel/speedratio`` 

631 ABB constraints: Only supported in auto mode. Not supported in bootserver mode 

632 

633 Args: 

634 client: Open RWSClient instance. 

635 action: Query parameter. Optional. 

636 speed_ratio: Body parameter. Optional. 

637 

638 Returns: 

639 Raw HTTP response. Expected success: HTTP 204. 

640 

641 Raises: 

642 RWSAuthenticationError: On HTTP 401. 

643 RWSNotFoundError: On HTTP 404. 

644 RWSHTTPError: On any other HTTP >= 400. 

645 # ABB codes: BAD_REQUEST (400), UNSUPPORTED_MEDIA (415), FORBIDDEN (403) 

646 

647 Example: 

648 ```python 

649 >>> await set_speed_ratio(client) 

650 <Response [204]> 

651 ``` 

652 """ 

653 return await client.post( 

654 "/rw/panel/speedratio", 

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

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

657 ) 

658 

659 

660async def subscribe_speed_ratio( 

661 client: RWSClient, 

662 identifier: str | None = None, 

663 identifier_p: str | None = None, 

664) -> httpx.Response: 

665 """ 

666 Subscribe Speed Ratio. 

667 

668 Route: ``POST /subscription`` 

669 ABB constraints: Not supported in bootserver mode 

670 

671 Args: 

672 client: Open RWSClient instance. 

673 identifier: Body parameter. Optional. 

674 identifier_p: Body parameter. Optional. 

675 

676 Returns: 

677 Raw HTTP response. Expected success: HTTP 201. 

678 

679 Raises: 

680 RWSAuthenticationError: On HTTP 401. 

681 RWSNotFoundError: On HTTP 404. 

682 RWSHTTPError: On any other HTTP >= 400. 

683 # ABB codes: BAD_REQUEST(400) 

684 

685 Example: 

686 ```python 

687 >>> await subscribe_speed_ratio(client) 

688 <Response [201]> 

689 ``` 

690 """ 

691 return await client.post( 

692 "/subscription", 

693 data={ 

694 k: v 

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

696 if v is not None 

697 }, 

698 ) 

699 

700 

701async def get_collision_detection_state(client: RWSClient) -> httpx.Response: 

702 """ 

703 Get Collision Detection State. 

704 

705 Route: ``GET /rw/panel/coldetstate`` 

706 ABB constraints: Not supported in bootserver mode 

707 

708 Args: 

709 client: Open RWSClient instance. 

710 

711 Returns: 

712 Raw HTTP response. Expected success: HTTP 200. 

713 

714 Raises: 

715 RWSAuthenticationError: On HTTP 401. 

716 RWSNotFoundError: On HTTP 404. 

717 RWSHTTPError: On any other HTTP >= 400. 

718 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404) 

719 

720 Example: 

721 ```python 

722 >>> await get_collision_detection_state(client) 

723 <Response [200]> 

724 ``` 

725 """ 

726 return await client.get("/rw/panel/coldetstate") 

727 

728 

729async def get_collision_detection_state_actions( 

730 client: RWSClient, 

731 action: str | None = None, 

732) -> httpx.Response: 

733 """ 

734 Get Collision Detection State Actions. 

735 

736 Route: ``GET /rw/panel/coldetstate`` 

737 ABB constraints: Not supported in bootserver mode 

738 

739 Args: 

740 client: Open RWSClient instance. 

741 action: Query parameter. Optional. 

742 

743 Returns: 

744 Raw HTTP response. Expected success: HTTP 200. 

745 

746 Raises: 

747 RWSAuthenticationError: On HTTP 401. 

748 RWSNotFoundError: On HTTP 404. 

749 RWSHTTPError: On any other HTTP >= 400. 

750 # ABB codes: BAD_REQUEST(400) 

751 

752 Example: 

753 ```python 

754 >>> await get_collision_detection_state_actions(client) 

755 <Response [200]> 

756 ``` 

757 """ 

758 return await client.get( 

759 "/rw/panel/coldetstate", 

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

761 ) 

762 

763 

764async def subscribe_on_collision_detection_state( 

765 client: RWSClient, 

766 identifier: str | None = None, 

767 identifier_p: str | None = None, 

768) -> httpx.Response: 

769 """ 

770 Subscribe on Collision Detection State. 

771 

772 Route: ``POST /subscription`` 

773 ABB constraints: Not supported in bootserver mode 

774 

775 Args: 

776 client: Open RWSClient instance. 

777 identifier: Body parameter. Optional. 

778 identifier_p: Body parameter. Optional. 

779 

780 Returns: 

781 Raw HTTP response. Expected success: HTTP 201. 

782 

783 Raises: 

784 RWSAuthenticationError: On HTTP 401. 

785 RWSNotFoundError: On HTTP 404. 

786 RWSHTTPError: On any other HTTP >= 400. 

787 # ABB codes: BAD_REQUEST(400) 

788 

789 Example: 

790 ```python 

791 >>> await subscribe_on_collision_detection_state(client) 

792 <Response [201]> 

793 ``` 

794 """ 

795 return await client.post( 

796 "/subscription", 

797 data={ 

798 k: v 

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

800 if v is not None 

801 }, 

802 )