EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: sending pickled python objects of epics channel access
From: Matt Newville <[email protected]>
To: "Madden, Timothy J." <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 15 May 2017 17:20:00 -0500
Hi Tim,



On Mon, May 15, 2017 at 5:00 PM, Madden, Timothy J. <[email protected]> wrote:

Folks

This is probably a bad idea... But if I were to take a python object, call pickle.dumps() to convert it into a string, I

could then caput it to a waveform record. Then some other py client could caget, then call pickle.loads() from the

waveform record. then we get the object back.  So we are sending python objects over epics CA.


Has anyone tried this? Seems straightforward. Just how bad an idea is this?


There are a couple of potential problems with this approach:

      a) some Python objects cannot be easily pickled / unpickled.  Any object with a method would be in this category.
      b) the details of a pickled object can vary with Python version.

I think the better approach would be to convert the object to json and send that over the wire.  Well, and decide whether CA is the preferred Python-to-Python communication method ;).

--Matt


References:
sending pickled python objects of epics channel access Madden, Timothy J.

Navigate by Date:
Prev: sending pickled python objects of epics channel access Madden, Timothy J.
Next: Re: sending pickled python objects of epics channel access Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: sending pickled python objects of epics channel access Madden, Timothy J.
Next: Re: sending pickled python objects of epics channel access Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·