Compare commits
5 Commits
cafe-1.13.
...
cafe-1.16.
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c7be056d6 | |||
| aded1d5ed7 | |||
| 8cf1e68db0 | |||
| 22f3cfa655 | |||
| eaf1167a81 |
60
#setup_py38_sf.py#
Normal file
60
#setup_py38_sf.py#
Normal file
@@ -0,0 +1,60 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
|
||||
_CAFE_VERSION='1.14.4'
|
||||
_EPICS_VERSION='3.14.12'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.8/latest/include/python3.8',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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.8/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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.8/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': True,
|
||||
'CAFE_VERSION': _CAFE_VERSION,
|
||||
'EPICS_VERSION': _EPICS_VERSION}
|
||||
)
|
||||
)
|
||||
98939
PyCafe.cpp
98939
PyCafe.cpp
File diff suppressed because it is too large
Load Diff
26
PyCafe.h
26
PyCafe.h
@@ -1,8 +1,9 @@
|
||||
/* Generated by Cython 0.23.4 */
|
||||
/* Generated by Cython 0.29.24 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe
|
||||
#define __PYX_HAVE__PyCafe
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
|
||||
@@ -18,21 +19,20 @@
|
||||
#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);
|
||||
__PYX_EXTERN_C void cy_monitor_handler_wrapper(void *);
|
||||
__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_handle_handler_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
|
||||
__PYX_EXTERN_C void cy_cb_handle_get_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void cy_cb_handle_put_wrapper(void *, unsigned 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
|
||||
|
||||
58686
PyCafe.html
58686
PyCafe.html
File diff suppressed because it is too large
Load Diff
7371
PyCafe.pyx
7371
PyCafe.pyx
File diff suppressed because it is too large
Load Diff
1
PyCafe.pyx
Symbolic link
1
PyCafe.pyx
Symbolic link
@@ -0,0 +1 @@
|
||||
PyCafe_sls.pyx
|
||||
7125
PyCafeDefs.html
7125
PyCafeDefs.html
File diff suppressed because it is too large
Load Diff
1375
PyCafeDefs.pxi
1375
PyCafeDefs.pxi
File diff suppressed because it is too large
Load Diff
1
PyCafeDefs.pxi
Symbolic link
1
PyCafeDefs.pxi
Symbolic link
@@ -0,0 +1 @@
|
||||
PyCafeDefs_py37.pxi
|
||||
1456
PyCafeDefs.pxi++++
Normal file
1456
PyCafeDefs.pxi++++
Normal file
File diff suppressed because it is too large
Load Diff
1456
PyCafeDefs_all.pxi
Normal file
1456
PyCafeDefs_all.pxi
Normal file
File diff suppressed because it is too large
Load Diff
1671
PyCafeDefs_pub.html
1671
PyCafeDefs_pub.html
File diff suppressed because it is too large
Load Diff
@@ -7,39 +7,37 @@ cdef object cbobjt = None
|
||||
# ***********public or api***************
|
||||
# For when with pvdata
|
||||
|
||||
|
||||
cdef public void cy_monitor_handler_wrapper(void * callback) with gil:
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt()
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
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)
|
||||
|
||||
global py_cb
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname)
|
||||
cdef pvdata data = PVDataHolderToStruct(pvd)
|
||||
#data.show()
|
||||
#data.show()
|
||||
py_cb = <object>(<void *> callback)
|
||||
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)
|
||||
#print( <object>py_cb)
|
||||
cdef HandleHelper hh
|
||||
mpid = hh.getUsrArgsAsUInt(handle)
|
||||
#print("monitorId", mpid)
|
||||
#monDictGlobal[mpid](handle, pvname, data)
|
||||
<object>py_cb(handle, pvname, data)
|
||||
|
||||
'''
|
||||
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
|
||||
#if monDictGlobal[mpid] != <object>py_cb:
|
||||
# print( monDictGlobal[mpid])
|
||||
# print( <object>py_cb)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void cy_ctrl_event_handler_wrapper(void * callback,
|
||||
@@ -54,13 +52,26 @@ cdef public void cy_ctrl_event_handler_wrapper(void * callback,
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void cy_event_handler_wrapper(void * callback,
|
||||
|
||||
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)
|
||||
#(<object>args[0])(<int>args[1], <string>args[2])
|
||||
cbobjt=<object> callback
|
||||
#cbobjt=<object>args[0]
|
||||
cbobjt(handle, pvname)
|
||||
#cbobjt=<object>(<int>args[0], pvname)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void cy_handle_handler_wrapper(void * callback,
|
||||
unsigned int handle) with gil:
|
||||
#print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)
|
||||
|
||||
cbobjt=<object> callback
|
||||
cbobjt(handle, pvname)
|
||||
cbobjt(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
@@ -72,140 +83,25 @@ cdef public void cy_connect_handler_wrapper(void * callback,
|
||||
#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)
|
||||
cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil:
|
||||
print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle)
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt(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)
|
||||
cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle)
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
110
PyCafeDefs_pub.pxi+
Normal file
110
PyCafeDefs_pub.pxi+
Normal file
@@ -0,0 +1,110 @@
|
||||
|
||||
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_monitor_handler_wrapper(void * callback) with gil:
|
||||
cbobjt=<object> (<void *> callback)
|
||||
print("CALLED")
|
||||
cbobjt()
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
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)
|
||||
cdef HandleHelper hh
|
||||
mpid = hh.getUsrArgsAsUInt(handle)
|
||||
#print("monitorId", mpid)
|
||||
#monDictGlobal[mpid](handle, pvname, data)
|
||||
<object>py_cb(handle, pvname, data)
|
||||
|
||||
#if monDictGlobal[mpid] != <object>py_cb:
|
||||
# print( monDictGlobal[mpid])
|
||||
# print( <object>py_cb)
|
||||
|
||||
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)
|
||||
#(<object>args[0])(<int>args[1], <string>args[2])
|
||||
cbobjt=<object> callback
|
||||
#cbobjt=<object>args[0]
|
||||
cbobjt(handle, pvname)
|
||||
#cbobjt=<object>(<int>args[0], pvname)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
cdef public void cy_handle_handler_wrapper(void * callback,
|
||||
unsigned int handle) with gil:
|
||||
#print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)
|
||||
|
||||
cbobjt=<object> callback
|
||||
cbobjt(handle)
|
||||
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:
|
||||
cbobjt=<object> callback
|
||||
cbobjt(handle, pvname, status)
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil:
|
||||
print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle)
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil:
|
||||
#print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle)
|
||||
cbobjt=<object> (<void *> callback)
|
||||
cbobjt(handle)
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
# ***********public***************
|
||||
1456
PyCafeDefs_py35.pxi
Normal file
1456
PyCafeDefs_py35.pxi
Normal file
File diff suppressed because it is too large
Load Diff
1456
PyCafeDefs_py37.pxi
Normal file
1456
PyCafeDefs_py37.pxi
Normal file
File diff suppressed because it is too large
Load Diff
15174
PyCafeDefs_sf.html
15174
PyCafeDefs_sf.html
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
||||
|
||||
# define threshold
|
||||
cdef int PYCAFE_PRINT_HIGH = 9
|
||||
cdef int PYCAFE_PRINT_MED = 5
|
||||
@@ -7,7 +6,6 @@ cdef int PYCAFE_PRINT_NONE = 0
|
||||
|
||||
cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE
|
||||
|
||||
|
||||
#ctypedef shared_ptr[vector[double]] vdouble_ptr
|
||||
#ctypedef shared_ptr[vector[float]] vfloat_ptr
|
||||
|
||||
|
||||
166071
PyCafe_sf.cpp
166071
PyCafe_sf.cpp
File diff suppressed because it is too large
Load Diff
42
PyCafe_sf.h
42
PyCafe_sf.h
@@ -1,42 +0,0 @@
|
||||
/* Generated by Cython 0.23.4 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe_sf
|
||||
#define __PYX_HAVE__PyCafe_sf
|
||||
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe_sf
|
||||
|
||||
#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_sf */
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPyCafe_sf(void);
|
||||
#else
|
||||
PyMODINIT_FUNC PyInit_PyCafe_sf(void);
|
||||
#endif
|
||||
|
||||
#endif /* !__PYX_HAVE__PyCafe_sf */
|
||||
54836
PyCafe_sf.html
54836
PyCafe_sf.html
File diff suppressed because it is too large
Load Diff
@@ -600,6 +600,8 @@ cdef extern from "handleHelper.h":
|
||||
|
||||
unsigned int getNmonitor(unsigned int)
|
||||
vector[unsigned int] getMonitorIDs(unsigned int)
|
||||
vector[unsigned int] getMonitorIDsInWaiting(unsigned int)
|
||||
int updateMonitorPolicyDeltaMS(unsigned int, unsigned int, unsigned short)
|
||||
|
||||
int getDataTypeNative (unsigned int, long &)
|
||||
int getDataTypeRequest(unsigned int, long &)
|
||||
@@ -629,16 +631,19 @@ cdef extern from "policies.h":
|
||||
MonitorPolicy()
|
||||
unsigned int getMonitorID()
|
||||
void setMask(unsigned int)
|
||||
void setNelem(unsigned int)
|
||||
void setDataType(chtype)
|
||||
void setCafeDbrType(DBR_TYPE)
|
||||
void setHandler(pCallback)
|
||||
void setDefaultHandler()
|
||||
void setNotifyDeltaMilliSeconds(unsigned short)
|
||||
void setNoCyCallbackParameters(unsigned short)
|
||||
void setCyCallback(void *)
|
||||
void setPyHandler()
|
||||
void setPyHandlerData()
|
||||
void setPyCyHandler(void *)
|
||||
void setPyCyHandlerData(void *)
|
||||
void setPyCyHandlerHandle(void *)
|
||||
void setUserArgs(void *)
|
||||
unsigned int getMask()
|
||||
unsigned int getNelem()
|
||||
@@ -679,8 +684,8 @@ cdef extern from "policies.h":
|
||||
pCallback getHandler()
|
||||
int getCallbackStatus()
|
||||
void setHandler(pCallback h)
|
||||
void setPyHandlerGet()
|
||||
void setPyHandlerPut()
|
||||
void setPyHandlerGet(void *)
|
||||
void setPyHandlerPut(void *)
|
||||
void setMethodKind(ChannelRequestPolicyKind)
|
||||
void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind)
|
||||
void setWaitKind(ChannelWaitForResponsePolicyKind)
|
||||
@@ -1199,6 +1204,9 @@ cdef extern from "cafe.h":
|
||||
|
||||
PolicyHelper getPolicyHelper()
|
||||
HandleHelper getHandleHelper()
|
||||
|
||||
string _epics_version() nogil
|
||||
string _ca_version() nogil
|
||||
|
||||
int _ca_pend_io(double) nogil
|
||||
int _ca_pend_event(double) nogil
|
||||
|
||||
1008
PyCafe_sf.pyx
1008
PyCafe_sf.pyx
File diff suppressed because it is too large
Load Diff
7708
PyCafe_sf.pyx+
Normal file
7708
PyCafe_sf.pyx+
Normal file
File diff suppressed because it is too large
Load Diff
7679
PyCafe_sf.pyx+++
Normal file
7679
PyCafe_sf.pyx+++
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,13 @@ cdef extern from "<map>" namespace "std":
|
||||
pair[iterator, bint] insert(pair[T, U]) nogil
|
||||
iterator find(T & ) nogil
|
||||
|
||||
|
||||
cdef extern from "epicsMutex.h":
|
||||
ctypedef LIBCOM_API epicsMutex
|
||||
cdef cppclass LIBCOM_API:
|
||||
pass
|
||||
|
||||
|
||||
cdef extern from "cadef.h":
|
||||
|
||||
ctypedef long chtype
|
||||
@@ -600,6 +607,8 @@ cdef extern from "handleHelper.h":
|
||||
|
||||
unsigned int getNmonitor(unsigned int)
|
||||
vector[unsigned int] getMonitorIDs(unsigned int)
|
||||
vector[unsigned int] getMonitorIDsInWaiting(unsigned int)
|
||||
int updateMonitorPolicyDeltaMS(unsigned int, unsigned int, unsigned short)
|
||||
|
||||
int getDataTypeNative (unsigned int, long &)
|
||||
int getDataTypeRequest(unsigned int, long &)
|
||||
@@ -629,16 +638,19 @@ cdef extern from "policies.h":
|
||||
MonitorPolicy()
|
||||
unsigned int getMonitorID()
|
||||
void setMask(unsigned int)
|
||||
void setNelem(unsigned int)
|
||||
void setDataType(chtype)
|
||||
void setCafeDbrType(DBR_TYPE)
|
||||
void setHandler(pCallback)
|
||||
void setDefaultHandler()
|
||||
void setNotifyDeltaMilliSeconds(unsigned short)
|
||||
void setNoCyCallbackParameters(unsigned short)
|
||||
void setCyCallback(void *)
|
||||
void setPyHandler()
|
||||
void setPyHandlerData()
|
||||
void setPyCyHandler(void *)
|
||||
void setPyCyHandlerData(void *)
|
||||
void setPyCyHandlerHandle(void *)
|
||||
void setUserArgs(void *)
|
||||
unsigned int getMask()
|
||||
unsigned int getNelem()
|
||||
@@ -679,8 +691,8 @@ cdef extern from "policies.h":
|
||||
pCallback getHandler()
|
||||
int getCallbackStatus()
|
||||
void setHandler(pCallback h)
|
||||
void setPyHandlerGet()
|
||||
void setPyHandlerPut()
|
||||
void setPyHandlerGet(void *)
|
||||
void setPyHandlerPut(void *)
|
||||
void setMethodKind(ChannelRequestPolicyKind)
|
||||
void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind)
|
||||
void setWaitKind(ChannelWaitForResponsePolicyKind)
|
||||
@@ -1114,6 +1126,8 @@ cdef extern from "cafe.h":
|
||||
PolicyHelper getPolicyHelper()
|
||||
HandleHelper getHandleHelper()
|
||||
|
||||
string _epics_version() nogil
|
||||
string _ca_version() nogil
|
||||
int _ca_pend_io(double) nogil
|
||||
int _ca_pend_event(double) nogil
|
||||
int _ca_flush_io() nogil
|
||||
@@ -1199,6 +1213,8 @@ cdef extern from "cafe.h":
|
||||
|
||||
string getChannelIDAsString(chid)
|
||||
|
||||
int wfExpress(const unsigned int handle, const unsigned int, dbr_char_t *)
|
||||
|
||||
int getWFAsString(unsigned int, string &) nogil
|
||||
int getWFAsStringCache(unsigned int, string &)
|
||||
|
||||
@@ -1206,6 +1222,7 @@ cdef extern from "cafe.h":
|
||||
int getCacheFloatArray(unsigned int, float *)
|
||||
int getCacheDoubleArray(unsigned int, double *)
|
||||
int getCacheShortArray(unsigned int, short * )
|
||||
int getCacheCharArray(unsigned int, dbr_char_t * )
|
||||
int getCacheLongArray(unsigned int, int * )
|
||||
int getCacheStringArray(unsigned int, string * )
|
||||
int getCacheDbrStringArray(unsigned int, dbr_string_t[])
|
||||
|
||||
8037
PyCafe_sls.pyx
Normal file
8037
PyCafe_sls.pyx
Normal file
File diff suppressed because it is too large
Load Diff
8037
PyCafe_sls.pyx++++
Normal file
8037
PyCafe_sls.pyx++++
Normal file
File diff suppressed because it is too large
Load Diff
7953
PyCafe_sls.pyx++++WithPrint
Normal file
7953
PyCafe_sls.pyx++++WithPrint
Normal file
File diff suppressed because it is too large
Load Diff
7953
PyCafe_sls.pyx_buff
Normal file
7953
PyCafe_sls.pyx_buff
Normal file
File diff suppressed because it is too large
Load Diff
8044
PyCafe_sls_py35.pyx
Normal file
8044
PyCafe_sls_py35.pyx
Normal file
File diff suppressed because it is too large
Load Diff
12
build_py310.sh
Normal file
12
build_py310.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
module unload gcc
|
||||
module load gcc/9.3.0
|
||||
rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
|
||||
source /opt/gfa/python 3.8
|
||||
/ioc/python/latest/bin/python setup_py310.py build_ext -b ./python3.10/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.10/lib/${EPICS_HOST_ARCH}
|
||||
18
build_py34_sls2.sh
Normal file
18
build_py34_sls2.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
#rm -f PyCafe.cpp
|
||||
#rm -f PyCafe.h
|
||||
#rm -f PyCafe.pxd
|
||||
#ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
#rm -f PyCafe.pyx
|
||||
#ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
module unload psi-python34
|
||||
module unload psi-python36
|
||||
module unload Python
|
||||
module load psi-python34/2.1.0
|
||||
|
||||
python setup_py34_sls2.py build_ext -b ./python3.4-sls2/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.4-sls2/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
|
||||
#/opt/psi/Programming/psi-python34/2.1.0/bin/python
|
||||
@@ -1,9 +1,9 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
#rm -f PyCafe.cpp
|
||||
#rm -f PyCafe.h
|
||||
#rm -f PyCafe.pxd
|
||||
#ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
|
||||
source /opt/gfa/python 3.5
|
||||
python setup_py35.py build_ext -b ./python3.5/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
11
build_py35_sls.sh
Normal file
11
build_py35_sls.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
#rm -f PyCafe.cpp
|
||||
#rm -f PyCafe.h
|
||||
#rm -f PyCafe.pxd
|
||||
#ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
#rm -f PyCafe.pyx
|
||||
#ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.5
|
||||
python setup_py35_sls.py build_ext -b ./python3.5-sls/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.5-sls/lib/${EPICS_HOST_ARCH}
|
||||
11
build_py35_sls2.sh
Normal file
11
build_py35_sls2.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
#rm -f PyCafe.cpp
|
||||
#rm -f PyCafe.h
|
||||
#rm -f PyCafe.pxd
|
||||
#ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
#rm -f PyCafe.pyx
|
||||
#ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.5
|
||||
python setup_py35_sls2.py build_ext -b ./python3.5-sls2/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.5-sls2/lib/${EPICS_HOST_ARCH}
|
||||
@@ -1,9 +1,11 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
rm -f PyCafe_sf.cpp
|
||||
rm -f PyCafe_sf.h
|
||||
rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sf.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sf.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.7
|
||||
python setup_py37_sf.py build_ext -b ./python3.7-sf/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.7-sf/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
9
build_py37_sf_local.sh
Normal file
9
build_py37_sf_local.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
rm -f PyCafe_sf.cpp
|
||||
rm -f PyCafe_sf.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sf.pxd PyCafe.pxd
|
||||
source /opt/gfa/python 3.7
|
||||
python setup_py37_sf_local.py build_ext -b ./python3.7-sf/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.7-sf/lib/${EPICS_HOST_ARCH}
|
||||
@@ -4,6 +4,8 @@ rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.7
|
||||
python setup_py37_sls2.py build_ext -b ./python3.7-sls2/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.7-sls2/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
11
build_py38_sf.sh
Normal file
11
build_py38_sf.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sf.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sf.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.8
|
||||
python setup_py38_sf.py build_ext -b ./python3.8-sf/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.8-sf/lib/${EPICS_HOST_ARCH}
|
||||
11
build_py38_sls2.sh
Normal file
11
build_py38_sls2.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
module unload gcc
|
||||
module load gcc/7.5.0
|
||||
rm -f PyCafe.cpp
|
||||
rm -f PyCafe.h
|
||||
rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sls.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sls.pyx PyCafe.pyx
|
||||
source /opt/gfa/python 3.8
|
||||
python setup_py38_sls2.py build_ext -b ./python3.8-sls2/lib/${EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.8-sls2/lib/${EPICS_HOST_ARCH}
|
||||
119
diff_pxd_sf_sls
Normal file
119
diff_pxd_sf_sls
Normal file
@@ -0,0 +1,119 @@
|
||||
639d638
|
||||
< void setNoCyCallbackParameters(unsigned short)
|
||||
645d643
|
||||
< void setPyCyHandlerHandle(void *)
|
||||
686,687c684,685
|
||||
< void setPyHandlerGet(void *)
|
||||
< void setPyHandlerPut(void *)
|
||||
---
|
||||
> void setPyHandlerGet()
|
||||
> void setPyHandlerPut()
|
||||
956,1041d953
|
||||
< cdef extern from "zbsDataHolders.h":
|
||||
<
|
||||
< cdef cppclass BSChannel:
|
||||
< BSChannel(string) except +
|
||||
< void setType()
|
||||
< void setOffset()
|
||||
< void setModulo()
|
||||
< void setBSEnabled()
|
||||
< string getName()
|
||||
< string getType()
|
||||
< int getModulo()
|
||||
< int getOffset()
|
||||
< unsigned int getNelem()
|
||||
< bint isBSEnabled()
|
||||
<
|
||||
< cdef cppclass BSDataHolder:
|
||||
< BSDataHolder() except +
|
||||
< BSDataHolder(vector[string]) except +
|
||||
< void init(vector[string])
|
||||
< BSChannel getBSChannel(unsigned int)
|
||||
< int getIdxFromName(string)
|
||||
< etsNorm getGlobal_timestamp()
|
||||
< unsigned long long getPulse_id()
|
||||
< vector[unsigned int] getHandles()
|
||||
< vector[string] getPV()
|
||||
< vector[PVDataHolder] getPVDataV()
|
||||
< vector[string] getAsStringV()
|
||||
< vector[double] getAsDoubleV()
|
||||
< vector[float] getAsFloatV()
|
||||
< vector[int] getAsIntV()
|
||||
< int reconnect()
|
||||
< void closeBS()
|
||||
< int resetBS()
|
||||
< int setBS(bint)
|
||||
< int setCA(bint)
|
||||
< void setTimeout(int)
|
||||
< void setHWM(int)
|
||||
< bint getIsBS()
|
||||
< void setBSModulo(string, int)
|
||||
< void setBSOffset(string, int)
|
||||
< void setBSModuloOffset(string, int, int)
|
||||
< void printHeader()
|
||||
< unsigned int getNPV()
|
||||
< unsigned int getHWM()
|
||||
< int getTimeout()
|
||||
< unsigned int getNChannels()
|
||||
< unsigned int getNNullData()
|
||||
< float getPGoodData()
|
||||
< void zero()
|
||||
< int getStatus()
|
||||
<
|
||||
< cdef cppclass DBPMData:
|
||||
< double getValue()
|
||||
< epicsTimeStamp getEpicsTimeStamp()
|
||||
< int getStatus()
|
||||
<
|
||||
< cdef cppclass DBPMKeeper:
|
||||
< DBPMKeeper() except +
|
||||
< # DBPMKeeper(vector[string], vector[unsigned int], multimap[float, string])
|
||||
< DBPMKeeper(vector[string], vector[unsigned int], vector[string], vector[float]) except +
|
||||
< vector[unsigned int] getHandle()
|
||||
< vector[string] getPV()
|
||||
< vector[string] getDevice()
|
||||
<
|
||||
< vector[double] getS()
|
||||
< vector[DBPMData] getX()
|
||||
< vector[DBPMData] getY()
|
||||
< vector[DBPMData] getQ()
|
||||
< vector[DBPMData] getEnergy()
|
||||
<
|
||||
< vector[double] getOffsetX()
|
||||
< vector[double] getOffsetY()
|
||||
<
|
||||
< bint getIsAllXOK()
|
||||
< bint getIsAllYOK()
|
||||
< bint getIsAllQOK()
|
||||
< bint getIsAllEnergyOK()
|
||||
< bint getIsAllOK()
|
||||
< bint setBS(bint)
|
||||
< bint resetBS()
|
||||
< void closeBS()
|
||||
< int getStatus()
|
||||
< PVDataHolder * pvd
|
||||
< int getNPV()
|
||||
<
|
||||
<
|
||||
1432,1433c1344,1345
|
||||
< int readDBPMOffsets(DBPMKeeper &)
|
||||
< int getDBPM(DBPMKeeper &) nogil
|
||||
---
|
||||
> #int readDBPMOffsets(DBPMKeeper &)
|
||||
> #int getDBPM(DBPMKeeper &) nogil
|
||||
1435c1347
|
||||
< int prepareDBPM(vector[string] & , vector[unsigned int] & , vector[string] & , vector[float] & ) nogil
|
||||
---
|
||||
> #int prepareDBPM(vector[string] & , vector[unsigned int] & , vector[string] & , vector[float] & ) nogil
|
||||
1445,1449c1357,1361
|
||||
< int initBSwithCA(BSDataHolder &) nogil
|
||||
< int setBS(BSDataHolder &) nogil
|
||||
< int setBS2CAGroup(BSDataHolder &) nogil
|
||||
< int getBS(BSDataHolder &) nogil
|
||||
< int closeBS(BSDataHolder &) nogil
|
||||
---
|
||||
> #int initBSwithCA(BSDataHolder &) nogil
|
||||
> #int setBS(BSDataHolder &) nogil
|
||||
> #int setBS2CAGroup(BSDataHolder &) nogil
|
||||
> #int getBS(BSDataHolder &) nogil
|
||||
> #int closeBS(BSDataHolder &) nogil
|
||||
717
diff_pyx_sf_sls
Normal file
717
diff_pyx_sf_sls
Normal file
@@ -0,0 +1,717 @@
|
||||
44c44
|
||||
< _pymodule = "PyCafe.pyx"
|
||||
---
|
||||
> _pymodule = "PyCafe.pyx" # os.path.basename(__file__)
|
||||
49a50,52
|
||||
> cdef object py_cb
|
||||
>
|
||||
> cdef dict openCallbackDictGlobal = {}
|
||||
50a54,59
|
||||
> cdef dict handleMonDictGlobal = {}
|
||||
> cdef dict monDictGlobal = {}
|
||||
> cdef dict openDictGlobal = {}
|
||||
>
|
||||
> cdef dict getDictGlobal = {}
|
||||
> cdef dict putDictGlobal = {}
|
||||
52c61,64
|
||||
< include "PyCafeDefs_sf.pxi"
|
||||
---
|
||||
> #cdef ccafe.CAFE * _c_cafe
|
||||
> #_c_cafe = new ccafe.CAFE()
|
||||
>
|
||||
> include "PyCafeDefs.pxi"
|
||||
83a96
|
||||
>
|
||||
172,179c185
|
||||
<
|
||||
< DBPMKeeper dbpm
|
||||
<
|
||||
< bint dbpmInitialized
|
||||
< bint BSInitialized
|
||||
< bint isBSinCAOnly
|
||||
< BSDataHolder bsd
|
||||
<
|
||||
---
|
||||
>
|
||||
213,216c219
|
||||
< self.dbpmInitialized = False
|
||||
< self.BSInitialized = False
|
||||
< self.isBSinCAOnly = False
|
||||
<
|
||||
---
|
||||
>
|
||||
235,240c238
|
||||
< def CAFE_version(self):
|
||||
< return CAFE_VERSION
|
||||
<
|
||||
< def EPICS_version(self):
|
||||
< return EPICS_VERSION
|
||||
<
|
||||
---
|
||||
>
|
||||
245c243,250
|
||||
< pv_name = handlePV
|
||||
---
|
||||
> pv_name = handlePV
|
||||
> #global openCallbackDictGlobal
|
||||
> #openCallbackDictGlobal[cb] = handlePV
|
||||
> #september 21 2021
|
||||
> global openDictGlobal
|
||||
> openDictGlobal[pv_name] = cb
|
||||
>
|
||||
> #handle = self.hh.getHandleFromPV(pv_name)
|
||||
247a253,264
|
||||
> #self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True)
|
||||
> #self._c_cafe.channelCreatePolicy.setPyConnectHandler(<void *>cb)
|
||||
> #open
|
||||
> #false
|
||||
>
|
||||
> def setPyCallbackConnect(self, pv: str = None, cb: object = None):
|
||||
> if None in (pv, cb):
|
||||
> return
|
||||
> global openDictGlobal
|
||||
> openDictGlobal[pv] = cb
|
||||
>
|
||||
> ##self.hh.setPyConnectCallbackFn(handle, <void *>cb)
|
||||
274c291,299
|
||||
< self.cs.info(ECA_ALLOCMEM)))
|
||||
---
|
||||
> self.cs.info(ECA_ALLOCMEM)))
|
||||
> '''
|
||||
> _cafeException = CafeException(
|
||||
> _type='CafeError', _source=_METHOD,
|
||||
> _error_code=ECA_ALLOCMEM,
|
||||
> _error_text=self.cs.code(ECA_ALLOCMEM),
|
||||
> _error_info=self.cs.info(ECA_ALLOCMEM))
|
||||
> raise _cafeException
|
||||
> '''
|
||||
422,424c447,448
|
||||
< ##for i in range(0, len(pvV)):
|
||||
< ##self.setPyCallbackConnect(pvV[i], cb)
|
||||
< #self.setPyConnectCallbackFn(pvV[i], cb)
|
||||
---
|
||||
> for i in range(0, len(pvV)):
|
||||
> self.setPyCallbackConnect(pvV[i], cb)
|
||||
473c497
|
||||
< ####self.setPyCallbackConnect(pv, cb)
|
||||
---
|
||||
> self.setPyCallbackConnect(pv, cb)
|
||||
481c505
|
||||
< #print("OPEN WITH NO GIL//==>", pvStr, handle)
|
||||
---
|
||||
> #print("OPEN WITH NO GIL//==>", pvStr)
|
||||
486c510
|
||||
< except RuntimeError as e:
|
||||
---
|
||||
> except RuntimeError as e:
|
||||
501c525
|
||||
< raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e))
|
||||
---
|
||||
> raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e))
|
||||
791c815,816
|
||||
<
|
||||
---
|
||||
> global getDictGlobal
|
||||
>
|
||||
800,801c825,827
|
||||
< if cb is not None:
|
||||
< crp.setPyHandlerGet(<void *> cb) # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
---
|
||||
> if cb is not None:
|
||||
> getDictGlobal[handle] = cb
|
||||
> crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
859,861c885,888
|
||||
<
|
||||
< if cb is not None:
|
||||
< crp.setPyHandlerGet(<void *>cb) # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
---
|
||||
> global getDictGlobal
|
||||
> if cb is not None:
|
||||
> getDictGlobal[handle] = cb
|
||||
> crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
886,888c913,917
|
||||
<
|
||||
< if cb is not None:
|
||||
< crp.setPyHandlerPut(<void *>cb) # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
---
|
||||
>
|
||||
> global putDictGlobal
|
||||
> if cb is not None:
|
||||
> putDictGlobal[handle] = cb
|
||||
> crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED
|
||||
1402c1431
|
||||
< #decorator casts handlePV to int
|
||||
---
|
||||
> #decorator casts to handlePV to int
|
||||
4021c4050
|
||||
< return pvdict, statusOverall, status
|
||||
---
|
||||
> return pvdict
|
||||
5148a5178,5180
|
||||
> global monDictGlobal
|
||||
> global handleMonDictGlobal
|
||||
>
|
||||
5158c5190
|
||||
<
|
||||
---
|
||||
> #global py_cb
|
||||
5185,5189d5216
|
||||
< mp.setUserArgs(< void * > mpid)
|
||||
< mp.setNoCyCallbackParameters(len(sig.parameters))
|
||||
< mp.setPyCyHandler(<void *> cb)
|
||||
<
|
||||
<
|
||||
5198c5225,5245
|
||||
<
|
||||
---
|
||||
>
|
||||
> mp[i].setUserArgs( < void*> mpid)
|
||||
>
|
||||
> if len(sig.parameters) == 1:
|
||||
> monDictGlobal[mpid] = cb
|
||||
> mp[i].setPyHandler()
|
||||
>
|
||||
> elif len(sig.parameters) == 2:
|
||||
> mp[i].setPyCyHandler(<void *> cb)
|
||||
>
|
||||
> elif len(sig.parameters) == 3:
|
||||
> handleMonDictGlobal[cb] = handleList[i]
|
||||
> mp[i].setPyCyHandlerData(<void *> cb)
|
||||
>
|
||||
> else:
|
||||
> _cafeException = CafeException(_type='CafeError', _source=_METHOD,
|
||||
> _error_info="The signature of the monitor callback function is not supported. \
|
||||
> Supported fns are: \
|
||||
> 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ")
|
||||
> raise _cafeException
|
||||
>
|
||||
5236a5284,5285
|
||||
> global monDictGlobal
|
||||
> global handleMonDictGlobal
|
||||
5251c5300,5301
|
||||
<
|
||||
---
|
||||
> # April 2020 Legacy
|
||||
> #global py_cb
|
||||
5286,5290c5336
|
||||
< sig = inspect.signature(cb[i])
|
||||
<
|
||||
< mp[i].setUserArgs(< void * > mpid) # (<unsigned long *> ptr_mpid)[0])
|
||||
< mp[i].setNoCyCallbackParameters(len(sig.parameters))
|
||||
< mp[i].setPyCyHandler(<void *> cb[i])
|
||||
---
|
||||
> sig = inspect.signature(cb[i])
|
||||
5301c5347,5366
|
||||
<
|
||||
---
|
||||
> mp[i].setUserArgs( < void * > mpid) # (<unsigned long *> ptr_mpid)[0])
|
||||
>
|
||||
> if len(sig.parameters) == 1:
|
||||
> monDictGlobal[mpid] = cb[i]
|
||||
> mp[i].setPyHandler()
|
||||
>
|
||||
> elif len(sig.parameters) == 2:
|
||||
> mp[i].setPyCyHandler(<void *> cb[i])
|
||||
>
|
||||
> elif len(sig.parameters) == 3:
|
||||
> handleMonDictGlobal[cb[i]] = handleList[i]
|
||||
> mp[i].setPyCyHandlerData(<void *> cb[i])
|
||||
>
|
||||
> else:
|
||||
> _cafeException = CafeException(_type='CafeError', _source=_METHOD,
|
||||
> _error_info="The signature of the monitor callback function is not supported. \
|
||||
> Supported fns are: \
|
||||
> 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ")
|
||||
> raise _cafeException
|
||||
>
|
||||
5940a6006
|
||||
>
|
||||
5948c6014
|
||||
<
|
||||
---
|
||||
>
|
||||
5969c6035,6036
|
||||
<
|
||||
---
|
||||
>
|
||||
>
|
||||
6044a6112,6114
|
||||
> global monDictGlobal
|
||||
> global handleMonDictGlobal
|
||||
> global py_cb
|
||||
6046c6116,6117
|
||||
<
|
||||
---
|
||||
>
|
||||
> py_cb = cb
|
||||
6049,6050c6120,6121
|
||||
< hmd[cb] = mpid ##otherwise cb gets ovewritten when casting to an object
|
||||
<
|
||||
---
|
||||
> hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object
|
||||
> #print(hmd)
|
||||
6052c6123,6133
|
||||
<
|
||||
---
|
||||
> '''
|
||||
> print('SIGNATURE//3//:')
|
||||
> print(str(sig))
|
||||
> for param in sig.parameters.values():
|
||||
> print('Parameter:', param, type(param))
|
||||
> print('len1', len(sig.parameters.values()))
|
||||
> print('len2', len(sig.parameters))
|
||||
>
|
||||
> print('monitorid', mpid)
|
||||
> '''
|
||||
>
|
||||
6056,6057c6137,6165
|
||||
< mp.setNoCyCallbackParameters(len(sig.parameters))
|
||||
< mp.setPyCyHandler(<void *> cb)
|
||||
---
|
||||
>
|
||||
>
|
||||
> if len(sig.parameters) == 1:
|
||||
> ###monDictGlobal[mpid] = cb
|
||||
>
|
||||
> mp.setPyHandler()
|
||||
> # print (<long>mp.getUserArgs())
|
||||
>
|
||||
> elif len(sig.parameters) == 2:
|
||||
> mp.setPyCyHandler(<void *> cb)
|
||||
> #mp.setPyHandler()
|
||||
> #mp.setCyCallback(<void *> cb)
|
||||
>
|
||||
> elif len(sig.parameters) == 3:
|
||||
> #py_cb=cb
|
||||
> #self.hh.addWidget(handle, <void *> cb)
|
||||
>
|
||||
> mp.setPyCyHandlerData(<void *> ( py_cb))
|
||||
> #handleMonDictGlobal[cb] = handle
|
||||
>
|
||||
> #mp.setPyHandlerData()
|
||||
> #mp.setCyCallback(<void *> cb)
|
||||
> else:
|
||||
> _cafeException = CafeException(
|
||||
> _type='CafeError', _source=_METHOD,
|
||||
> _error_info="The signature of the monitor callback function \
|
||||
> given by the user is not supported. Valid fns are: \
|
||||
> 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ")
|
||||
> raise _cafeException
|
||||
6096c6204
|
||||
< cdef unsigned int mpid_no_coercion
|
||||
---
|
||||
> cdef unsigned int mpidUI
|
||||
6097a6206,6207
|
||||
> global monDictGlobal
|
||||
> #global handleMonDictGlobal
|
||||
6099c6209,6210
|
||||
<
|
||||
---
|
||||
>
|
||||
>
|
||||
6101d6211
|
||||
< mpid_no_coercion = mpid
|
||||
6103c6213
|
||||
< mpid_no_coercion = mpid
|
||||
---
|
||||
> mpidUI = mpid
|
||||
6105,6113c6215,6226
|
||||
< status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion)
|
||||
< time.sleep(0.001)
|
||||
< l = None
|
||||
< if mpid not in list(hmd.values()):
|
||||
< pass #happens when is direct mode in table widget
|
||||
< else:
|
||||
< l = list(hmd.keys())[list(hmd.values()).index(mpid)]
|
||||
< if l is not None:
|
||||
< del hmd[l]
|
||||
---
|
||||
> status = self._c_cafe.monitorStopWithID(handle, mpidUI)
|
||||
> time.sleep(0.01)
|
||||
>
|
||||
> if (status == ICAFE_NORMAL):
|
||||
> #pass
|
||||
> #print (monDictGlobal)
|
||||
> # DELETE ENTRY ONLY IF IT EXISTS!
|
||||
> # if monDictGlobal.has_key(mpidUI):
|
||||
> # Sep 2020 - try without del for testing!
|
||||
> if mpidUI in monDictGlobal.keys():
|
||||
> del monDictGlobal[mpidUI]
|
||||
>
|
||||
6118d6230
|
||||
< mids = self.hh.getMonitorIDs(handle)
|
||||
6121,6129c6233,6265
|
||||
< time.sleep(0.001)
|
||||
<
|
||||
< for monid in mids:
|
||||
< if monid not in list(hmd.values()):
|
||||
< continue
|
||||
< l = list(hmd.keys())[list(hmd.values()).index(monid)]
|
||||
< if l is not None:
|
||||
< del hmd[l]
|
||||
<
|
||||
---
|
||||
> time.sleep(0.01)
|
||||
>
|
||||
> _ncount = 0
|
||||
> for key, value in hmd.items():
|
||||
> if value == handle:
|
||||
> _ncount += 1
|
||||
>
|
||||
> for i in range (0, _ncount):
|
||||
> try:
|
||||
> l = list(hmd.keys())[list(hmd.values()).index(handle)]
|
||||
> #print (l)
|
||||
> if l is not None:
|
||||
> del hmd[l]
|
||||
> except ValueError:
|
||||
> print("List does not contain handle {0}".format(handle))
|
||||
> #{k:v for k,v in hmd.items() if v != handle}
|
||||
> ##for a, v in hmd.items():
|
||||
> ##print(a, v)
|
||||
> ##print ("DEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLETE")
|
||||
> # Find handle with monitor ID and STOP thst one monitor!
|
||||
>
|
||||
> if (status == ICAFE_NORMAL):
|
||||
>
|
||||
> # print "size", self.hh.getNmonitor(handle)
|
||||
> mpidUIV = self.hh.getMonitorIDs(handle)
|
||||
> # print "size", mpidUIV.size()
|
||||
>
|
||||
> for i in range(0, mpidUIV.size()):
|
||||
>
|
||||
> # if monDictGlobal.has_key(mpidUIV[i]):
|
||||
> if mpidUIV[i] in monDictGlobal.keys():
|
||||
> del monDictGlobal[mpidUIV[i]]
|
||||
>
|
||||
6137a6274
|
||||
> # 3
|
||||
6143d6279
|
||||
< cdef int status
|
||||
6144a6281,6282
|
||||
> global monDictGlobal
|
||||
> global handleMonDictGlobal
|
||||
6145a6284
|
||||
> cdef int status
|
||||
6152c6291,6292
|
||||
< hmd.clear()
|
||||
---
|
||||
> monDictGlobal.clear()
|
||||
> handleMonDictGlobal.clear()
|
||||
6181a6322
|
||||
>
|
||||
7232,7545d7372
|
||||
<
|
||||
< #if HAVE_BSREAD==1:
|
||||
<
|
||||
< ################################################################################
|
||||
<
|
||||
< def prepareSFdbpm(self):
|
||||
< cdef:
|
||||
< vector[string] bpmList
|
||||
< vector[unsigned int] bpmHandles
|
||||
< vector[string] bpmDev
|
||||
< vector[float] bpmPos
|
||||
<
|
||||
< self._c_cafe.prepareDBPM(bpmList, bpmHandles, bpmDev, bpmPos)
|
||||
<
|
||||
< # for i in range(0, self.bpmDev.size()):
|
||||
< #print (bpmPos[i], bpmDev[i] )
|
||||
<
|
||||
< if not self.dbpmInitialized:
|
||||
< self.dbpm = DBPMKeeper(
|
||||
< bpmList, bpmHandles, bpmDev, bpmPos)
|
||||
< self.dbpmInitialized = True
|
||||
< return
|
||||
<
|
||||
< ##################################################################################
|
||||
< # END def prepareSFdbpm(self)
|
||||
< ##################################################################################
|
||||
<
|
||||
< def setSFdbpmBS(self, bint bsFlag=True):
|
||||
< return self.dbpm.setBS(bsFlag)
|
||||
<
|
||||
< def resetSFdbpmBS(self):
|
||||
< return self.dbpm.resetBS()
|
||||
<
|
||||
< def closeSFdbpmBS(self):
|
||||
< return self.dbpm.closeBS()
|
||||
<
|
||||
< def readSFdbpmOffsets(self):
|
||||
< return self._c_cafe.readDBPMOffsets(self.dbpm)
|
||||
<
|
||||
< def getSFdbpm(self):
|
||||
<
|
||||
< cdef str _METHOD = "getSFdbpm"
|
||||
<
|
||||
< cdef int status
|
||||
< cdef vector[unsigned int] handleV
|
||||
< with nogil:
|
||||
< status = self._c_cafe.getDBPM(self.dbpm)
|
||||
<
|
||||
< if status >= ICAFE_ERRNO_BASE:
|
||||
< self._c_cafe.printStatusMessage(status)
|
||||
< elif status != ICAFE_NORMAL:
|
||||
< if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW:
|
||||
< # self._c_cafe.printStatusMessage(status)
|
||||
<
|
||||
< handleV = self.dbpm.getHandle()
|
||||
< # for i in range(0, self.dbpm.getNDBPM()):
|
||||
< # if x[i].getStatus !=
|
||||
< #print (self.bpmPos[i], self.bpmDev[i] )
|
||||
< for i in range(0, self.dbpm.getNPV()):
|
||||
< if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL):
|
||||
< self._c_cafe.printStatus(handleV[i], status)
|
||||
<
|
||||
< return dbpmHolderToStruct(self.dbpm)
|
||||
<
|
||||
< ##################################################################################
|
||||
< # END def getSFdbpm(self):
|
||||
< ##################################################################################
|
||||
<
|
||||
<
|
||||
< def getSFdbpmOffs_x(self):
|
||||
< return self.dbpm.getOffsetX()
|
||||
<
|
||||
< def getSFdbpmOffs_y(self):
|
||||
< return self.dbpm.getOffsetY()
|
||||
<
|
||||
< ################################################################################
|
||||
<
|
||||
< def setBS(self, list pv=None, modulo=None, offset=None, int timeoutMS=0):
|
||||
<
|
||||
< cdef str _METHOD = "setBS"
|
||||
< cdef int status = ICAFE_NORMAL
|
||||
< cdef unsigned int i
|
||||
< cdef bint pFlag = False
|
||||
<
|
||||
< if isinstance(modulo, numbers.Number):
|
||||
< if int(modulo) <= 0:
|
||||
< raise ValueError("{} {} \n{}".format(
|
||||
< self._exception_text, _METHOD,
|
||||
< "modulo input argument must be positive!"))
|
||||
< elif not TypeError(modulo, dict):
|
||||
< raise Exception("{} {} \n{}".format(
|
||||
< self._exception_text, _METHOD,
|
||||
< ("modulo input arg, should be of type <class 'numbers.Number'>, "
|
||||
< "else <class 'dict'> {pv_name : modulo}")))
|
||||
<
|
||||
< if isinstance(offset, (numbers.Number)):
|
||||
< if int(offset) < 0:
|
||||
< raise ValueError("{} {} \n{}".format(
|
||||
< self._exception_text, _METHOD,
|
||||
< "offset input argument cannot be negative!"))
|
||||
< elif not isinstance(offset, (dict)):
|
||||
< raise TypeError("{} {} \n{}".format(
|
||||
< self._exception_text, _METHOD,
|
||||
< ("offset input arg, should be of type <class 'numbers.Number'>, "
|
||||
< "else <class 'dict'> {pv_name : offset} ")))
|
||||
<
|
||||
< if self.BSInitialized == True:
|
||||
< print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED")
|
||||
< return status
|
||||
<
|
||||
< cdef vector[string] v
|
||||
<
|
||||
< if timeoutMS > 0:
|
||||
< self.bsd.setTimeout(timeoutMS)
|
||||
<
|
||||
< if pv is not None:
|
||||
< # do this to avoid compiler warning messages
|
||||
< for i in range(0, len(pv)):
|
||||
< v.push_back(pv[i])
|
||||
< self.bsd.init(v)
|
||||
<
|
||||
< if isinstance(modulo, (numbers.Number)):
|
||||
< modulo = dict([(pv[i], int(modulo))
|
||||
< for i in range(0, len(pv))])
|
||||
<
|
||||
< if isinstance(offset, (numbers.Number)):
|
||||
< offset = dict([(pv[i], int(offset))
|
||||
< for i in range(0, len(pv))])
|
||||
<
|
||||
< if modulo is not None:
|
||||
< for eachKey in modulo:
|
||||
< self.bsd.setBSModulo(eachKey, modulo[eachKey])
|
||||
< if offset is not None:
|
||||
< for eachKey in offset:
|
||||
< self.bsd.setBSOffset(eachKey, offset[eachKey])
|
||||
<
|
||||
< # self.initBSwithCA()
|
||||
< with nogil:
|
||||
< self._c_cafe.initBSwithCA(self.bsd)
|
||||
<
|
||||
< with nogil:
|
||||
< self._c_cafe.getBS(self.bsd)
|
||||
<
|
||||
< with nogil:
|
||||
< # status=self._c_cafe.setBS_Step1(self.bsd)
|
||||
< status = self._c_cafe.setBS(self.bsd)
|
||||
<
|
||||
< if status == ICAFE_NORMAL:
|
||||
< self.BSInitialized = True
|
||||
< self.isBSinCAOnly = False
|
||||
<
|
||||
< return status
|
||||
<
|
||||
< ################################################################################
|
||||
<
|
||||
< def initBSwithCA(self):
|
||||
<
|
||||
< # self.openPrepare()
|
||||
< with nogil:
|
||||
< self._c_cafe.initBSwithCA(self.bsd)
|
||||
<
|
||||
< # self.openNowAndWait(0.4)
|
||||
<
|
||||
<
|
||||
< ################################################################################
|
||||
< def setBS2CA(self, list pv=None):
|
||||
<
|
||||
< cdef vector[string] v
|
||||
< if pv is not None:
|
||||
< # do this to avoid compiler warning messages
|
||||
< for i in range(0, len(pv)):
|
||||
< v.push_back(pv[i])
|
||||
< self.bsd.init(v)
|
||||
<
|
||||
< with nogil:
|
||||
< self._c_cafe.setBS2CAGroup(self.bsd)
|
||||
< self.isBSinCAOnly = True
|
||||
<
|
||||
<
|
||||
< def getBSSlim(self):
|
||||
< if self.BSInitialized == False:
|
||||
< if self.isBSinCAOnly == False:
|
||||
< print(("Message from getBS: BS stream not initialized;"
|
||||
< "cafe.setBS(pvList) has first to be called."))
|
||||
< return None
|
||||
<
|
||||
< with nogil:
|
||||
< self._c_cafe.getBS(self.bsd)
|
||||
<
|
||||
<
|
||||
< t1= time.time()
|
||||
< PVDataV = self.bsd.getPVDataV()
|
||||
<
|
||||
< pvlist = [None] * <int>self.bsd.getNPV()
|
||||
< #cdef pvdata p1
|
||||
<
|
||||
< for i in range (0, self.bsd.getNPV()):
|
||||
< #p1 = pvdata()
|
||||
< #p1 = PVDataHolderToStruct(self.bsd.pvdata[i])
|
||||
< pvlist[i]=PVDataHolderToStruct(PVDataV[i])
|
||||
<
|
||||
<
|
||||
< bs_slim = {}
|
||||
<
|
||||
< for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()):
|
||||
< bs_slim[handle] = data
|
||||
<
|
||||
< t2= time.time()
|
||||
< print("diff in reading BSDataHolderToStruc", t2 - t1)
|
||||
<
|
||||
<
|
||||
< return bs_slim
|
||||
<
|
||||
< ################################################################################
|
||||
< def getBS(self):
|
||||
<
|
||||
< if self.BSInitialized == False:
|
||||
< if self.isBSinCAOnly == False:
|
||||
< print(("Message from getBS: BS stream not initialized;"
|
||||
< "cafe.setBS(pvList) has first to be called."))
|
||||
<
|
||||
< return None
|
||||
< # CHECK STATUS!!!!
|
||||
< #print("getBS in cycafe"
|
||||
< #start = time.time()
|
||||
<
|
||||
< with nogil:
|
||||
< self._c_cafe.getBS(self.bsd)
|
||||
<
|
||||
< _bsd = BSDataHolderToStruct(self.bsd)
|
||||
< #_bsd.show()
|
||||
< return _bsd #BSDataHolderToStruct(self.bsd)
|
||||
<
|
||||
< '''
|
||||
< cdef double _pid = 0
|
||||
< _handle = self._c_cafe.getHandleFromPV(str('SIN-TIMAST-EVG0:TX-PULSEID'))
|
||||
< _stat = self._c_cafe.getCacheDouble(_handle, _pid)
|
||||
< print("cython/cafe/diff in cython ", self.bsd.getPulse_id(), _pid, _pid - self.bsd.getPulse_id())
|
||||
< t1= time.time()
|
||||
< print("diff in cython", t1 - start)
|
||||
< #print("pulse_id in cycafe", self.bsd.getPulse_id())
|
||||
<
|
||||
< BSd = BSDataHolderToStruct(self.bsd)
|
||||
< t2= time.time()
|
||||
< print("diff totol in reading BSDataHolderToStruc", t2 - start)
|
||||
<
|
||||
< return BSd
|
||||
< '''
|
||||
<
|
||||
< ################################################################################
|
||||
<
|
||||
< def closeBS(self):
|
||||
< with nogil:
|
||||
< self._c_cafe.closeBS(self.bsd)
|
||||
< self.BSInitialized = False
|
||||
< self.isBSinCAOnly = False
|
||||
<
|
||||
<
|
||||
< def getTimeoutMSBS(self):
|
||||
< return self.bsd.getTimeout()
|
||||
<
|
||||
< def setTimeoutMSBS(self, int timeoutMS):
|
||||
< self.bsd.setTimeout(timeoutMS)
|
||||
<
|
||||
<
|
||||
< def reconnectBS(self):
|
||||
< self.bsd.reconnect()
|
||||
<
|
||||
<
|
||||
< def flushBS(self):
|
||||
< self.bsd.reconnect()
|
||||
<
|
||||
<
|
||||
< def monitorPulseID(self):
|
||||
< with nogil:
|
||||
< self._c_cafe.monitorPulseID()
|
||||
<
|
||||
<
|
||||
< def monitorStopPulseID(self):
|
||||
< with nogil:
|
||||
< self._c_cafe.monitorStopPulseID()
|
||||
<
|
||||
<
|
||||
< def setPulseIDBufferSize(self, handlePV, int bufferSize = 10):
|
||||
< cdef str _METHOD = "setPulseIDBufferSize"
|
||||
<
|
||||
< cdef unsigned int handle = 0
|
||||
< if isinstance(handlePV, (int, long)):
|
||||
< handle = handlePV
|
||||
< elif isinstance(handlePV, (str)):
|
||||
< handle = self.checkForHandle(handlePV)
|
||||
< else:
|
||||
< raise Exception("{} {} \n{}".format(
|
||||
< self._exception_text, _METHOD,
|
||||
< ("First Input argument should be of type <class 'int'> if handle "
|
||||
< "else <class 'str'> if PV.")))
|
||||
<
|
||||
< self._c_cafe.setPulseIDBufferSize(handle, bufferSize)
|
||||
<
|
||||
<
|
||||
< def setPulseIDBufferSizeAll(self, int bufferSize = 10):
|
||||
< self._c_cafe.setPulseIDBufferSizeAll(bufferSize)
|
||||
<
|
||||
<
|
||||
< ###################################################################################
|
||||
<
|
||||
< def setBSInit(self, list pv):
|
||||
< self.bsd.init(pv)
|
||||
<
|
||||
<
|
||||
<
|
||||
< ##################################################################################
|
||||
< #END: cdef CAFE###################################################################
|
||||
< ##################################################################################
|
||||
54
examples.py
54
examples.py
@@ -1,3 +1,4 @@
|
||||
|
||||
# python
|
||||
|
||||
import time
|
||||
@@ -124,9 +125,9 @@ def py_callback(handle: int = None, pvname: str = ""):
|
||||
print("--------")
|
||||
# alternatively:
|
||||
print("Value =", p1.value[0])
|
||||
print("status = %d" % p1.status)
|
||||
print("alarmStatus = %d" % p1.alarmStatus)
|
||||
print("alarmSeverity = %d" % p1.alarmSeverity)
|
||||
print("status = {0}".format(p1.status))
|
||||
print("alarmStatus = {0}".format(p1.alarmStatus))
|
||||
print("alarmSeverity = {0}".format(p1.alarmSeverity))
|
||||
print("ts =", p1.ts[0], p1.ts[1])
|
||||
print("tsDate =", p1.tsDate[0], p1.tsDate[1],
|
||||
p1.tsDate[2], p1.tsDate[3],
|
||||
@@ -180,9 +181,9 @@ def py_callback_pvdata(handle: int = None, pvname: str = "", pvdata: PyCafe.pvd
|
||||
print("----------")
|
||||
# alternatively:
|
||||
print("Value =", pvdata.value[0])
|
||||
print("status = %d" % pvdata.status)
|
||||
print("alarmStatus = %d" % pvdata.alarmStatus)
|
||||
print("alarmSeverity = %d" % pvdata.alarmSeverity)
|
||||
print("status = {0}".format(pvdata.status))
|
||||
print("alarmStatus = {0}".format(pvdata.alarmStatus))
|
||||
print("alarmSeverity = {0}".format(pvdata.alarmSeverity))
|
||||
print("ts =", pvdata.ts[0], pvdata.ts[1])
|
||||
print("tsDate =", pvdata.tsDate[0], pvdata.tsDate[1],
|
||||
pvdata.tsDate[2], pvdata.tsDate[3],
|
||||
@@ -274,6 +275,17 @@ def py_callback_get(handle):
|
||||
# Explicitly opening channels is good practice even if only optional
|
||||
|
||||
|
||||
print("CAFE_VERSION:", cafe.CAFE_version())
|
||||
print("EPICS_VERSION:", cafe.EPICS_version(), cafe.epics_version_string())
|
||||
print("CA_VERSION:", cafe.ca_version())
|
||||
|
||||
#cafe.monitor("ARIDI-BPM:OFB-YRMS.DESC:EGU", cb=py_callback_pvctrl)
|
||||
#time.sleep(1)
|
||||
#pvc = cafe.getCache("ARIDI-BPM:OFB-YRMS.EGU")
|
||||
#print(pvc)
|
||||
|
||||
#sys.exit(1)
|
||||
|
||||
print("INFO: pend time for open", cafe.getOpenDefaultPendTime())
|
||||
# open a single channel
|
||||
|
||||
@@ -932,7 +944,7 @@ groupHandle2 = cafe.groupOpen('gAll')
|
||||
pvg = cafe.getPVGroup(groupHandle2)
|
||||
# pvg.show()
|
||||
# or
|
||||
pvg.showWithPV(pvlistAll)
|
||||
pvg.showWithPV(pvlistAll[0:9])
|
||||
# or
|
||||
# for i in range (0, pvg.npv):
|
||||
# print(glist[i], " value=", pvg.pvdata[i].value[0],)
|
||||
@@ -943,15 +955,15 @@ values, s, sl = cafe.getGroup(groupHandle2) # by group handle
|
||||
print(values)
|
||||
if s != cyca.ICAFE_NORMAL:
|
||||
cafe.printStatusIfError(pvlistAll, sl)
|
||||
else:
|
||||
# change some values:
|
||||
values[0] = values[0] + 0.234
|
||||
values[1] = values[1] + 0.456
|
||||
values[8] = "monitor"
|
||||
|
||||
# change some values:
|
||||
values[0] = values[0] + 0.234
|
||||
values[1] = values[1] + 0.456
|
||||
values[8] = "monitor"
|
||||
|
||||
s, sl = cafe.setGroup(groupHandle2, values)
|
||||
if s != cyca.ICAFE_NORMAL:
|
||||
cafe.printStatusIfError(pvlistAll, sl)
|
||||
s, sl = cafe.setGroup(groupHandle2, values)
|
||||
if s != cyca.ICAFE_NORMAL:
|
||||
cafe.printStatusIfError(pvlistAll, sl)
|
||||
|
||||
newValues, s, sl = cafe.getGroup(groupHandle2) # by group handle
|
||||
print(newValues[0], newValues[1])
|
||||
@@ -963,11 +975,13 @@ print("--------------------------------------------------------")
|
||||
print("Note: getCompoundPVGroup does a collective asynchronous get on all group members")
|
||||
print("--------------------------------------------------------")
|
||||
print("Data from getCompoundPVGroup")
|
||||
pvg = cafe.getCompoundPVGroup('gAll', dt='str')
|
||||
pvg.showWithPV(pvlistAll)
|
||||
# or
|
||||
glist = cafe.groupMemberList('gAll')
|
||||
pvg.showWithPV(glist)
|
||||
print(glist)
|
||||
|
||||
pvg = cafe.getCompoundPVGroup('gAll', dt='str')
|
||||
pvg.showWithPV(pvlistAll[0:9])
|
||||
# or
|
||||
pvg.showWithPV(glist[0:9])
|
||||
|
||||
|
||||
print("Values of first element:")
|
||||
@@ -979,7 +993,7 @@ print("Data from getCompoundPVGroup by groupHandle")
|
||||
pvg = cafe.getCompoundPVGroup(groupHandle2, dt='float')
|
||||
|
||||
|
||||
pvg.showWithPV(pvlistAll)
|
||||
pvg.showWithPV(pvlistAll[0:9])
|
||||
# or
|
||||
print("Values of first element:")
|
||||
for i in range(0, pvg.npv):
|
||||
|
||||
11
makefile
11
makefile
@@ -7,9 +7,9 @@
|
||||
|
||||
|
||||
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sf-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.15.1-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.15.1-sf-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.15.1-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
#############################################
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
@@ -41,7 +41,10 @@ install_py37_sls2: python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
|
||||
install_py35_sls2: python3.5-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.5-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.5-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
|
||||
47
makefile-
Normal file
47
makefile-
Normal file
@@ -0,0 +1,47 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
#
|
||||
#
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#
|
||||
|
||||
|
||||
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sf-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
|
||||
#############################################
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: clean
|
||||
|
||||
help:
|
||||
@echo "Options for make: install_py37 install_py37_sf install_py37_sls2 install_py35 install_py35_sf"
|
||||
|
||||
install_py37: python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_PY)
|
||||
cp python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
|
||||
cp python3.7/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_PY)
|
||||
|
||||
install_py35: python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_PY)
|
||||
cp python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
|
||||
|
||||
install_py37_sf: python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SF)
|
||||
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
|
||||
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SF)
|
||||
|
||||
install_py35_sf: python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SF)
|
||||
cp python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
|
||||
|
||||
install_py37_sls2: python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
56
makefile_gcc_7.5.0
Normal file
56
makefile_gcc_7.5.0
Normal file
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
#
|
||||
#
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#
|
||||
|
||||
|
||||
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.16.1-gcc-7.5.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.16.1-sf-gcc-7.5.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.16.1-gcc-7.5.0/lib/${EPICS_HOST_ARCH}
|
||||
#############################################
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: clean
|
||||
|
||||
help:
|
||||
@echo "Options for make: install_py37 install_py37_sf install_py37_sls2 install_py35 install_py35_sf"
|
||||
|
||||
install_py37: python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_PY)
|
||||
cp python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
|
||||
cp python3.7/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_PY)
|
||||
|
||||
install_py35: python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_PY)
|
||||
cp python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
|
||||
|
||||
install_py37_sf: python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SF)
|
||||
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
|
||||
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SF)
|
||||
|
||||
install_py35_sf: python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SF)
|
||||
cp python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
|
||||
|
||||
install_py37_sls2: python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
install_py35_sls2: python3.5-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.5-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.5-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
install_py38_sls2: python3.8-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.8-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.8-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
133
out
Normal file
133
out
Normal file
@@ -0,0 +1,133 @@
|
||||
|
||||
--------------------------------------------------
|
||||
PRINTING ALL HANDLES
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
HANDLE= 1
|
||||
PV Name= ARIDI-BPM-01LE:X-AVG
|
||||
Data Type = DBF_DOUBLE
|
||||
Class Name= Not Supported by Gateway
|
||||
cxt/chid: 0x55d069e20470/0x55d069e2d270
|
||||
Timeouts put/get= 0.4/0.4 sec.
|
||||
isConnected?: Yes
|
||||
Monitor ID: 4096
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
HANDLE= 2 groupHandle= 1
|
||||
PV Name= ARIDI-BPM-01LE:X-AVG
|
||||
Data Type = DBF_DOUBLE
|
||||
Class Name= Not Supported by Gateway
|
||||
cxt/chid: 0x55d069e20470/0x55d069e2d2a8
|
||||
Timeouts put/get= 0.4/0.4 sec.
|
||||
Syc. Grp timeouts put/get: 5/5 sec.
|
||||
isConnected?: Yes
|
||||
Monitor ID: 4097 4100
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
HANDLE= 3 groupHandle= 1
|
||||
PV Name= ARIDI-BPM-01LE:Y-AVG
|
||||
Data Type = DBF_DOUBLE
|
||||
Class Name= Not Supported by Gateway
|
||||
cxt/chid: 0x55d069e20470/0x55d069e2d2e0
|
||||
Timeouts put/get= 0.4/0.4 sec.
|
||||
Syc. Grp timeouts put/get: 5/5 sec.
|
||||
isConnected?: Yes
|
||||
Monitor ID: 4098 4101
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
HANDLE= 4 groupHandle= 1
|
||||
PV Name= ARIDI-BPM-01SB:X-AVG
|
||||
Data Type = DBF_DOUBLE
|
||||
Class Name= Not Supported by Gateway
|
||||
cxt/chid: 0x55d069e20470/0x55d069e2d318
|
||||
Timeouts put/get= 0.4/0.4 sec.
|
||||
Syc. Grp timeouts put/get: 5/5 sec.
|
||||
isConnected?: Yes
|
||||
Monitor ID: 4099 4102
|
||||
--------------------------------------------------
|
||||
--------------------------------------------------
|
||||
END PRINTING ALL HANDLES
|
||||
--------------------------------------------------
|
||||
|
||||
PY_VERSION_HEX is 0x30707f0
|
||||
USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS
|
||||
1 ARIDI-BPM-01LE:X-AVG 0.002461060881614685
|
||||
[None, None, None] 600 [600, 600, 600]
|
||||
1 ARIDI-BPM-01LE:X-AVG 0.002461060881614685
|
||||
[None, None, None] 600 [600, 600, 600]
|
||||
============//1//
|
||||
SIGNATURE:
|
||||
(handle, pv, pvdata)
|
||||
Parameter: handle
|
||||
Parameter: pv
|
||||
Parameter: pvdata
|
||||
len1 3
|
||||
len2 3
|
||||
monitor id 4097
|
||||
============//1//
|
||||
SIGNATURE:
|
||||
(handle, pv, pvdata)
|
||||
Parameter: handle
|
||||
Parameter: pv
|
||||
Parameter: pvdata
|
||||
len1 3
|
||||
len2 3
|
||||
monitor id 4098
|
||||
============//1//
|
||||
SIGNATURE:
|
||||
(handle, pv, pvdata)
|
||||
Parameter: handle
|
||||
Parameter: pv
|
||||
Parameter: pvdata
|
||||
len1 3
|
||||
len2 3
|
||||
monitor id 4099
|
||||
============
|
||||
SIGNATURE//2//:
|
||||
(handle, pv, pvdata)
|
||||
Parameter: handle
|
||||
Parameter: pv
|
||||
Parameter: pvdata
|
||||
len1 3
|
||||
len2 3
|
||||
monitorid 4101
|
||||
============
|
||||
SIGNATURE//2//:
|
||||
(handle, pv, pvdata)
|
||||
Parameter: handle
|
||||
Parameter: pv
|
||||
Parameter: pvdata
|
||||
len1 3
|
||||
len2 3
|
||||
monitorid 4102
|
||||
status 1 [1, 1, 1]
|
||||
2 ARIDI-BPM-01LE:X-AVG 0.002461060881614685
|
||||
[0.002461060881614685, 1.618129717073e-312, 5.742534967e-315] 1 [1, 1, 1]
|
||||
3 ARIDI-BPM-01LE:Y-AVG 2.228589255537372e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 5.742534967e-315] 1 [1, 1, 1]
|
||||
4 ARIDI-BPM-01SB:X-AVG 6.235183536773548e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
3 ARIDI-BPM-01LE:Y-AVG 2.228589255537372e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
4 ARIDI-BPM-01SB:X-AVG 6.235183536773548e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
4 ARIDI-BPM-01SB:X-AVG 6.235183536773548e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
3 ARIDI-BPM-01LE:Y-AVG 2.228589255537372e-05
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
1 ARIDI-BPM-01LE:X-AVG 0.0024666127283126116
|
||||
[0.002461060881614685, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
2 ARIDI-BPM-01LE:X-AVG 0.0024666127283126116
|
||||
[0.0024666127283126116, 2.228589255537372e-05, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
3 ARIDI-BPM-01LE:Y-AVG 2.4304694079546607e-07
|
||||
[0.0024666127283126116, 2.4304694079546607e-07, 6.235183536773548e-05] 1 [1, 1, 1]
|
||||
4 ARIDI-BPM-01SB:X-AVG 3.4545060771051794e-05
|
||||
[0.0024666127283126116, 2.4304694079546607e-07, 3.4545060771051794e-05] 1 [1, 1, 1]
|
||||
1 ARIDI-BPM-01LE:X-AVG 0.0023842283990234137
|
||||
[0.0024666127283126116, 2.4304694079546607e-07, 3.4545060771051794e-05] 1 [1, 1, 1]
|
||||
2 ARIDI-BPM-01LE:X-AVG 0.0023842283990234137
|
||||
[0.0023842283990234137, 2.4304694079546607e-07, 3.4545060771051794e-05] 1 [1, 1, 1]
|
||||
3 ARIDI-BPM-01LE:Y-AVG 7.514108801842667e-06
|
||||
[0.0023842283990234137, 7.514108801842667e-06, 3.4545060771051794e-05] 1 [1, 1, 1]
|
||||
4 ARIDI-BPM-01SB:X-AVG 1.659897134231869e-05
|
||||
[0.0023842283990234137, 7.514108801842667e-06, 1.659897134231869e-05] 1 [1, 1, 1]
|
||||
1389
python3.10/lib/RHEL7-x86_64/examples.py
Normal file
1389
python3.10/lib/RHEL7-x86_64/examples.py
Normal file
File diff suppressed because it is too large
Load Diff
46
setup_py310.py
Normal file
46
setup_py310.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
#runtime_library_dirs do not override LD_LIBRARY_PATH!
|
||||
_CAFE_VERSION='1.14.4'
|
||||
_EPICS_VERSION='3.12.8'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/ioc/python/latest/include/python3.10',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-1.14.4-py310-gcc-9.3.0/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.14.4-py310-gcc-9.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/ioc/python/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/9.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/9.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.14.4-py310-gcc-9.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/ioc/python/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/9.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/9.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
52
setup_py34_sls2.py
Normal file
52
setup_py34_sls2.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.15.0-py34-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.6'
|
||||
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/psi/Programming/psi-python34/2.1.0/include/python3.4m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/compiler/gcc',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/psi/Programming/psi-python34/2.1.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/psi/Programming/psi-python34/2.1.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe', 'xml2'])
|
||||
], annotate=True,
|
||||
compile_time_env={'PY_VERSION_HEX': sys.hexversion, 'PY_EXT_C': True, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION },
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3,
|
||||
'c_string_type': 'str', 'c_string_encoding' : 'ascii',
|
||||
'py2_import': False, 'warn.unreachable': False, 'remove_unreachable': False}
|
||||
)
|
||||
)
|
||||
@@ -7,7 +7,6 @@ default_options['emit_linenums'] = True
|
||||
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'],
|
||||
@@ -17,16 +16,16 @@ setup(
|
||||
os.environ['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/cpp/cafe-1.13.0-py35-gcc-7.3.0/include',
|
||||
'/opt/gfa/cafe/cpp/cafe-1.15.0-epics3-py35-gcc-7.3.0/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.15.0-epics3-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.15.0-epics3-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/python-3.5/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
|
||||
@@ -7,21 +7,24 @@ default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_CAFE_VERSION='1.14.4'
|
||||
_EPICS_VERSION='3.14.12'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe_sf.pyx'],
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-1.13.0-sf-py35-gcc-7.3.0/include',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION + '-sf-py35-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION + '-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
@@ -31,7 +34,7 @@ setup(
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION + '-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
@@ -46,6 +49,8 @@ setup(
|
||||
'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion,
|
||||
'PY_EXT_C': True, 'BS_CAFE': True }
|
||||
'PY_EXT_C': True, 'BS_CAFE': True,
|
||||
'CAFE_VERSION': _CAFE_VERSION,
|
||||
'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
|
||||
52
setup_py35_sls.py
Normal file
52
setup_py35_sls.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.16.0-epics3-py35-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='3.14.12'
|
||||
_EPICS_HOST_ARCH = os.environ['EPICS_HOST_ARCH'] #'SL6-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/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/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
53
setup_py35_sls2.py
Normal file
53
setup_py35_sls2.py
Normal file
@@ -0,0 +1,53 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.16.0-py35-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.6'
|
||||
_EPICS_HOST_ARCH ='RHEL7-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/compiler/gcc',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
@@ -7,21 +7,27 @@ default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
|
||||
_CAFE_VERSION='1.14.5'
|
||||
_EPICS_VERSION='3.14.12'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe_sf.pyx'],
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-1.13.0-sf-py37-gcc-7.3.0/include',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
@@ -31,7 +37,8 @@ setup(
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
@@ -46,6 +53,8 @@ setup(
|
||||
'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion,
|
||||
'PY_EXT_C': True, 'BS_CAFE': True }
|
||||
'PY_EXT_C': True, 'BS_CAFE': True,
|
||||
'CAFE_VERSION': _CAFE_VERSION,
|
||||
'EPICS_VERSION': _EPICS_VERSION}
|
||||
)
|
||||
)
|
||||
|
||||
59
setup_py37_sf_local.py
Normal file
59
setup_py37_sf_local.py
Normal file
@@ -0,0 +1,59 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_CAFE_VERSION='1.14.1'
|
||||
_EPICS_VERSION='3.14.12'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['Qt5Core', 'Qt5Xml', 'ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': True ,
|
||||
'CAFE_VERSION': _CAFE_VERSION,
|
||||
'EPICS_VERSION': _EPICS_VERSION}
|
||||
)
|
||||
)
|
||||
53
setup_py37_sls.py
Normal file
53
setup_py37_sls.py
Normal file
@@ -0,0 +1,53 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.15.1-py35-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='3.14.12'
|
||||
_EPICS_HOST_ARCH ='RHEL7-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/compiler/gcc',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/gfa/python-3.5/latest/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/'
|
||||
+ _EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
@@ -7,29 +7,38 @@ default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.16.0-py37-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.6'
|
||||
_EPICS_HOST_ARCH ='RHEL7-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
os.environ['EPICS'] + '/base-7.0.4.1/include',
|
||||
os.environ['EPICS'] + '/base-7.0.4.1/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-7.0.4.1/include/compiler/gcc',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/compiler/gcc',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/include',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-7.0.4.1/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/gfa/python-3.7/latest/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-7.0.4.1/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/python-3.7/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
@@ -38,6 +47,7 @@ setup(
|
||||
'py2_import': False, 'warn.unreachable': False,
|
||||
'remove_unreachable': False},
|
||||
compile_time_env={'PY_VERSION_HEX':sys.hexversion,
|
||||
'PY_EXT_C': True, 'BS_CAFE': False }
|
||||
'PY_EXT_C': True, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
|
||||
60
setup_py38_sf.py
Normal file
60
setup_py38_sf.py
Normal file
@@ -0,0 +1,60 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
|
||||
_CAFE_VERSION='1.14.4'
|
||||
_EPICS_VERSION='3.14.12'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.8/latest/include/python3.8',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['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/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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.8/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py38-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/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.8/latest/lib',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': True,
|
||||
'CAFE_VERSION': _CAFE_VERSION,
|
||||
'EPICS_VERSION': _EPICS_VERSION}
|
||||
)
|
||||
)
|
||||
53
setup_py38_sls2.py
Normal file
53
setup_py38_sls2.py
Normal file
@@ -0,0 +1,53 @@
|
||||
import os
|
||||
import sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Compiler.Main import default_options
|
||||
default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
_GCC_VERSION='7.5.0'
|
||||
_CAFE_VERSION='1.16.1-py38-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.6'
|
||||
_EPICS_HOST_ARCH ='RHEL7-x86_64'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
include_dirs=[ '/opt/gfa/python-3.8/latest/include/python3.8m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/compiler/gcc',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include',
|
||||
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib',
|
||||
'/opt/gfa/python-3.8/latest/lib'
|
||||
],
|
||||
runtime_library_dirs=[
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _EPICS_HOST_ARCH,
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib64',
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/' + _GCC_VERSION + '/lib'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe', 'Qt5Xml', 'Qt5Core'])
|
||||
], annotate=True,
|
||||
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, 'BS_CAFE': False,
|
||||
'CAFE_VERSION': _CAFE_VERSION, 'EPICS_VERSION': _EPICS_VERSION }
|
||||
)
|
||||
)
|
||||
45
test.py
Normal file
45
test.py
Normal file
@@ -0,0 +1,45 @@
|
||||
import time
|
||||
import PyCafe
|
||||
cafe = PyCafe.CyCafe()
|
||||
cyca = PyCafe.CyCa()
|
||||
|
||||
PV1 = "ARIDI-BPM-01LE:X-AVG"
|
||||
PV2 = "ARIDI-BPM-01LE:Y-AVG"
|
||||
PV3 = "ARIDI-BPM-01SB:X-AVG"
|
||||
|
||||
def py_cb_single(handle, pv, pvdata):
|
||||
print(handle, pv, pvdata.value[0])
|
||||
|
||||
def py_cb_group(handle, pv, pvdata):
|
||||
print(handle, pv, pvdata.value[0])
|
||||
#pvdata.show()
|
||||
val, s, sl = cafe.getGroupCache('grp1')
|
||||
print(val, s, sl)
|
||||
|
||||
|
||||
GROUP_MONITOR_ALL = False
|
||||
|
||||
#Note that in this example PV1 is connected
|
||||
#twice, once outside the group and once within
|
||||
#the group
|
||||
h1 = cafe.open(PV1)
|
||||
monid = cafe.monitorStart(h1, py_cb_single)
|
||||
|
||||
cafe.defineGroup('grp1', [PV1, PV2, PV3])
|
||||
gh1 = cafe.groupOpen('grp1')
|
||||
|
||||
if GROUP_MONITOR_ALL:
|
||||
cafe.groupMonitorStart('grp1', py_cb_group)
|
||||
else:
|
||||
#Indices match [P1, PV2, PV3]
|
||||
#So cbs provided for PV2 and PV3 only
|
||||
cbList = [None, py_cb_group, py_cb_group]
|
||||
s, sl = cafe.groupMonitorStartWithCBList('grp1', cbList)
|
||||
print("status", s, sl)
|
||||
|
||||
for i in range(0, 5):
|
||||
time.sleep(0.2)
|
||||
|
||||
cafe.printHandles()
|
||||
cafe.terminate()
|
||||
|
||||
Reference in New Issue
Block a user