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

21 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: Operations on IO Profinet Device → Get profinet I/O device read record implicit da... 

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_profinet_device_read_record_implicit_data( 

20 client: RWSClient, 

21 network: str, 

22 device: str, 

23 slot: str | None = None, 

24 subslot: str | None = None, 

25 index: str | None = None, 

26 datalength: str | None = None, 

27 vendorid: str | None = None, 

28 deviceid: str | None = None, 

29) -> httpx.Response: 

30 """ 

31 Get profinet I/O device read record implicit data from device in profinet network. 

32 

33 Route: ``GET rw/iosystem/devices/{network}/{device}/implicitdata`` 

34 ABB constraints: Not supported in bootserver mode. 

35 

36 Args: 

37 client: Open RWSClient instance. 

38 network: URL path parameter. 

39 device: URL path parameter. 

40 slot: Query parameter. Optional. 

41 subslot: Query parameter. Optional. 

42 index: Query parameter. Optional. 

43 datalength: Query parameter. Optional. 

44 vendorid: Query parameter. Optional. 

45 deviceid: Query parameter. Optional. 

46 

47 Returns: 

48 Raw HTTP response. Expected success: HTTP 200. 

49 

50 Raises: 

51 RWSAuthenticationError: On HTTP 401. 

52 RWSNotFoundError: On HTTP 404. 

53 RWSHTTPError: On any other HTTP >= 400. 

54 # ABB codes: Bad Request(406) 

55 

56 Example: 

57 ```python 

58 >>> await get_profinet_device_read_record_implicit_data( 

59 ... client, 

60 ... "network_value", 

61 ... "device_value" 

62 ... ) 

63 <Response [200]> 

64 ``` 

65 """ 

66 return await client.get( 

67 f"rw/iosystem/devices/{network}/{device}/implicitdata", 

68 params={ 

69 k: v 

70 for k, v in { 

71 "slot": slot, 

72 "subslot": subslot, 

73 "index": index, 

74 "datalength": datalength, 

75 "vendorid": vendorid, 

76 "deviceid": deviceid, 

77 }.items() 

78 if v is not None 

79 }, 

80 ) 

81 

82 

83async def post_read_record_implicit_data_from_device_in( 

84 client: RWSClient, 

85 network: str, 

86 device: str, 

87 slot: str | None = None, 

88 subslot: str | None = None, 

89 index: str | None = None, 

90 datalength: str | None = None, 

91 vendorid: str | None = None, 

92 deviceid: str | None = None, 

93 ip: str | None = None, 

94) -> httpx.Response: 

95 """ 

96 Read record implicit data from device in profinet network. 

97 

98 Route: ``POST rw/iosystem/devices/{network}/{device}/implicitdata`` 

99 ABB constraints: Not supported in bootserver mode. 

100 

101 Args: 

102 client: Open RWSClient instance. 

103 network: URL path parameter. 

104 device: URL path parameter. 

105 slot: Body parameter. Optional. 

106 subslot: Body parameter. Optional. 

107 index: Body parameter. Optional. 

108 datalength: Body parameter. Optional. 

109 vendorid: Body parameter. Optional. 

110 deviceid: Body parameter. Optional. 

111 ip: Body parameter. Optional. 

112 

113 Returns: 

114 Raw HTTP response. Expected success: HTTP 200. 

115 

116 Raises: 

117 RWSAuthenticationError: On HTTP 401. 

118 RWSNotFoundError: On HTTP 404. 

119 RWSHTTPError: On any other HTTP >= 400. 

120 # ABB codes: NOT_ACCEPTABLE(406) 

121 

122 Example: 

123 ```python 

124 >>> await post_read_record_implicit_data_from_device_in( 

125 ... client, 

126 ... "network_value", 

127 ... "device_value" 

128 ... ) 

129 <Response [200]> 

130 ``` 

131 """ 

132 return await client.post( 

133 f"rw/iosystem/devices/{network}/{device}/implicitdata", 

134 data={ 

135 k: v 

136 for k, v in { 

137 "slot": slot, 

138 "subslot": subslot, 

139 "index": index, 

140 "datalength": datalength, 

141 "vendorid": vendorid, 

142 "deviceid": deviceid, 

143 "ip": ip, 

144 }.items() 

145 if v is not None 

146 }, 

147 ) 

148 

149 

150async def get_forms( 

151 client: RWSClient, 

152 network: str, 

153 device: str, 

154) -> httpx.Response: 

