Compare commits
1 Commits
cafe-1.8.0
...
cafe-1.12.
| Author | SHA1 | Date | |
|---|---|---|---|
| 39607b33e2 |
2491
PyCafe.pxd
2491
PyCafe.pxd
File diff suppressed because it is too large
Load Diff
13256
PyCafe.pyx
13256
PyCafe.pyx
File diff suppressed because it is too large
Load Diff
3154
PyCafeDefs.pxi
3154
PyCafeDefs.pxi
File diff suppressed because it is too large
Load Diff
94
PyCafeDefs_api.pxi
Normal file
94
PyCafeDefs_api.pxi
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
cdef object py_cb_handle = None
|
||||
cdef object py_cb_handle_open = None
|
||||
|
||||
# ***********public or api***************
|
||||
|
||||
cdef api void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil:
|
||||
#print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvdata pv1 = PVDataHolderToStruct(pvd)
|
||||
|
||||
for cbobjt, v in handleMonDictGlobal.items():
|
||||
if v == handle:
|
||||
cbobjt(pv1, handle, pvname)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef api void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil:
|
||||
#print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvctrl c1 = PVCtrlHolderToStruct(pvc)
|
||||
|
||||
for cbobjt, v in handleMonDictGlobal.items():
|
||||
if v == handle:
|
||||
cbobjt(c1, handle, pvname)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef api void py_cb_handle_wrapper(unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle)
|
||||
py_cb_handle(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
# Default
|
||||
cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil:
|
||||
#print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle)
|
||||
# if monDictGlobal.has_key(monid):
|
||||
if monid in monDictGlobal.keys():
|
||||
cbobjt = monDictGlobal[monid]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("CALLBACK NOT FOUND FOR handle/monid", handle, monid)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle)
|
||||
# py_cb_handle_get(handle)
|
||||
if handle in getDictGlobal.keys():
|
||||
cbobjt = getDictGlobal[handle]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("GET CALLBACK NOT FOUND FOR handle", handle)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
|
||||
# py_cb_handle_put(handle)
|
||||
if handle in putDictGlobal.keys():
|
||||
cbobjt = putDictGlobal[handle]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("PUT CALLBACK NOT FOUND FOR handle", handle)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef api void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil:
|
||||
# status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604)
|
||||
#print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status)
|
||||
py_cb_handle_open(handle, status)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef api void py_cb_handle_connect_wrapper(unsigned int handle, string pvname, int status) with gil:
|
||||
print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
|
||||
#py_cb_handle_connect(handle, pvname, status)
|
||||
|
||||
for k, y in openDictGlobal.items():
|
||||
print(k, y)
|
||||
# if openDictGlobal.has_key(pvname):
|
||||
if str(pvname) in openDictGlobal.keys():
|
||||
cbobjt = openDictGlobal[pvname]
|
||||
cbobjt(handle, pvname, status)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
# ***********api***************
|
||||
2119
PyCafeDefs_api_full.pxi
Normal file
2119
PyCafeDefs_api_full.pxi
Normal file
File diff suppressed because it is too large
Load Diff
213
PyCafeDefs_pub.pxi
Normal file
213
PyCafeDefs_pub.pxi
Normal file
@@ -0,0 +1,213 @@
|
||||
|
||||
cdef object py_cb_handle = None
|
||||
cdef object py_cb_handle_open = None
|
||||
|
||||
cdef object cbobjt = None
|
||||
|
||||
# ***********public or api***************
|
||||
# For when with pvdata
|
||||
|
||||
cdef public void cy_data_event_handler_wrapper(void * callback,
|
||||
unsigned int handle,
|
||||
string pvname,
|
||||
PVDataHolder pvd) with gil:
|
||||
|
||||
global py_cb
|
||||
|
||||
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname)
|
||||
|
||||
cdef pvdata data = PVDataHolderToStruct(pvd)
|
||||
#data.show()
|
||||
py_cb = <object>(<void *> callback)
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)
|
||||
#print( <object>py_cb)
|
||||
|
||||
'''
|
||||
global handleMonDictGlobal
|
||||
if handleMonDictGlobal is not None:
|
||||
for cbobjt, v in handleMonDictGlobal.items():
|
||||
print("handle", v, "cbobjt", cbobjt)
|
||||
if v == handle:
|
||||
cbobjt(handle, pvname, data)
|
||||
'''
|
||||
if callback:
|
||||
cbobjt=<object> (<void *> callback)
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname)
|
||||
cbobjt(handle, pvname, data)
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(4)= Handle/PVNAME :", handle, pvname)
|
||||
|
||||
|
||||
#with nogil:
|
||||
#return
|
||||
|
||||
|
||||
cdef public void cy_ctrl_event_handler_wrapper(void * callback,
|
||||
unsigned int handle,
|
||||
string pvname,
|
||||
PVCtrlHolder pvc) with gil:
|
||||
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvctrl data = PVCtrlHolderToStruct(pvc)
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt(handle, pvname, data)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void cy_event_handler_wrapper(void * callback,
|
||||
unsigned int handle,
|
||||
string pvname) with gil:
|
||||
#print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)
|
||||
|
||||
cbobjt=<object> callback
|
||||
cbobjt(handle, pvname)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void cy_connect_handler_wrapper(void * callback,
|
||||
unsigned int handle,
|
||||
string pvname,
|
||||
int status) with gil:
|
||||
#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
|
||||
#print(" callback is ", <object> callback)
|
||||
|
||||
if callback:
|
||||
#print(" callback is not None ")
|
||||
cbobjt=<object> callback
|
||||
|
||||
cbobjt(handle, pvname, status)
|
||||
#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++ SUCCESS")
|
||||
#else:
|
||||
# if str(pvname) in openDictGlobal.keys():
|
||||
# cbobjt = openDictGlobal[pvname]
|
||||
# cbobjt(handle, pvname, status)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil:
|
||||
print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvdata pv1 = PVDataHolderToStruct(pvd)
|
||||
|
||||
|
||||
'''
|
||||
cdef string val
|
||||
_c_cafe.getCacheString(handle, val)
|
||||
#print(val, " ", pv1.value[0])
|
||||
|
||||
cdef HandleHelper hh
|
||||
cdef vector[void *] widgetV
|
||||
widgetV.reserve(2)
|
||||
widgetList = []
|
||||
status = hh.getWidgets(handle, widgetV)
|
||||
for i in range(0, widgetV.size()):
|
||||
cbobjt = < object > widgetV[i]
|
||||
cbobjt(pv1, handle, pvname)
|
||||
widgetList.append( < object > widgetV[i])
|
||||
|
||||
#print(widgetList)
|
||||
'''
|
||||
'''
|
||||
global handleMonDictGlobal
|
||||
if handleMonDictGlobal is not None:
|
||||
for cbobjt, v in handleMonDictGlobal.items():
|
||||
print("handle", v, "cbobjt", cbobjt)
|
||||
if v == handle:
|
||||
cbobjt(pv1, handle, pvname)
|
||||
'''
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil:
|
||||
#print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvctrl c1 = PVCtrlHolderToStruct(pvc)
|
||||
'''
|
||||
global handleMonDictGlobal
|
||||
cdef object cbobjt = None
|
||||
for cbobjt, v in handleMonDictGlobal.items():
|
||||
if v == handle:
|
||||
cbobjt(c1, handle, pvname)
|
||||
'''
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void py_cb_handle_wrapper(unsigned int handle) with gil:
|
||||
print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle)
|
||||
py_cb_handle(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
# Default
|
||||
cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil:
|
||||
print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle)
|
||||
|
||||
'''
|
||||
cdef string val
|
||||
_c_cafe.getCacheString(handle, val)
|
||||
print(val, " is val")
|
||||
'''
|
||||
|
||||
# if monDictGlobal.has_key(monid):
|
||||
global monDictGlobal
|
||||
if monid in monDictGlobal.keys():
|
||||
cbobjt = monDictGlobal[monid]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("CALLBACK NOT FOUND FOR handle/monid", handle, monid)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle)
|
||||
# py_cb_handle_get(handle)
|
||||
global getDictGlobal
|
||||
if handle in getDictGlobal.keys():
|
||||
cbobjt = getDictGlobal[handle]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("GET CALLBACK NOT FOUND FOR handle", handle)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
|
||||
# py_cb_handle_put(handle)
|
||||
global putDictGlobal
|
||||
if handle in putDictGlobal.keys():
|
||||
cbobjt = putDictGlobal[handle]
|
||||
cbobjt(handle)
|
||||
else:
|
||||
print("PUT CALLBACK NOT FOUND FOR handle", handle)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil:
|
||||
# status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604)
|
||||
print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status)
|
||||
py_cb_handle_open(handle, status)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void py_cb_handle_connect_wrapper(unsigned int handle,
|
||||
string pvname,
|
||||
int status) with gil:
|
||||
print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
|
||||
#py_cb_handle_connect(handle, pvname, status)
|
||||
global openDictGlobal
|
||||
for k, y in openDictGlobal.items():
|
||||
print(k, y)
|
||||
# if openDictGlobal.has_key(pvname):
|
||||
if str(pvname) in openDictGlobal.keys():
|
||||
cbobjt = openDictGlobal[pvname]
|
||||
cbobjt(handle, pvname, status)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
# ***********public***************
|
||||
1918
examples.py
1918
examples.py
File diff suppressed because it is too large
Load Diff
42
python-3.5/PyCafe.h
Normal file
42
python-3.5/PyCafe.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Generated by Cython 0.23.4 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe
|
||||
#define __PYX_HAVE__PyCafe
|
||||
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
|
||||
#ifndef __PYX_EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
#define __PYX_EXTERN_C extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DL_IMPORT
|
||||
#define DL_IMPORT(_T) _T
|
||||
#endif
|
||||
|
||||
__PYX_EXTERN_C DL_IMPORT(void) cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) cy_event_handler_wrapper(void *, unsigned int, std::string);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_wrapper(PVDataHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_monid_wrapper(unsigned int, unsigned long);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_get_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_put_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_open_wrapper(unsigned int, int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_connect_wrapper(unsigned int, std::string, int);
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPyCafe(void);
|
||||
#else
|
||||
PyMODINIT_FUNC PyInit_PyCafe(void);
|
||||
#endif
|
||||
|
||||
#endif /* !__PYX_HAVE__PyCafe */
|
||||
1
python-3.5/PyCafeDefs_api.pxi
Symbolic link
1
python-3.5/PyCafeDefs_api.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafeDefs_api.pxi
|
||||
1
python-3.5/PyCafeDefs_pub.pxi
Symbolic link
1
python-3.5/PyCafeDefs_pub.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafeDefs_pub.pxi
|
||||
@@ -1,4 +1,4 @@
|
||||
source /opt/gfa/python 3.5
|
||||
python setup3.5_release.py build_ext -i
|
||||
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib
|
||||
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib
|
||||
export LD_LIBRARY_PATH=./
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#Cython Version to install
|
||||
CYCAFE_VERSION=pycafe-1.8.0
|
||||
CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0
|
||||
|
||||
#CAFE project base
|
||||
#CAFE_BASE=${EPICS_EXTENSIONS}/CAFE
|
||||
|
||||
1
python-3.5/python35_header.pxi
Symbolic link
1
python-3.5/python35_header.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../python35_header.pxi
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
@@ -13,19 +14,34 @@ setup(
|
||||
'/usr/local/epics/base/include/os/Linux',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/include',
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
|
||||
'/opt/gfa/zmq/curl-7.54.1/include',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib'
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=['/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib'
|
||||
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=False,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
|
||||
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False})
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
|
||||
)
|
||||
)
|
||||
|
||||
171098
python-3.7/PyCafe.cpp
Normal file
171098
python-3.7/PyCafe.cpp
Normal file
File diff suppressed because it is too large
Load Diff
BIN
python-3.7/PyCafe.cpython-37m-x86_64-linux-gnu.so
Executable file
BIN
python-3.7/PyCafe.cpython-37m-x86_64-linux-gnu.so
Executable file
Binary file not shown.
45
python-3.7/PyCafe.h
Normal file
45
python-3.7/PyCafe.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Generated by Cython 0.29.2 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe
|
||||
#define __PYX_HAVE__PyCafe
|
||||
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
|
||||
#ifndef __PYX_EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
#define __PYX_EXTERN_C extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DL_IMPORT
|
||||
#define DL_IMPORT(_T) _T
|
||||
#endif
|
||||
|
||||
__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
|
||||
__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
|
||||
__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
|
||||
__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long);
|
||||
__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int);
|
||||
__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int);
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
|
||||
/* WARNING: the interface of the module init function changed in CPython 3.5. */
|
||||
/* It now returns a PyModuleDef instance instead of a PyModule instance. */
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPyCafe(void);
|
||||
#else
|
||||
PyMODINIT_FUNC PyInit_PyCafe(void);
|
||||
#endif
|
||||
|
||||
#endif /* !__PYX_HAVE__PyCafe */
|
||||
1
python-3.7/PyCafe.pxd
Symbolic link
1
python-3.7/PyCafe.pxd
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafe.pxd
|
||||
1
python-3.7/PyCafe.pyx
Symbolic link
1
python-3.7/PyCafe.pyx
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafe.pyx
|
||||
1
python-3.7/PyCafeDefs.pxi
Symbolic link
1
python-3.7/PyCafeDefs.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafeDefs.pxi
|
||||
1
python-3.7/PyCafeDefs_api.pxi
Symbolic link
1
python-3.7/PyCafeDefs_api.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafeDefs_api.pxi
|
||||
1
python-3.7/PyCafeDefs_pub.pxi
Symbolic link
1
python-3.7/PyCafeDefs_pub.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../PyCafeDefs_pub.pxi
|
||||
4
python-3.7/README_Py3_release
Normal file
4
python-3.7/README_Py3_release
Normal file
@@ -0,0 +1,4 @@
|
||||
source /opt/gfa/python 3.7
|
||||
python setup3.7_release.py build_ext -i
|
||||
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib
|
||||
export LD_LIBRARY_PATH=./
|
||||
4
python-3.7/README_Py3_release~
Normal file
4
python-3.7/README_Py3_release~
Normal file
@@ -0,0 +1,4 @@
|
||||
source /opt/gfa/python 3.5
|
||||
python setup3.5_release.py build_ext -i
|
||||
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib
|
||||
export LD_LIBRARY_PATH=./
|
||||
1
python-3.7/cNodes.xml
Symbolic link
1
python-3.7/cNodes.xml
Symbolic link
@@ -0,0 +1 @@
|
||||
../sf_ar_cNodes.xml
|
||||
1
python-3.7/examples.py
Symbolic link
1
python-3.7/examples.py
Symbolic link
@@ -0,0 +1 @@
|
||||
../examples.py
|
||||
7
python-3.7/examples.sh
Executable file
7
python-3.7/examples.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
source /opt/gfa/python 3.5
|
||||
export SFEL_OMC_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/PythonModule
|
||||
export SFEL_LAYOUT_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/scripts/VA
|
||||
export PYTHONPATH=.:$SFEL_LAYOUT_PYTHONPATH:$SFEL_OMC_PYTHONPATH:/opt/gfa/cafe/python/python-3.5/latest/lib
|
||||
export LD_LIBRARY_PATH=/opt/gfa/cafe/python/python-3.5/latest/lib
|
||||
python examples.py
|
||||
|
||||
1
python-3.7/gDBPM.xml
Symbolic link
1
python-3.7/gDBPM.xml
Symbolic link
@@ -0,0 +1 @@
|
||||
../gDBPM.xml
|
||||
36
python-3.7/makefile
Normal file
36
python-3.7/makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# July 2015
|
||||
#
|
||||
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#Cython Version to install
|
||||
CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0
|
||||
|
||||
#CAFE project base
|
||||
#CAFE_BASE=${EPICS_EXTENSIONS}/CAFE
|
||||
CAFE_BASE=/opt/gfa/cafe/python/python-3.5
|
||||
|
||||
CAFE_CYCAFE_BASE=${CAFE_BASE}/${CYCAFE_VERSION}
|
||||
|
||||
INSTALL_PATH_AFS=/afs/psi.ch/intranet/Controls/cafe/CAFE/cycafe/$(CYCAFE_VERSION)/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
INSTALL_PATH= $(CAFE_CYCAFE_BASE)/lib
|
||||
EXAMPLES_INSTALL_PATH= $(CAFE_CYCAFE_BASE)/examples
|
||||
#############################################
|
||||
|
||||
|
||||
install_local: PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p ${EPICS_HOST_ARCH}
|
||||
cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${EPICS_HOST_ARCH}
|
||||
mkdir -p ${INSTALL_PATH_AFS}
|
||||
cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${INSTALL_PATH_AFS}
|
||||
|
||||
|
||||
install_rel: PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH)
|
||||
cp PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH)
|
||||
mkdir -p $(EXAMPLES_INSTALL_PATH)
|
||||
cp examples.py $(EXAMPLES_INSTALL_PATH)
|
||||
cp examples.sh $(EXAMPLES_INSTALL_PATH)
|
||||
|
||||
1
python-3.7/python35_header.pxi
Symbolic link
1
python-3.7/python35_header.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
../python35_header.pxi
|
||||
47
python-3.7/setup3.5_release.py
Normal file
47
python-3.7/setup3.5_release.py
Normal file
@@ -0,0 +1,47 @@
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
#runtime_library_dirs do not override LD_LIBRARY_PATH!
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
|
||||
'/usr/local/epics/base/include',
|
||||
'/usr/local/epics/base/include/os/Linux',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
|
||||
'/opt/gfa/zmq/curl-7.54.1/include',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=False,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
|
||||
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
|
||||
)
|
||||
)
|
||||
47
python-3.7/setup3.7_release.py
Normal file
47
python-3.7/setup3.7_release.py
Normal file
@@ -0,0 +1,47 @@
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
#runtime_library_dirs do not override LD_LIBRARY_PATH!
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
'/usr/local/epics/base/include',
|
||||
'/usr/local/epics/base/include/os/Linux',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
|
||||
'/opt/gfa/zmq/curl-7.54.1/include',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=False,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
|
||||
'c_string_encoding' : 'ascii', 'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
|
||||
)
|
||||
)
|
||||
47
python-3.7/setup3.7_release.py~
Normal file
47
python-3.7/setup3.7_release.py~
Normal file
@@ -0,0 +1,47 @@
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
#runtime_library_dirs do not override LD_LIBRARY_PATH!
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
'/usr/local/epics/base/include',
|
||||
'/usr/local/epics/base/include/os/Linux',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
|
||||
'/opt/gfa/zmq/curl-7.54.1/include',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
|
||||
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
|
||||
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
|
||||
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
|
||||
'/opt/gfa/zmq/curl-7.54.1/lib',
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
|
||||
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=False,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
|
||||
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
|
||||
)
|
||||
)
|
||||
3
python35_header.pxi
Normal file
3
python35_header.pxi
Normal file
@@ -0,0 +1,3 @@
|
||||
cdef extern from "Python.h":
|
||||
ctypedef extern class builtins.Exception[object PyBaseExceptionObject]:
|
||||
pass
|
||||
13
python3z_header.pxi
Normal file
13
python3z_header.pxi
Normal file
@@ -0,0 +1,13 @@
|
||||
cdef extern from "Python.h":
|
||||
ctypedef enum PyGILState_STATE:
|
||||
PyGILState_LOCKED = 0
|
||||
PyGILState_UNLOCKED = 1
|
||||
|
||||
void PyEval_InitThreads()
|
||||
void Py_Initialize()
|
||||
PyGILState_STATE PyGILState_Ensure()
|
||||
void PyGILState_Release(PyGILState_STATE)
|
||||
char* __FILE__
|
||||
int __LINE__
|
||||
|
||||
|
||||
Reference in New Issue
Block a user