Conditions | 2 |
Total Lines | 9 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import sys |
||
13 | async def main(): |
||
14 | logging.basicConfig(level=logging.WARN) |
||
15 | async with Client("opc.tcp://opcua.demo-this.com:51210/UA/SampleServer") as client: |
||
16 | struct = client.get_node("ns=2;i=10239") |
||
17 | before = await struct.read_value() |
||
18 | data = await client.load_type_definitions() # scan server for custom structures and import them |
||
19 | after = await struct.read_value() |
||
20 | print("BEFORE", before) |
||
21 | print("AFTER", after) |
||
22 | |||
25 |