155 """ 

156 Get forms. 

157 

158 Route: ``OPTIONS rw/iosystem/devices/{network}/{device}/implicitdata`` 

159 ABB constraints: Not supported in bootserver mode. 

160 

161 Args: 

162 client: Open RWSClient instance. 

163 network: URL path parameter. 

164 device: URL path parameter. 

165 

166 Returns: 

167 Raw HTTP response. Expected success: HTTP 200. 

168 

169 Raises: 

170 RWSAuthenticationError: On HTTP 401. 

171 RWSNotFoundError: On HTTP 404. 

172 RWSHTTPError: On any other HTTP >= 400. 

173 # ABB codes: NOT_ACCEPTABLE(406) See 

174 

175 Example: 

176 ```python 

177 >>> await get_forms(client, "network_value", "device_value") 

178 <Response [200]> 

179 ``` 

180 """ 

181 return await client.options(f"rw/iosystem/devices/{network}/{device}/implicitdata") 

182 

183 

184async def get_profinet_device_read_record_data( 

185 client: RWSClient, 

186 network: str, 

187 device: str, 

188 slot: str | None = None, 

189 subslot: str | None = None, 

190 index: str | None = None, 

191 datalength: str | None = None, 

192) -> httpx.Response: 

193 """ 

194 Get profinet I/O device read record data. 

195 

196 Route: ``GET rw/iosystem/devices/{network}/{device}/explicitdata`` 

197 ABB constraints: Not supported in bootserver mode 

198 

199 Args: 

200 client: Open RWSClient instance. 

201 network: URL path parameter. 

202 device: URL path parameter. 

203 slot: Query parameter. Optional. 

204 subslot: Query parameter. Optional. 

205 index: Query parameter. Optional. 

206 datalength: Query parameter. Optional. 

207 

208 Returns: 

209 Raw HTTP response. Expected success: HTTP 200. 

210 

211 Raises: 

212 RWSAuthenticationError: On HTTP 401. 

213 RWSNotFoundError: On HTTP 404. 

214 RWSHTTPError: On any other HTTP >= 400. 

215 # ABB codes: NOT_ACCEPTABLE(406) 

216 

217 Example: 

218 ```python 

219 >>> await get_profinet_device_read_record_data(client, "network_value", "device_value") 

220 <Response [200]> 

221 ``` 

222 """ 

223 return await client.get( 

224 f"rw/iosystem/devices/{network}/{device}/explicitdata", 

225 params={ 

226 k: v 

227 for k, v in { 

228 "slot": slot, 

229 "subslot": subslot, 

230 "index": index, 

231 "datalength": datalength, 

232 }.items() 

233 if v is not None 

234 }, 

235 ) 

236 

237 

238async def get_profinet_device_read_record_data_2( 

239 client: RWSClient, 

240 network: str, 

241 device: str, 

242 slot: str | None = None, 

243 subslot: str | None = None, 

244 index: str | None = None, 

245 datalength: str | None = None, 

246) -> httpx.Response: 

247 """ 

248 Get profinet I/O device read record data. 

249 

250 Route: ``POST rw/iosystem/devices/{network}/{device}/explicitdata`` 

251 ABB constraints: Not supported in bootserver mode. 

252 

253 Args: 

254 client: Open RWSClient instance. 

255 network: URL path parameter. 

256 device: URL path parameter. 

257 slot: Body parameter. Optional. 

258 subslot: Body parameter. Optional. 

259 index: Body parameter. Optional. 

260 datalength: Body parameter. Optional. 

261 

262 Returns: 

263 Raw HTTP response. Expected success: HTTP 200. 

264 

265 Raises: 

266 RWSAuthenticationError: On HTTP 401. 

267 RWSNotFoundError: On HTTP 404. 

268 RWSHTTPError: On any other HTTP >= 400. 

269 # ABB codes: NOT_ACCEPTABLE(406) 

270 

271 Example: 

272 ```python 

273 >>> await get_profinet_device_read_record_data_2(client, "network_value", "device_value") 

274 <Response [200]> 

275 ``` 

276 """ 

277 return await client.post( 

278 f"rw/iosystem/devices/{network}/{device}/explicitdata", 

279 data={ 

280 k: v 

281 for k, v in { 

282 "slot": slot, 

283 "subslot": subslot, 

284 "index": index, 

285 "datalength": datalength, 

286 }.items() 

287 if v is not None 

288 }, 

289 ) 

290 

291 

292async def get_forms_2( 

293 client: RWSClient, 

294 network: str, 

295 device: str, 

296) -> httpx.Response: 

