1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 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 <2017> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Is there any support for EPICS for IronPython (or anyone working on it)? |
From: | Matt Newville <[email protected]> |
To: | [email protected] |
Cc: | "Skorpenske, Harley David" <[email protected]>, EPICS Tech Talk <[email protected]> |
Date: | Sun, 14 May 2017 12:01:44 -0500 |
Hi,
I’ve had a brief look at this – there doesn’t seem to be an in_dll() method on Arrays in IronPython, but I was able to work around it using:
c_short_p = ctypes.POINTER(ctypes.c_short)
value_offset0 = ctypes.c_short.in_dll(libca,'d
br_value_offset') dbr.value_offset = ctypes.cast(ctypes.addressof(v
alue_offset0), (39*ctypes.c_short))
IronPython also looks to be a little more fussy about having types specified in function calls – so in the PyEpics call to libca.ca_create_channel I had to change pvn to ctypes.c_char_p(pvn) as otherwise only the first character of the PV name seemed to get passed into ca.dll I suspect there may be a few other places where similar changes might be needed too as it’s not quite working yet. I’ve some time later next week when I could take a more detailed look with a debugger if that’s not too late for you.