Coverage for abb_rws_client_python_rw6/rws/rapid/symbol.py: 100%

17 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 → RAPID Service → Operations on RAPID symbol 

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

20 client: RWSClient, 

21 symbolurl: str, 

22) -> httpx.Response: 

23 """ 

24 Get RAPID symbol properties. 

25 

26 Route: ``GET /rw/rapid/symbol/properties/{symbolurl}`` 

27 ABB constraints: Not supported in bootserver mode 

28 

29 Args: 

30 client: Open RWSClient instance. 

31 symbolurl: URL path parameter. 

32 

33 Returns: 

34 Raw HTTP response. Expected success: HTTP 200. 

35 

36 Raises: 

37 RWSAuthenticationError: On HTTP 401. 

38 RWSNotFoundError: On HTTP 404. 

39 RWSHTTPError: On any other HTTP >= 400. 

40 # ABB codes: BAD_REQUEST(400) 

41 

42 Example: 

43 ```python 

44 >>> await get_rapid_symbol_properties(client, "symbolurl_value") 

45 <Response [200]> 

46 ``` 

47 """ 

48 return await client.get(f"/rw/rapid/symbol/properties/{symbolurl}") 

49 

50 

51async def get_rapid_symbol_data( 

52 client: RWSClient, 

53 symbolurl: str, 

54 value: str | None = None, 

55) -> httpx.Response: 

56 """ 

57 Get rapid symbol data. 

58 

59 Route: ``GET /rw/rapid/symbol/data/{symbolurl}`` 

60 ABB constraints: Not supported in bootserver mode 

61 

62 Args: 

63 client: Open RWSClient instance. 

64 symbolurl: URL path parameter. 

65 value: Query parameter. Optional. 

66 

67 Returns: 

68 Raw HTTP response. Expected success: HTTP 200. 

69 

70 Raises: 

71 RWSAuthenticationError: On HTTP 401. 

72 RWSNotFoundError: On HTTP 404. 

73 RWSHTTPError: On any other HTTP >= 400. 

74 # ABB codes: BAD REQUEST(400) see 

75 

76 Example: 

77 ```python 

78 >>> await get_rapid_symbol_data(client, "symbolurl_value") 

79 <Response [200]> 

80 ``` 

81 """ 

82 return await client.get( 

83 f"/rw/rapid/symbol/data/{symbolurl}", 

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

85 ) 

86 

87 

88async def get_rapid_symbol_data_actions( 

89 client: RWSClient, 

90 symbolurl: str, 

91 action: str | None = None, 

92) -> httpx.Response: 

93 """ 

94 Get rapid symbol data actions. 

95 

96 Route: ``GET /rw/rapid/symbols/{symbolurl}`` 

97 ABB constraints: Not supported in bootserver mode 

98 

99 Args: 

100 client: Open RWSClient instance. 

101 symbolurl: URL path parameter. 

102 action: Query parameter. Optional. 

103 

104 Returns: 

105 Raw HTTP response. Expected success: HTTP 200. 

106 

107 Raises: 

108 RWSAuthenticationError: On HTTP 401. 

109 RWSNotFoundError: On HTTP 404. 

110 RWSHTTPError: On any other HTTP >= 400. 

111 # ABB codes: BAD REQUEST(400) see 

112 

113 Example: 

114 ```python 

115 >>> await get_rapid_symbol_data_actions(client, "symbolurl_value") 

116 <Response [200]> 

117 ``` 

118 """ 

119 return await client.get( 

120 f"/rw/rapid/symbols/{symbolurl}", 

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

122 ) 

123 

124 

125async def update_rapid_variable_current_value( 

126 client: RWSClient, 

127 symbolurl: str, 

128 action: str | None = None, 

129 value: str | None = None, 

130) -> httpx.Response: 