297 """ 

298 Get Forms. 

299 

300 Route: ``OPTIONS rw/iosystem/devices/{network}/{device}/explicitdata`` 

301 ABB constraints: Not supported in bootserver mode. 

302 

303 Args: 

304 client: Open RWSClient instance. 

305 network: URL path parameter. 

306 device: URL path parameter. 

307 

308 Returns: 

309 Raw HTTP response. Expected success: HTTP 200. 

310 

311 Raises: 

312 RWSAuthenticationError: On HTTP 401. 

313 RWSNotFoundError: On HTTP 404. 

314 RWSHTTPError: On any other HTTP >= 400. 

315 # ABB codes: See 

316 

317 Example: 

318 ```python 

319 >>> await get_forms_2(client, "network_value", "device_value") 

320 <Response [200]> 

321 ``` 

322 """ 

323 return await client.options(f"rw/iosystem/devices/{network}/{device}/explicitdata") 

324 

325 

326async def get_profinet_device_alarms_xml_response( 

327 client: RWSClient, 

328 network: str, 

329 device: str, 

330) -> httpx.Response: 

331 """ 

332 Get profinet device alarms xml response. 

333 

334 Route: ``GET rw/iosystem/devices/{network}/{device}/alarms`` 

335 ABB constraints: Not supported in bootserver mode 

336 

337 Args: 

338 client: Open RWSClient instance. 

339 network: URL path parameter. 

340 device: URL path parameter. 

341 

342 Returns: 

343 Raw HTTP response. Expected success: HTTP 200. 

344 

345 Raises: 

346 RWSAuthenticationError: On HTTP 401. 

347 RWSNotFoundError: On HTTP 404. 

348 RWSHTTPError: On any other HTTP >= 400. 

349 # ABB codes: NOT_ACCEPTABLE(406) 

350 

351 Example: 

352 ```python 

353 >>> await get_profinet_device_alarms_xml_response( 

354 ... client, 

355 ... "network_value", 

356 ... "device_value" 

357 ... ) 

358 <Response [200]> 

359 ``` 

360 """ 

361 return await client.get(f"rw/iosystem/devices/{network}/{device}/alarms") 

362 

363 

364async def post_clear_the_alarms( 

365 client: RWSClient, 

366 network: str, 

367 device: str, 

368) -> httpx.Response: 

369 """ 

370 Clear the alarms. 

371 

372 Route: ``POST rw/iosystem/devices/{network}/{device}/alarms/clear`` 

373 ABB constraints: Not supported in bootserver mode. 

374 

375 Args: 

376 client: Open RWSClient instance. 

377 network: URL path parameter. 

378 device: URL path parameter. 

379 

380 Returns: 

381 Raw HTTP response. Expected success: HTTP 200. 

382 

383 Raises: 

384 RWSAuthenticationError: On HTTP 401. 

385 RWSNotFoundError: On HTTP 404. 

386 RWSHTTPError: On any other HTTP >= 400. 

387 # ABB codes: NOT_ACCEPTABLE(406) 

388 

389 Example: 

390 ```python 

391 >>> await post_clear_the_alarms(client, "network_value", "device_value") 

392 <Response [200]> 

393 ``` 

394 """ 

395 return await client.post( 

396 f"rw/iosystem/devices/{network}/{device}/alarms/clear", 

397 data={}, 

398 ) 

399 

400 

401async def get_forms_3( 

402 client: RWSClient, 

403 network: str, 

404 device: str, 

405) -> httpx.Response: 

406 """ 

407 Get Forms. 

408 

409 Route: ``OPTIONS rw/iosystem/devices/{network}/{device}/alarms/clear`` 

410 ABB constraints: Not supported in bootserver mode. 

411 

412 Args: 

413 client: Open RWSClient instance. 

414 network: URL path parameter. 

415 device: URL path parameter. 

416 

417 Returns: 

418 Raw HTTP response. Expected success: HTTP 200. 

419 

420 Raises: 

421 RWSAuthenticationError: On HTTP 401. 

422 RWSNotFoundError: On HTTP 404. 

423 RWSHTTPError: On any other HTTP >= 400. 

424 # ABB codes: NOT_ACCEPTABLE(406) See 

425 

426 Example: 

427 ```python 

428 >>> await get_forms_3(client, "network_value", "device_value") 

429 <Response [200]> 

430 ``` 

431 """ 

432 return await client.options(f"rw/iosystem/devices/{network}/{device}/alarms/clear")