Read one attribute of a node result code from server is checked and an exception is raised in case of error
(self, attr)
| 263 | result[0].check() |
| 264 | |
| 265 | def get_attribute(self, attr): |
| 266 | """ |
| 267 | Read one attribute of a node |
| 268 | result code from server is checked and an exception is raised in case of error |
| 269 | """ |
| 270 | rv = ua.ReadValueId() |
| 271 | rv.NodeId = self.nodeid |
| 272 | rv.AttributeId = attr |
| 273 | params = ua.ReadParameters() |
| 274 | params.NodesToRead.append(rv) |
| 275 | result = self.server.read(params) |
| 276 | result[0].StatusCode.check() |
| 277 | return result[0] |
| 278 | |
| 279 | def get_attributes(self, attrs): |
| 280 | """ |