-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
This could work
def _create_and_link_command_pv(
pv_prefix: str, pv_name: str, attr_name: str, method: Command
) -> None:
pv = f"{pv_prefix}:{pv_name}"
async def wrapped_method(value: Any):
if not value:
return
tracer.log_event("Command PV put", topic=method, pv=pv)
await method.fn()
record.set(0, process=False)
record = builder.Action(
f"{pv_prefix}:{pv_name}",
on_update=wrapped_method,
blocking=True,
initial_value=0,
ZNAM="Idle",
ONAM="Active",
)Is this the right thing to do? The if not value seems to be necessary to stop it calling in a loop, despite the process=False.
Metadata
Metadata
Assignees
Labels
No labels