Closed rosstitmarsh closed 1 year ago
I think I have sorted this out. Please update and re-test with p4p==4.1.11a2 pvxslibs==1.2.4a3
. These include two separate changes: mdavidsaver/pvxs@a9eea922b5c210f8d13e81238bf446f0ca5e2a9b and 4279599d553c523fd6c38b14f18d4225dc58d00d. Combined these should allow a modified image_server.py
diff --git a/example/image_server.py b/example/image_server.py
index 0251ab8..67c4eda 100644
--- a/example/image_server.py
+++ b/example/image_server.py
@@ -39,6 +39,11 @@ pv = SharedPV(nt=NTNDArray(),
attrib={"plain":"hello",
"withmeta":myattr})
+@pv.put
+def handle(pv, op):
+ pv.post(op.value())
+ op.done()
+
print('serving pv:', args.pvname)
Server.forever(providers=[{
running with PV name face
to be accessed like:
import numpy
from p4p.client.thread import Context
ctxt = Context()
I=ctxt.get('face')
ctxt.put('face', I)
ctxt.put('face', numpy.asarray([[1, 0], [0, 1]]))
Thank you for the quick fix, it works great now.
python: 3.11 p4p: 4.1.10
I am trying to update a PV with the NTNDArray type, but I cannot get it to work.
The example in
example/image_server.py
does not allow for changing the PV once created.The notes in #24 did not help.
Server:
Client trying various methods to update the PV:
Method 2 was the only one that produced an error in the server
Do I need to use method 2 with a more complicated put handler in the server?