Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/fastcs/transports/epics/pva/_pv_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from p4p.server.asyncio import SharedPV

from fastcs.attributes import Attribute, AttrR, AttrRW, AttrW
from fastcs.datatypes import Table
from fastcs.datatypes import Enum, Table
from fastcs.methods import CommandCallback
from fastcs.tracer import Tracer

Expand Down Expand Up @@ -49,6 +49,10 @@ async def put(self, pv: SharedPV, op: ServerOperation):
tracer.log_event("PV put", topic=self._attr_w, pv=pv, value=cast_value)
await self._attr_w.put(cast_value)
op.done()
if isinstance(self._attr_w.datatype, Enum):
pv.post(cast_to_p4p_value(self._attr_w, cast_value))
else:
pv.post(value)
Copy link
Contributor

@GDYendell GDYendell Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens on the client if put raises an exception and op.done() is not called? I am wondering if what we are supposed to do when a put fails is call op.done() but not pv.post. Is there any guidance on this? Any thoughts @coretl?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



class CommandPvHandler:
Expand Down