(parent, *args)
| 60 | arguments and output to and from variants |
| 61 | """ |
| 62 | def wrapper(parent, *args): |
| 63 | if isinstance(parent, ua.NodeId): |
| 64 | result = func(parent, *[arg.Value for arg in args]) |
| 65 | else: |
| 66 | self = parent |
| 67 | parent = args[0] |
| 68 | args = args[1:] |
| 69 | result = func(self, parent, *[arg.Value for arg in args]) |
| 70 | if result is None: |
| 71 | return [] |
| 72 | elif isinstance(result, ua.CallMethodResult): |
| 73 | result.OutputArguments = to_variant(*result.OutputArguments) |
| 74 | return result |
| 75 | elif isinstance(result, ua.StatusCode): |
| 76 | return result |
| 77 | elif isinstance(result, tuple): |
| 78 | return to_variant(*result) |
| 79 | else: |
| 80 | return to_variant(result) |
| 81 | return wrapper |
| 82 | |
| 83 |
nothing calls this directly
no test coverage detected