(self)
| 197 | class CustomEvent(parent_eventtype): |
| 198 | |
| 199 | def __init__(self): |
| 200 | parent_eventtype.__init__(self) |
| 201 | self.EventType = node.nodeid |
| 202 | curr_node = node |
| 203 | |
| 204 | while curr_node.nodeid.Identifier != parent_identifier: |
| 205 | for prop in curr_node.get_properties(): |
| 206 | name = prop.get_browse_name().Name |
| 207 | val = prop.get_data_value() |
| 208 | self.add_property(name, val.Value.Value, val.Value.VariantType) |
| 209 | parents = curr_node.get_referenced_nodes(refs=ua.ObjectIds.HasSubtype, direction=ua.BrowseDirection.Inverse, includesubtypes=True) |
| 210 | |
| 211 | if len(parents) != 1: # Something went wrong |
| 212 | raise UaError("Parent of event type could notbe found") |
| 213 | curr_node = parents[0] |
| 214 | |
| 215 | self._freeze = True |
| 216 | |
| 217 | return CustomEvent() |
| 218 |
nothing calls this directly
no test coverage detected