From 21c1cf0b25da441c864d8eada428a70161196b28 Mon Sep 17 00:00:00 2001 From: pipeacosta Date: Tue, 17 Oct 2023 11:35:20 +0200 Subject: [PATCH] Improved import/export calls in dpsim-villas-cosim.py Signed-off-by: pipeacosta --- examples/villas/dpsim-villas-cosim.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/villas/dpsim-villas-cosim.py b/examples/villas/dpsim-villas-cosim.py index 92e5c6f00f..66b6a4ad1b 100644 --- a/examples/villas/dpsim-villas-cosim.py +++ b/examples/villas/dpsim-villas-cosim.py @@ -86,8 +86,8 @@ def dpsim0(): evs.set_intf_current([[complex(5, 0)]]) - intf.import_attribute(evs.attr('V_ref'), 0, True, True) - intf.export_attribute(evs.attr('i_intf').derive_coeff(0,0), 0, False) + intf.import_attribute(evs.attr('V_ref'), 0, block_on_read=True, sync_on_start=True) + intf.export_attribute(evs.attr('i_intf').derive_coeff(0,0), 0, wait_for_on_write=False) sim.run() @@ -152,8 +152,8 @@ def dpsim1(): sim.add_interface(intf) sim.add_logger(logger) - intf.import_attribute(ecs.attr('I_ref'), 0, True, True) - intf.export_attribute(ecs.attr('v_intf').derive_coeff(0,0).derive_scaled(complex(-1,0)), 0, False) + intf.import_attribute(ecs.attr('I_ref'), 0, block_on_read=True, sync_on_start=True) + intf.export_attribute(ecs.attr('v_intf').derive_coeff(0,0).derive_scaled(complex(-1,0)), 0, wait_for_on_write=False) sim.run()