Skip to content

Commit da83d30

Browse files
author
mga83
committed
Work with both EPICS 3.14 and 3.15
Turns out we have to look in two different places for our entry points: in 3.15 our four DLL entry points have been collected together into a single dbCore library, so try looking there first. git-svn-id: svn+ssh://serv0002.cs.diamond.ac.uk/home/subversion/repos/controls/diamond/trunk/support/pythonSoftIoc@166356 e099a375-04f9-0310-9d5f-a741eaff62e1
1 parent 37f1791 commit da83d30

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

python/softioc/imports.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,22 @@ def EpicsDll(dll):
8181
return CDLL(
8282
os.path.join(EPICS_BASE, 'lib', EPICS_HOST_ARCH, 'lib%s.so' % dll))
8383

84+
# A bit tricky: in more recent versions of EPICS all the entry points we want
85+
# have been gathered into a single .so, but previously they were split among
86+
# four different ones. Just try both options.
87+
try:
88+
libdbCore = EpicsDll('dbCore')
89+
libregistryIoc = libdbCore
90+
libdbIoc = libdbCore
91+
libmiscIoc = libdbCore
92+
libasIoc = libdbCore
93+
except OSError:
94+
# Ok, no dbCore, then we should find everything in these four instead.
95+
libregistryIoc = EpicsDll('registryIoc')
96+
libdbIoc = EpicsDll('dbIoc')
97+
libmiscIoc = EpicsDll('miscIoc')
98+
libasIoc = EpicsDll('asIoc')
8499

85-
libregistryIoc = EpicsDll('registryIoc')
86-
libdbIoc = EpicsDll('dbIoc')
87-
libmiscIoc = EpicsDll('miscIoc')
88100

89101

90102
# int registryDeviceSupportAdd(
@@ -133,8 +145,6 @@ def EpicsDll(dll):
133145

134146
# Import for libas
135147

136-
libasIoc = EpicsDll('asIoc')
137-
138148
# int asSetFilename(const char *acf)
139149
#
140150
# Set access control file

0 commit comments

Comments
 (0)