131 """ 

132 Update rapid variable current value. 

133 

134 Route: ``POST /rw/rapid/symbol/data/{symbolurl}`` 

135 ABB constraints: Not supported in bootserver mode Client needs RAPID mastership in AUTO mode. 

136 Client needs RMMP Privilege and RAPID mastership in MANUAL mode. 

137 

138 Args: 

139 client: Open RWSClient instance. 

140 symbolurl: URL path parameter. 

141 action: Query parameter. Optional. 

142 value: Body parameter. Optional. 

143 

144 Returns: 

145 Raw HTTP response. Expected success: HTTP 204. 

146 

147 Raises: 

148 RWSAuthenticationError: On HTTP 401. 

149 RWSNotFoundError: On HTTP 404. 

150 RWSHTTPError: On any other HTTP >= 400. 

151 # ABB codes: FORBIDDEN(403) BAD REQUEST(400) see 

152 

153 Example: 

154 ```python 

155 >>> await update_rapid_variable_current_value(client, "symbolurl_value") 

156 <Response [204]> 

157 ``` 

158 """ 

159 return await client.post( 

160 f"/rw/rapid/symbol/data/{symbolurl}", 

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

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

163 ) 

164 

165 

166async def validate_rapid_variable( 

167 client: RWSClient, 

168 action: str | None = None, 

169) -> httpx.Response: 

170 """ 

171 Validate rapid variable. 

172 

173 Route: ``POST /rw/rapid/symbol/data`` 

174 ABB constraints: Not supported in bootserver mode 

175 

176 Args: 

177 client: Open RWSClient instance. 

178 action: Query parameter. Optional. 

179 

180 Returns: 

181 Raw HTTP response. Expected success: HTTP 204. 

182 

183 Raises: 

184 RWSAuthenticationError: On HTTP 401. 

185 RWSNotFoundError: On HTTP 404. 

186 RWSHTTPError: On any other HTTP >= 400. 

187 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400) 

188 

189 Example: 

190 ```python 

191 >>> await validate_rapid_variable(client) 

192 <Response [204]> 

193 ``` 

194 """ 

195 return await client.post( 

196 "/rw/rapid/symbol/data", 

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

198 data={}, 

199 ) 

200 

201 

202async def subscribe_on_rapid_persistent_variable( 

203 client: RWSClient, 

204 identifier: str | None = None, 

205 identifier_p: str | None = None, 

206) -> httpx.Response: 

207 """ 

208 Subscribe on RAPID persistent variable. 

209 

210 Route: ``POST /subscription`` 

211 ABB constraints: Not supported in bootserver mode 

212 

213 Args: 

214 client: Open RWSClient instance. 

215 identifier: Body parameter. Optional. 

216 identifier_p: Body parameter. Optional. 

217 

218 Returns: 

219 Raw HTTP response. Expected success: HTTP 201. 

220 

221 Raises: 

222 RWSAuthenticationError: On HTTP 401. 

223 RWSNotFoundError: On HTTP 404. 

224 RWSHTTPError: On any other HTTP >= 400. 

225 # ABB codes: BAD REQUEST(400) , see 

226 

227 Example: 

228 ```python 

229 >>> await subscribe_on_rapid_persistent_variable(client) 

230 <Response [201]> 

231 ``` 

232 """ 

233 return await client.post( 

234 "/subscription", 

235 data={ 

236 k: v 

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

238 if v is not None 

239 }, 

240 ) 

241 

242 

243async def update_rapid_variable_initial_value( 

244 client: RWSClient, 

245 symbolurl: str, 

246 action: str | None = None, 

247 value: str | None = None, 

248) -> httpx.Response: 

249 """ 

250 Update rapid variable Initial Value. 

251 

252 Route: ``POST /rw/rapid/symbol/data/{symbolurl}`` 

253 ABB constraints: Not supported in bootserver mode 

254 

255 Args: 

256 client: Open RWSClient instance. 

257 symbolurl: URL path parameter. 

258 action: Query parameter. Optional. 

259 value: Body parameter. Optional. 

260 

261 Returns: 

262 Raw HTTP response. Expected success: HTTP 204. 

263 

264 Raises: 

265 RWSAuthenticationError: On HTTP 401. 

266 RWSNotFoundError: On HTTP 404. 

267 RWSHTTPError: On any other HTTP >= 400. 

268 # ABB codes: BAD_REQUEST(400), HTTP Errors, see 

269 

270 Example: 

271 ```python 

272 >>> await update_rapid_variable_initial_value(client, "symbolurl_value") 

273 <Response [204]> 

274 ``` 

275 """ 

276 return await client.post( 

277 f"/rw/rapid/symbol/data/{symbolurl}", 

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

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

280 )