Compare commits
7 Commits
cafe-1.14.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 372b09651a | |||
| 7b2a786739 | |||
| 9b455dfefb | |||
| a2d636e215 | |||
| e50115776d | |||
| fdd124905b | |||
| 5c7be056d6 |
8038
#PyCafe.pyx#
Normal file
8038
#PyCafe.pyx#
Normal file
File diff suppressed because it is too large
Load Diff
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,10 +1,15 @@
|
||||
build
|
||||
#*#
|
||||
.#.#
|
||||
*.*~
|
||||
*.*-*
|
||||
*.*+*
|
||||
python3.5
|
||||
python3.5-sf
|
||||
python3.5-sls2
|
||||
python3.7
|
||||
python3.7-sf
|
||||
python3.7-sls2
|
||||
z_python-3.5-old
|
||||
z_python-3.7-old
|
||||
python3.10
|
||||
python3.10-sf
|
||||
python3.10-sls2
|
||||
|
||||
69349
PyCafe.cpp
69349
PyCafe.cpp
File diff suppressed because it is too large
Load Diff
43615
PyCafe.html
43615
PyCafe.html
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
PyCafe_sf.pxd
|
||||
PyCafe_sls.pxd
|
||||
@@ -1 +1 @@
|
||||
PyCafe_sf.pyx
|
||||
PyCafe_sls.pyx
|
||||
2332
PyCafeDefs.html
2332
PyCafeDefs.html
File diff suppressed because it is too large
Load Diff
1407
PyCafeDefs.pxi
1407
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
@@ -436,7 +436,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
}
|
||||
__pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(3, 13, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
@@ -475,8 +475,6 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">018</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_data_event_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
<pre class='cython code score-13 '>void cy_data_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVDataHolder __pyx_v_pvd) {
|
||||
struct __pyx_obj_6PyCafe_pvdata *__pyx_v_data = 0;
|
||||
HandleHelper __pyx_v_hh;
|
||||
CYTHON_UNUSED unsigned int __pyx_v_mpid;
|
||||
#ifdef WITH_THREAD
|
||||
PyGILState_STATE __pyx_gilstate_save = <span class='pyx_c_api'>__Pyx_PyGILState_Ensure</span>();
|
||||
#endif
|
||||
@@ -487,11 +485,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
goto __pyx_L0;
|
||||
__pyx_L1_error:;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10);
|
||||
<span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("PyCafe.cy_data_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
||||
__pyx_L0:;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_data);
|
||||
@@ -505,91 +503,129 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<pre class="cython line score-0"> <span class="">021</span>: <span class="n">PVDataHolder</span> <span class="n">pvd</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">022</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">023</span>: <span class="k">global</span> <span class="n">py_cb</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">024</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) </span></pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">025</span>: <span class="k">cdef</span> <span class="kt">pvdata</span> <span class="nf">data</span> <span class="o">=</span> <span class="n">PVDataHolderToStruct</span><span class="p">(</span><span class="n">pvd</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span>
|
||||
<pre class="cython line score-0"> <span class="">024</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">025</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) </span></pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">026</span>: <span class="k">cdef</span> <span class="kt">pvdata</span> <span class="nf">data</span> <span class="o">=</span> <span class="n">PVDataHolderToStruct</span><span class="p">(</span><span class="n">pvd</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 26, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
__pyx_v_data = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1);
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">026</span>: <span class="c">#data.show() </span></pre>
|
||||
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">027</span>: <span class="n">py_cb</span> <span class="o">=</span> <span class="p"><</span><span class="kt">object</span><span class="p">>(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-7 '> __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_py_cb, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 27, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">028</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">029</span>: <span class="k">cdef</span> <span class="kt">HandleHelper</span> <span class="nf">hh</span></pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">030</span>: <span class="n">mpid</span> <span class="o">=</span> <span class="n">hh</span><span class="o">.</span><span class="n">getUsrArgsAsUInt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_v_mpid = __pyx_v_hh.getUsrArgsAsUInt(__pyx_v_handle);
|
||||
</pre><pre class="cython line score-0"> <span class="">031</span>: <span class="c">#print("monitorId", mpid)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">032</span>: <span class="c">#monDictGlobal[mpid](handle, pvname, data)</span></pre>
|
||||
<pre class="cython line score-48" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: <span class="p"><</span><span class="kt">object</span><span class="p">></span><span class="n">py_cb</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-48 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_py_cb);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
||||
__pyx_t_4 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
||||
__pyx_t_5 = NULL;
|
||||
__pyx_t_6 = 0;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
|
||||
__pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
|
||||
if (likely(__pyx_t_5)) {
|
||||
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function);
|
||||
__pyx_t_6 = 1;
|
||||
</pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">027</span>: <span class="k">try</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-13 '> {
|
||||
/*try:*/ {
|
||||
/* … */
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
goto __pyx_L8_try_end;
|
||||
__pyx_L3_error:;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
/* … */
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4);
|
||||
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4);
|
||||
goto __pyx_L1_error;
|
||||
__pyx_L4_exception_handled:;
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
||||
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4);
|
||||
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4);
|
||||
__pyx_L8_try_end:;
|
||||
}
|
||||
#if CYTHON_FAST_PYCALL
|
||||
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
} else
|
||||
#endif
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
||||
if (__pyx_t_5) {
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
|
||||
</pre><pre class="cython line score-0"> <span class="">028</span>: <span class="c">#data.show() </span></pre>
|
||||
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">029</span>: <span class="n">py_cb</span> <span class="o">=</span> <span class="p"><</span><span class="kt">object</span><span class="p">>(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-7 '> __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_py_cb, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(3, 29, __pyx_L3_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">030</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">031</span>: <span class="c">##cdef HandleHelper hh</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">032</span>: <span class="c">## mpid = hh.getUsrArgsAsUInt(handle)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">033</span>: <span class="c">#print("monitorId", mpid)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">034</span>: <span class="c">#monDictGlobal[mpid](handle, pvname, data)</span></pre>
|
||||
<pre class="cython line score-48" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">035</span>: <span class="p"><</span><span class="kt">object</span><span class="p">></span><span class="n">py_cb</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-48 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_5, __pyx_n_s_py_cb);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
||||
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
||||
__pyx_t_7 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
||||
__pyx_t_8 = NULL;
|
||||
__pyx_t_9 = 0;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) {
|
||||
__pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5);
|
||||
if (likely(__pyx_t_8)) {
|
||||
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function);
|
||||
__pyx_t_9 = 1;
|
||||
}
|
||||
}
|
||||
#if CYTHON_FAST_PYCALL
|
||||
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_5)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
} else
|
||||
#endif
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_5)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_10 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10);
|
||||
if (__pyx_t_8) {
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_8); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
|
||||
}
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7);
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_data));
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_data));
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_10, 2+__pyx_t_9, ((PyObject *)__pyx_v_data));
|
||||
__pyx_t_6 = 0;
|
||||
__pyx_t_7 = 0;
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_5, __pyx_t_10, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 35, __pyx_L3_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
(void)(((PyObject *)__pyx_t_1));
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">036</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">037</span>: <span class="c">#if monDictGlobal[mpid] != <object>py_cb:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">038</span>: <span class="c"># print( monDictGlobal[mpid])</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">039</span>: <span class="c"># print( <object>py_cb)</span></pre>
|
||||
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">040</span>: <span class="k">except</span> <span class="ne">TypeError</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-4 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_TypeError);
|
||||
if (__pyx_t_9) {
|
||||
<span class='pyx_c_api'>__Pyx_ErrRestore</span>(0,0,0);
|
||||
goto __pyx_L4_exception_handled;
|
||||
}
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_data));
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_data));
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data));
|
||||
__pyx_t_3 = 0;
|
||||
__pyx_t_4 = 0;
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
(void)(((PyObject *)__pyx_t_1));
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">034</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">035</span>: <span class="c">#if monDictGlobal[mpid] != <object>py_cb:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">036</span>: <span class="c"># print( monDictGlobal[mpid])</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">037</span>: <span class="c"># print( <object>py_cb)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">038</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">039</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
goto __pyx_L5_except_error;
|
||||
__pyx_L5_except_error:;
|
||||
</pre><pre class="cython line score-0"> <span class="">041</span>: <span class="k">pass</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">042</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">043</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -604,24 +640,24 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_FastGIL_Forget</span>();
|
||||
Py_BLOCK_THREADS
|
||||
#endif
|
||||
goto __pyx_L5;
|
||||
goto __pyx_L11;
|
||||
}
|
||||
__pyx_L3_return: {
|
||||
__pyx_L9_return: {
|
||||
#ifdef WITH_THREAD
|
||||
<span class='pyx_c_api'>__Pyx_FastGIL_Forget</span>();
|
||||
Py_BLOCK_THREADS
|
||||
#endif
|
||||
goto __pyx_L0;
|
||||
}
|
||||
__pyx_L5:;
|
||||
__pyx_L11:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">040</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">044</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L9_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">041</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">042</span>: </pre>
|
||||
<pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">043</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_ctrl_event_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">045</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">046</span>: </pre>
|
||||
<pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">047</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_ctrl_event_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
<pre class='cython code score-14 '>void cy_ctrl_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVCtrlHolder __pyx_v_pvc) {
|
||||
struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_data = 0;
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
@@ -649,25 +685,25 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">044</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">045</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">046</span>: <span class="n">PVCtrlHolder</span> <span class="n">pvc</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">047</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">048</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: <span class="k">cdef</span> <span class="kt">pvctrl</span> <span class="nf">data</span> <span class="o">=</span> <span class="n">PVCtrlHolderToStruct</span><span class="p">(</span><span class="n">pvc</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-0"> <span class="">048</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">049</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">050</span>: <span class="n">PVCtrlHolder</span> <span class="n">pvc</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">051</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">052</span>: <span class="c">#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: <span class="k">cdef</span> <span class="kt">pvctrl</span> <span class="nf">data</span> <span class="o">=</span> <span class="n">PVCtrlHolderToStruct</span><span class="p">(</span><span class="n">pvc</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 53, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
__pyx_v_data = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1);
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
__pyx_v_cbobjt = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">051</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-47 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">055</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-47 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
__pyx_t_3 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
__pyx_t_3 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL;
|
||||
@@ -685,7 +721,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCALL
|
||||
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_4)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
@@ -695,7 +731,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_4)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
@@ -703,7 +739,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
||||
if (__pyx_t_5) {
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
|
||||
@@ -717,13 +753,13 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data));
|
||||
__pyx_t_2 = 0;
|
||||
__pyx_t_3 = 0;
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">052</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -750,12 +786,12 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L5:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">057</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">054</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">055</span>: </pre>
|
||||
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_event_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">058</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">059</span>: </pre>
|
||||
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">060</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_event_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
<pre class='cython code score-13 '>void cy_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) {
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
#ifdef WITH_THREAD
|
||||
@@ -781,20 +817,20 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">057</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">058</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">059</span>: <span class="c">#print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">060</span>: <span class="c">#(<object>args[0])(<int>args[1], <string>args[2]) </span></pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">061</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">061</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">062</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">063</span>: <span class="c">#print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">064</span>: <span class="c">#(<object>args[0])(<int>args[1], <string>args[2]) </span></pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">065</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)__pyx_v_callback);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
__pyx_v_cbobjt = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">062</span>: <span class="c">#cbobjt=<object>args[0]</span></pre>
|
||||
<pre class="cython line score-45" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">063</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-45 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-0"> <span class="">066</span>: <span class="c">#cbobjt=<object>args[0]</span></pre>
|
||||
<pre class="cython line score-45" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">067</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-45 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
__pyx_t_3 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
__pyx_t_3 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL;
|
||||
@@ -812,7 +848,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCALL
|
||||
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_4)) {
|
||||
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
@@ -822,7 +858,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_4)) {
|
||||
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3};
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
@@ -830,7 +866,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
__pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
||||
if (__pyx_t_5) {
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
|
||||
@@ -841,15 +877,15 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
|
||||
__pyx_t_2 = 0;
|
||||
__pyx_t_3 = 0;
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 67, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">064</span>: <span class="c">#cbobjt=<object>(<int>args[0], pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">065</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">066</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">068</span>: <span class="c">#cbobjt=<object>(<int>args[0], pvname)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">069</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">070</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -876,11 +912,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L5:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">067</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">071</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">068</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">069</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_handle_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">072</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_handle_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
<pre class='cython code score-11 '>void cy_handle_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
#ifdef WITH_THREAD
|
||||
@@ -904,16 +940,16 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">070</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">071</span>: <span class="c">#print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">072</span>: </pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">074</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">075</span>: <span class="c">#print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">076</span>: </pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">077</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)__pyx_v_callback);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
__pyx_v_cbobjt = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">074</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">078</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 78, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL;
|
||||
@@ -929,11 +965,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 74, __pyx_L1_error)</span>
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(3, 78, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">075</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">079</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -960,11 +996,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L5:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">076</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">080</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">077</span>: </pre>
|
||||
<pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">078</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_connect_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">081</span>: </pre>
|
||||
<pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">082</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_connect_handler_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span></pre>
|
||||
<pre class='cython code score-14 '>void cy_connect_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, int __pyx_v_status) {
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
#ifdef WITH_THREAD
|
||||
@@ -991,28 +1027,28 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">079</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">080</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">081</span>: <span class="nb">int</span> <span class="n">status</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">082</span>: <span class="c">#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">083</span>: <span class="c">#print(" callback is ", <object> callback)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">084</span>: </pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">085</span>: <span class="k">if</span> <span class="n">callback</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">083</span>: <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">084</span>: <span class="n">string</span> <span class="n">pvname</span><span class="p">,</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">085</span>: <span class="nb">int</span> <span class="n">status</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">086</span>: <span class="c">#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">087</span>: <span class="c">#print(" callback is ", <object> callback)</span></pre>
|
||||
<pre class="cython line score-0"> <span class="">088</span>: </pre>
|
||||
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">089</span>: <span class="k">if</span> <span class="n">callback</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_callback != 0);
|
||||
if (__pyx_t_1) {
|
||||
/* … */
|
||||
}
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">086</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">090</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="n">callback</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_2 = ((PyObject *)__pyx_v_callback);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2);
|
||||
__pyx_v_cbobjt = __pyx_t_2;
|
||||
__pyx_t_2 = 0;
|
||||
</pre><pre class="cython line score-50" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">087</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">status</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-50 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-50" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">091</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">pvname</span><span class="p">,</span> <span class="n">status</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-50 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
||||
__pyx_t_4 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_4 = <span class='pyx_c_api'>__pyx_convert_PyStr_string_to_py_std__in_string</span>(__pyx_v_pvname);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
||||
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_status);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_status);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_6 = __pyx_v_cbobjt; __pyx_t_7 = NULL;
|
||||
@@ -1030,7 +1066,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCALL
|
||||
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_6)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5};
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
@@ -1041,7 +1077,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_6)) {
|
||||
PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5};
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
@@ -1050,7 +1086,7 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9);
|
||||
if (__pyx_t_7) {
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
|
||||
@@ -1064,14 +1100,14 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_t_3 = 0;
|
||||
__pyx_t_4 = 0;
|
||||
__pyx_t_5 = 0;
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_6, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)</span>
|
||||
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_6, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 91, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
|
||||
}
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
</pre><pre class="cython line score-0"> <span class="">088</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">089</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">092</span>: </pre>
|
||||
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -1098,12 +1134,12 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L6:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">090</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">094</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L4_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">091</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">092</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_cb_handle_get_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span> <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">095</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">096</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">097</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_cb_handle_get_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span> <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-11 '>void cy_cb_handle_get_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
#ifdef WITH_THREAD
|
||||
@@ -1127,10 +1163,10 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">094</span>: <span class="k">print</span><span class="p">(</span><span class="s">" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:"</span><span class="p">,</span> <span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-14 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: <span class="k">print</span><span class="p">(</span><span class="s">" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:"</span><span class="p">,</span> <span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-14 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)</span>
|
||||
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 98, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha);
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha);
|
||||
@@ -1138,17 +1174,17 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
||||
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_t_1);
|
||||
__pyx_t_1 = 0;
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_print, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)</span>
|
||||
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_print, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">095</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">099</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
__pyx_v_cbobjt = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">096</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">100</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 100, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL;
|
||||
@@ -1164,11 +1200,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span>
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(3, 100, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">097</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">101</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -1195,12 +1231,12 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L5:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">102</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">099</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">100</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">101</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_cb_handle_put_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span> <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">103</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">104</span>: </pre>
|
||||
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">105</span>: <span class="k">cdef</span> <span class="kr">public</span> <span class="kt">void</span> <span class="nf">cy_cb_handle_put_wrapper</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span> <span class="n">callback</span><span class="p">,</span> <span class="nb">unsigned</span> <span class="nb">int</span> <span class="n">handle</span><span class="p">)</span> <span class="k">with</span> <span class="k">gil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-11 '>void cy_cb_handle_put_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) {
|
||||
PyObject *__pyx_v_cbobjt = NULL;
|
||||
#ifdef WITH_THREAD
|
||||
@@ -1224,14 +1260,14 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
<span class='pyx_c_api'>__Pyx_PyGILState_Release</span>(__pyx_gilstate_save);
|
||||
#endif
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">102</span>: <span class="c">#print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle)</span></pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">103</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">106</span>: <span class="c">#print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle)</span></pre>
|
||||
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">107</span>: <span class="n">cbobjt</span><span class="o">=</span><span class="p"><</span><span class="kt">object</span><span class="p">></span> <span class="p">(</span><span class="o"><</span><span class="n">void</span> <span class="o">*></span> <span class="n">callback</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback));
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
||||
__pyx_v_cbobjt = __pyx_t_1;
|
||||
__pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">104</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)</span>
|
||||
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">108</span>: <span class="n">cbobjt</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span></pre>
|
||||
<pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_From_unsigned_int</span>(__pyx_v_handle);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 108, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cbobjt);
|
||||
__pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL;
|
||||
@@ -1247,11 +1283,11 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2);
|
||||
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span>
|
||||
if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(3, 108, __pyx_L1_error)</span>
|
||||
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
||||
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">105</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">109</span>: <span class="k">with</span> <span class="k">nogil</span><span class="p">:</span></pre>
|
||||
<pre class='cython code score-6 '> {
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save;
|
||||
@@ -1278,10 +1314,10 @@ body.cython { font-family: courier; font-size: 12; }
|
||||
__pyx_L5:;
|
||||
}
|
||||
}
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">106</span>: <span class="k">return</span></pre>
|
||||
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">110</span>: <span class="k">return</span></pre>
|
||||
<pre class='cython code score-0 '> goto __pyx_L3_return;
|
||||
}
|
||||
</pre><pre class="cython line score-0"> <span class="">107</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">108</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">109</span>: <span class="c"># ***********public***************</span></pre>
|
||||
</pre><pre class="cython line score-0"> <span class="">111</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">112</span>: </pre>
|
||||
<pre class="cython line score-0"> <span class="">113</span>: <span class="c"># ***********public***************</span></pre>
|
||||
</div></body></html>
|
||||
|
||||
@@ -20,22 +20,26 @@ cdef public void cy_data_event_handler_wrapper(void * callback,
|
||||
string pvname,
|
||||
PVDataHolder pvd) with gil:
|
||||
|
||||
global py_cb
|
||||
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)
|
||||
try:
|
||||
#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)
|
||||
|
||||
#if monDictGlobal[mpid] != <object>py_cb:
|
||||
# print( monDictGlobal[mpid])
|
||||
# print( <object>py_cb)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
with nogil:
|
||||
return
|
||||
|
||||
|
||||
109
PyCafeDefs_pub.pxi_06March2024
Normal file
109
PyCafeDefs_pub.pxi_06March2024
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
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)
|
||||
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
6704
PyCafeDefs_sf.html
6704
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
|
||||
|
||||
|
||||
@@ -631,6 +631,7 @@ 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)
|
||||
@@ -1203,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
|
||||
|
||||
103
PyCafe_sf.pyx
103
PyCafe_sf.pyx
@@ -215,6 +215,7 @@ cdef class CyCafe:
|
||||
self.isBSinCAOnly = False
|
||||
|
||||
print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX))
|
||||
print("numpy version is ", np.version.version)
|
||||
|
||||
IF PY_EXT_C:
|
||||
print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS")
|
||||
@@ -232,6 +233,12 @@ cdef class CyCafe:
|
||||
|
||||
###########################################################################
|
||||
|
||||
def ca_version(self):
|
||||
return self._c_cafe._ca_version()
|
||||
|
||||
def epics_version_string(self):
|
||||
return self._c_cafe._epics_version()
|
||||
|
||||
def CAFE_version(self):
|
||||
return CAFE_VERSION
|
||||
|
||||
@@ -1039,16 +1046,16 @@ cdef class CyCafe:
|
||||
############################################################################
|
||||
def loadCollectionsFromXML(self, const char * fileName):
|
||||
with nogil:
|
||||
self._c_cafe.loadCollectionsFromXML(fileName)
|
||||
return
|
||||
status = self._c_cafe.loadCollectionsFromXML(fileName)
|
||||
return status
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
|
||||
def loadGroupsFromXML(self, const char * fileName):
|
||||
with nogil:
|
||||
self._c_cafe.loadGroupsFromXML(fileName)
|
||||
return
|
||||
status = self._c_cafe.loadGroupsFromXML(fileName)
|
||||
return status
|
||||
############################################################################
|
||||
|
||||
def devicePositionMap(self, const char * collectionName):
|
||||
@@ -2308,7 +2315,8 @@ cdef class CyCafe:
|
||||
raise _cafeException
|
||||
return [None]
|
||||
|
||||
cdef unsigned int dtcheck = dtr
|
||||
#JC Feb 2022 must be int as CAFE_TYPENOTCONN is -1
|
||||
cdef int dtcheck = dtr
|
||||
dtcheck = getMatchedDataType(dt, dtr)
|
||||
|
||||
#print ("dtcheck input/native", dtcheck, dt, dtr)
|
||||
@@ -3247,7 +3255,7 @@ cdef class CyCafe:
|
||||
cdef int status
|
||||
|
||||
if cacheFlag:
|
||||
status = self._c_cafe.getCachePVArray(v, pvd)
|
||||
status = self._c_cafe.getCachePVArray(v, pvd)
|
||||
else:
|
||||
with nogil:
|
||||
status = self._c_cafe.getPVArray(v, pvd)
|
||||
@@ -4340,30 +4348,31 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus)
|
||||
|
||||
#warning: __pyx_v_i may be used uninitialized in this function
|
||||
bytesVal = <bytes> (<string> self.vStr[i] )
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(v[i]):
|
||||
try:
|
||||
strVal = (bytesVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-8')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-16')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
strVal = <string> self.vStr[i]
|
||||
for i in range(0, len(v)):
|
||||
bytesVal = <bytes> (<string> self.vStr[i] )
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(v[i]):
|
||||
try:
|
||||
strVal = (bytesVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-8')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-16')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
strVal = <string> self.vStr[i]
|
||||
|
||||
localList.append(strVal)
|
||||
localList.append(strVal)
|
||||
|
||||
return localList, status, vStatus
|
||||
|
||||
@@ -4923,7 +4932,7 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(handle):
|
||||
try:
|
||||
strVal = (bVal).decode('latin-1')
|
||||
valStr = (bVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -5548,19 +5557,19 @@ First input argument, should be of type <class 'int'> if handle, else <class 'st
|
||||
sig = inspect.signature(cb)
|
||||
# a=inspect.getargspec(cb)
|
||||
|
||||
mp.setUserArgs(< void * > mpid)
|
||||
mp.setNoCyCallbackParameters(len(sig.parameters))
|
||||
mp.setPyCyHandler(<void *> cb)
|
||||
mp[i].setUserArgs(< void * > mpid)
|
||||
mp[i].setNoCyCallbackParameters(len(sig.parameters))
|
||||
mp[i].setPyCyHandler(<void *> cb)
|
||||
|
||||
|
||||
print('============//1//')
|
||||
print('SIGNATURE:')
|
||||
print(str(sig))
|
||||
for param in sig.parameters.values():
|
||||
print('Parameter:', param)
|
||||
print('len1', len(sig.parameters.values()))
|
||||
print('len2', len(sig.parameters))
|
||||
print('monitor id', mpid)
|
||||
#print('============//1//')
|
||||
#print('SIGNATURE:')
|
||||
#print(str(sig))
|
||||
#for param in sig.parameters.values():
|
||||
# print('Parameter:', param)
|
||||
#print('len1', len(sig.parameters.values()))
|
||||
#print('len2', len(sig.parameters))
|
||||
#print('monitor id', mpid)
|
||||
|
||||
mpV.push_back(mp[i])
|
||||
|
||||
@@ -6443,6 +6452,7 @@ No of group members doe not match the length of callback object list")
|
||||
def monitorStart(
|
||||
self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME,
|
||||
unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM,
|
||||
unsigned int nelem=0,
|
||||
unsigned short notify_milliseconds=0):
|
||||
|
||||
_METHOD = "monitorStart(handlePV, object cb=None, \
|
||||
@@ -6484,6 +6494,11 @@ No of group members doe not match the length of callback object list")
|
||||
|
||||
# For setUserArgs pass the address of the variable.
|
||||
|
||||
|
||||
#Default is native number
|
||||
if nelem:
|
||||
mp.setNelem(nelem)
|
||||
|
||||
mp.setMask(mask)
|
||||
mp.setNotifyDeltaMilliSeconds(notify_milliseconds)
|
||||
|
||||
@@ -6877,7 +6892,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_8')
|
||||
encoding = True
|
||||
print('utf-8')
|
||||
|
||||
vecS.push_back(temp.encode('utf_8'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -6885,7 +6900,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_16')
|
||||
encoding = True
|
||||
print('utf-16')
|
||||
|
||||
vecS.push_back(<string>temp.encode('utf_16').decode('utf_16'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -6893,7 +6908,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_32')
|
||||
encoding = True
|
||||
print('utf-32')
|
||||
|
||||
vecS.push_back(temp.encode('utf_32'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
|
||||
@@ -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
|
||||
@@ -123,13 +130,26 @@ cdef extern from "time.h":
|
||||
int tm_yday # days since January 1 0-365
|
||||
int tm_isdst # Daylight Saving Time flag
|
||||
|
||||
|
||||
#cdef extern from "epicsTime.h":
|
||||
# ctypedef void throwError
|
||||
|
||||
#cdef extern from "epicsTime.h":
|
||||
# ctypedef LIBCOM_API epicsTime
|
||||
# cdef cppclass LIBCOM_API:
|
||||
# ctypedef void throwError
|
||||
|
||||
|
||||
cdef extern from "epicsTime.h":
|
||||
cdef struct epicsTimeStamp:
|
||||
unsigned int secPastEpoch # seconds since 0000 Jan 1, 1990
|
||||
unsigned int nsec
|
||||
cdef cppclass epicsTime:
|
||||
epicsTime (const epicsTimeStamp &)
|
||||
epicsTime & operator = (const epicsTimeStamp & )
|
||||
#epicsTime (const epicsTimeStamp &)
|
||||
#epicsTime & operator = (const epicsTimeStamp & )
|
||||
void throwError (int)
|
||||
epicsTime()
|
||||
|
||||
cdef struct local_tm_nano_sec:
|
||||
tm ansi_tm
|
||||
unsigned long nSec
|
||||
@@ -631,6 +651,7 @@ 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)
|
||||
@@ -1118,6 +1139,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
|
||||
@@ -1203,6 +1226,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 &)
|
||||
|
||||
@@ -1210,6 +1235,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[])
|
||||
@@ -1343,6 +1369,8 @@ cdef extern from "cafe.h":
|
||||
int match(double, const unsigned int, double tolerance, double timeout, bint printFlag) nogil
|
||||
int matchMany(vector[double], vector[unsigned int], double tolerance, double timeout, bint printFlag) nogil
|
||||
|
||||
int matchManyWithStatus(vector[double], vector[unsigned int], double tolerance, double timeout, bint printFlag, vector[int] &) nogil
|
||||
|
||||
#int readDBPMOffsets(DBPMKeeper &)
|
||||
#int getDBPM(DBPMKeeper &) nogil
|
||||
|
||||
|
||||
543
PyCafe_sls.pyx
543
PyCafe_sls.pyx
@@ -33,6 +33,9 @@ from cython.operator cimport dereference as deref
|
||||
from cython.operator cimport preincrement as inc
|
||||
from cython.view cimport array as cvarray
|
||||
from cpython cimport array
|
||||
from cpython.object cimport PyObject
|
||||
from cpython.ref cimport Py_INCREF
|
||||
|
||||
from libc.stdlib cimport malloc, free
|
||||
|
||||
cimport numpy as cnp
|
||||
@@ -49,6 +52,37 @@ _python_version = sys.version_info #[0:4]
|
||||
|
||||
cdef dict hmd = {}
|
||||
|
||||
#needed to initialize PyArray_API in order to be able to use it
|
||||
cnp.import_array()
|
||||
|
||||
|
||||
cdef class MemoryNanny:
|
||||
cdef void* ptr # set to NULL by "constructor"
|
||||
def __dealloc__(self):
|
||||
print("freeing ptr=", <unsigned long long>(self.ptr)) #just for debugging
|
||||
free(self.ptr)
|
||||
|
||||
@staticmethod
|
||||
cdef create(void* ptr):
|
||||
cdef MemoryNanny result = MemoryNanny()
|
||||
result.ptr = ptr
|
||||
print("nanny for ptr=", <unsigned long long>(result.ptr)) #just for debugging
|
||||
return result
|
||||
|
||||
cdef extern from "numpy/arrayobject.h":
|
||||
# a little bit awkward: the reference to obj will be stolen
|
||||
# using PyObject* to signal that Cython cannot handle it automatically
|
||||
int PyArray_SetBaseObject(cnp.ndarray arr, PyObject *obj) except -1 # -1 means there was an error
|
||||
|
||||
cdef array_from_ptr(void * ptr, cnp.npy_intp N, int np_type):
|
||||
#start = time.time()
|
||||
cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr)
|
||||
nanny = MemoryNanny.create(ptr)
|
||||
Py_INCREF(nanny) # a reference will get stolen, so prepare nanny
|
||||
PyArray_SetBaseObject(arr, <PyObject*>nanny)
|
||||
#print("array_from_ptr", time.time() - start)
|
||||
return arr
|
||||
|
||||
include "PyCafeDefs.pxi"
|
||||
|
||||
def verify_handlepv(func):
|
||||
@@ -170,7 +204,6 @@ cdef class CyCafe:
|
||||
|
||||
ChannelRegalia channelInfo
|
||||
# PyGILState_STATE gstate
|
||||
|
||||
|
||||
###########################################################################
|
||||
def __cinit__(self):
|
||||
@@ -222,7 +255,28 @@ cdef class CyCafe:
|
||||
del self._c_cafe
|
||||
|
||||
###########################################################################
|
||||
|
||||
|
||||
@verify_handlepv
|
||||
def get_wf_express(self, handlePV, nelem):
|
||||
print("get_wf_express")
|
||||
|
||||
#'''
|
||||
valCharArray = <dbr_char_t * > malloc(nelem * sizeof(dbr_char_t))
|
||||
status = self._c_cafe.wfExpress(handlePV, nelem, valCharArray)
|
||||
#print("status", status, valCharArray[0])
|
||||
mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelem):
|
||||
mvUInt8n[ij] = <cnp.uint8_t > valCharArray[ij]
|
||||
free(valCharArray)
|
||||
|
||||
return mvUInt8n
|
||||
#'''
|
||||
|
||||
def ca_version(self):
|
||||
return self._c_cafe._ca_version()
|
||||
|
||||
def epics_version_string(self):
|
||||
return self._c_cafe._epics_version()
|
||||
def CAFE_version(self):
|
||||
return CAFE_VERSION
|
||||
|
||||
@@ -1029,18 +1083,18 @@ cdef class CyCafe:
|
||||
|
||||
|
||||
############################################################################
|
||||
def loadCollectionsFromXML(self, const char * fileName):
|
||||
with nogil:
|
||||
self._c_cafe.loadCollectionsFromXML(fileName)
|
||||
return
|
||||
#def loadCollectionsFromXML(self, const char * fileName):
|
||||
# with nogil:
|
||||
# status = self._c_cafe.loadCollectionsFromXML(fileName)
|
||||
# return status
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
|
||||
def loadGroupsFromXML(self, const char * fileName):
|
||||
with nogil:
|
||||
self._c_cafe.loadGroupsFromXML(fileName)
|
||||
return
|
||||
#def loadGroupsFromXML(self, const char * fileName):
|
||||
# with nogil:
|
||||
# status = self._c_cafe.loadGroupsFromXML(fileName)
|
||||
# return status
|
||||
############################################################################
|
||||
|
||||
def devicePositionMap(self, const char * collectionName):
|
||||
@@ -1610,7 +1664,7 @@ cdef class CyCafe:
|
||||
cdef HandleHelper hh
|
||||
hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV)
|
||||
|
||||
cpdef ll = []
|
||||
cdef ll = []
|
||||
ll.append(hh._etsNorm.secPastEpoch)
|
||||
ll.append(hh._etsNorm.nsec)
|
||||
|
||||
@@ -1621,7 +1675,7 @@ cdef class CyCafe:
|
||||
def getTimeStampAsDate(self, handlePV):
|
||||
|
||||
cdef HandleHelper hh
|
||||
cpdef ld = []
|
||||
cdef ld = []
|
||||
|
||||
hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV)
|
||||
ld.append(hh._etsDate.year)
|
||||
@@ -1636,7 +1690,7 @@ cdef class CyCafe:
|
||||
|
||||
############################################################################
|
||||
### Allow user to choose whether or not to open #####
|
||||
cpdef checkForHandle(self, str pv, bint force=True):
|
||||
def checkForHandle(self, str pv, bint force=True):
|
||||
cdef unsigned int _handle = 0
|
||||
_handle = self.hh.getHandleFromPV(pv)
|
||||
if _handle == 0:
|
||||
@@ -1649,7 +1703,7 @@ cdef class CyCafe:
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
cpdef checkForHandleList(self, list pvList, bint force=True):
|
||||
def checkForHandleList(self, list pvList, bint force=True):
|
||||
|
||||
cdef unsigned int nToOpen = 0
|
||||
handleList = []
|
||||
@@ -1670,7 +1724,7 @@ cdef class CyCafe:
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
cpdef checkForGroupHandle(self, str gName, bint force=True):
|
||||
def checkForGroupHandle(self, str gName, bint force=True):
|
||||
cdef unsigned int _ghandle = 0
|
||||
_ghandle = self.hh.getGroupHandleFromGroupName(gName)
|
||||
if _ghandle == 0:
|
||||
@@ -1824,7 +1878,7 @@ cdef class CyCafe:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#PyCafeException = self.prepareCafeException(
|
||||
# status, _METHOD, handle=handle)
|
||||
##FOR TESTINg raise PyCafeException
|
||||
@@ -1902,12 +1956,12 @@ cdef class CyCafe:
|
||||
|
||||
############################################################################
|
||||
|
||||
def loadSFGroups(self):
|
||||
cdef str VA = 'VA'
|
||||
return self._c_cafe.loadSFGroups(<string> VA)
|
||||
#def loadSFGroups(self):
|
||||
# cdef str VA = 'VA'
|
||||
# return self._c_cafe.loadSFGroups(<string> VA)
|
||||
|
||||
def loadSFGroupsWithBase(self, str VA):
|
||||
return self._c_cafe.loadSFGroups(<string> VA)
|
||||
#def loadSFGroupsWithBase(self, str VA):
|
||||
# return self._c_cafe.loadSFGroups(<string> VA)
|
||||
|
||||
|
||||
############################################################################
|
||||
@@ -2141,7 +2195,7 @@ cdef class CyCafe:
|
||||
and dtr in [DBR_CHAR] and dt in ['str']:
|
||||
return self.getWFAsString(handle)
|
||||
|
||||
cdef unsigned int dtcheck = dtr
|
||||
cdef int dtcheck = dtr
|
||||
dtcheck = getMatchedDataType(dt, dtr)
|
||||
|
||||
cdef bytes bVal
|
||||
@@ -2298,7 +2352,8 @@ cdef class CyCafe:
|
||||
raise _cafeException
|
||||
return [None]
|
||||
|
||||
cdef unsigned int dtcheck = dtr
|
||||
#JC FEB 2022 must be int as CAFE_TYPENOTCONN is -1
|
||||
cdef int dtcheck = dtr
|
||||
dtcheck = getMatchedDataType(dt, dtr)
|
||||
|
||||
#print ("dtcheck input/native", dtcheck, dt, dtr)
|
||||
@@ -2539,6 +2594,7 @@ cdef class CyCafe:
|
||||
# the last dimension has a unitary stride, i.e., is contiguous in memory,
|
||||
# hence C contiguous.
|
||||
|
||||
##start = time.time()
|
||||
cdef str _METHOD = "getArray"
|
||||
cdef unsigned int handle = handlePV
|
||||
'''
|
||||
@@ -2555,7 +2611,8 @@ cdef class CyCafe:
|
||||
'''
|
||||
cdef:
|
||||
short * i16val
|
||||
|
||||
dbr_char_t * ui8val
|
||||
cvarray cvarr
|
||||
int * ival
|
||||
double * dval
|
||||
float * fval
|
||||
@@ -2652,7 +2709,7 @@ cdef class CyCafe:
|
||||
|
||||
#print('native', self.hh.getNelemNative(handle))
|
||||
#print('client', self.hh.getNelemClient(handle))
|
||||
# print('request',self.hh.getNelemRequest(handle))
|
||||
#print('request',self.hh.getNelemRequest(handle))
|
||||
|
||||
#print ('dtcheck', dtcheck)
|
||||
|
||||
@@ -2662,6 +2719,9 @@ cdef class CyCafe:
|
||||
|
||||
cdef bytes bVal
|
||||
|
||||
##end = time.time()
|
||||
##print ("PRE-AMBLE", end - start)
|
||||
|
||||
if dtcheck in [CAFE_STRING, CAFE_ENUM]:
|
||||
sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t))
|
||||
with nogil:
|
||||
@@ -2757,7 +2817,115 @@ cdef class CyCafe:
|
||||
|
||||
return mvStr
|
||||
|
||||
elif dtcheck in [CAFE_SHORT, CAFE_CHAR]:
|
||||
elif dtcheck in [CAFE_CHAR]:
|
||||
|
||||
|
||||
##start=time.time()
|
||||
ui8val = <dbr_char_t * >malloc(nelemMemory * sizeof(np.uint8))
|
||||
|
||||
with nogil:
|
||||
status = self._c_cafe.getCharArray(handle, ui8val)
|
||||
##end=time.time()
|
||||
##print ("END TIME CHAR", end - start)
|
||||
##print("length of ui8val", len(ui8val))
|
||||
|
||||
#print('native', self.hh.getNelemNative(handle))
|
||||
#print('client', self.hh.getNelemClient(handle))
|
||||
#print('request',self.hh.getNelemRequest(handle))
|
||||
|
||||
|
||||
#nelemMethod = min(len(ui8val), nelemMemory)
|
||||
if status == ICAFE_NORMAL:
|
||||
# np.empty preferred, else mvInt does not get correct value for first couple of array elements
|
||||
|
||||
if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']:
|
||||
|
||||
if dt in ['np.short', 'np.int16', 'short', 'int16']:
|
||||
mvShort = np.empty(
|
||||
nelemMethod, dtype=np.int16, order='C')
|
||||
for ij in range(0, nelemMethod):
|
||||
mvShort[ij] = <cnp.int16_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
return np.array(mvShort)
|
||||
|
||||
elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']:
|
||||
mvInt8 = np.empty(
|
||||
nelemMethod, dtype=np.int8, order='C')
|
||||
#for ij in range(0, nelemMethod):
|
||||
# mvInt8[ij] = <cnp.int8_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
return mvInt8 #np.array(mvInt8)
|
||||
|
||||
elif dt in ['uchar', 'np.uint8', 'uint8']:
|
||||
#https://stackoverflow.com/questions/21851985/difference-between-np-int-np-int-int-and-np-int-t-in-cython
|
||||
#https://stackoverflow.com/questions/25102409/c-malloc-array-pointer-return-in-cython
|
||||
#https://stackoverflow.com/questions/23872946/force-numpy-ndarray-to-take-ownership-of-its-memory-in-cython
|
||||
#Alterantive copy methods are not faster than the for loop! 0.05 seconds added to ca read time of 0.14s 1.4 million elements
|
||||
#'''
|
||||
mvUInt8n = np.empty(
|
||||
nelemMethod, dtype=np.uint8) # order='C')
|
||||
##start = time.time()
|
||||
for ij in range(0, nelemMethod):
|
||||
mvUInt8n[ij] = <cnp.uint8_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
##print("Conversion time", time.time()-start)
|
||||
return mvUInt8n ##np.array(ui8val) #mvUInt8n #ui8val #np.array(mvUInt8)
|
||||
#'''
|
||||
#cvarr = <cnp.uint8_t *> ui8val
|
||||
#cvarr.free_data = True
|
||||
#free(ui8val)
|
||||
#return np.asarray(cvarr)
|
||||
#mvUInt8 = array_from_ptr(ui8val, nelemMethod, cnp.NPY_UINT8)
|
||||
###numpy_array = np.asarray(<cnp.uint8_t *>ui8val)
|
||||
#free(ui8val)
|
||||
#return mvUInt8 #numpy_array #mvUInt8
|
||||
###return array_from_ptr(ui8val, nelemMethod, cnp.NPY_UINT8)
|
||||
|
||||
else:
|
||||
mvUInt8 = np.empty(
|
||||
nelemMethod, dtype=np.uint8, order='C')
|
||||
#mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelemMethod):
|
||||
mvUInt8[ij] = <cnp.uint8_t> ui8val[ij]
|
||||
# mvShortNP=cnp.asarray(ui8val)
|
||||
|
||||
# aaa=np.full(nelemMethod,<mvShort, dtype=np.uint8, order='C')
|
||||
free(ui8val)
|
||||
return np.array(mvUInt8) # arr
|
||||
|
||||
elif art in ['memoryview', 'mv', 'memoryviewslice']:
|
||||
mvShort = np.empty(nelemMethod, dtype=np.int16, order='C')
|
||||
for ij in range(0, nelemMethod):
|
||||
mvShort[ij] = <short > ui8val[ij]
|
||||
free(ui8val)
|
||||
return memoryview(mvShort)
|
||||
|
||||
elif art in ['array', 'array.array']:
|
||||
a = array.array('h')
|
||||
for ij in range(0, nelemMethod):
|
||||
a.append( < short > ui8val[ij])
|
||||
free(ui8val)
|
||||
return a
|
||||
|
||||
elif art in ['ctypes', 'ctype']:
|
||||
ctypesArray16 = (ctypes.c_int16*nelemMethod)()
|
||||
for ij in range(0, nelemMethod):
|
||||
ctypesArray16[ij] = <short > ui8val[ij]
|
||||
free(ui8val)
|
||||
return ctypesArray16
|
||||
|
||||
else:
|
||||
print("Unknow array type in user request for art='",
|
||||
art, "'. Possible types are:")
|
||||
print("memoryview, numpy, array, ctypes")
|
||||
print("Returning memoryview")
|
||||
mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelemMethod):
|
||||
mvUInt8[ij] = <dbr_char_t> ui8val[ij]
|
||||
free(ui8val)
|
||||
return mvUInt8
|
||||
|
||||
elif dtcheck in [CAFE_SHORT]:
|
||||
|
||||
i16val = <short * >malloc(nelemMemory * sizeof(np.int16))
|
||||
# start=time.time()
|
||||
@@ -3260,7 +3428,7 @@ cdef class CyCafe:
|
||||
cdef CAFEDataTypeCode cdt
|
||||
|
||||
pvdList = []
|
||||
cpdef pvdata p1
|
||||
cdef pvdata p1
|
||||
|
||||
cdef bytes bytesVal
|
||||
|
||||
@@ -3901,15 +4069,17 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
|
||||
nelemPrevious = []
|
||||
|
||||
|
||||
|
||||
for i in range(0, len(handleList)):
|
||||
nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i]))
|
||||
|
||||
# c=self.hh.getNelemClient(handleList[i])
|
||||
# n=self.hh.getNelemNative(handleList[i])
|
||||
# r=self.hh.getNelemRequest(handleList[i])
|
||||
# print "c,n,r", c,n,r, "[",i,"]"
|
||||
#c=self.hh.getNelemClient(handleList[i])
|
||||
#n=self.hh.getNelemNative(handleList[i])
|
||||
#r=self.hh.getNelemRequest(handleList[i])
|
||||
#print("c,n,r", c,n,r, "[",i,"]")
|
||||
# c=self.hh.getNelemToRetrieveFromCache(handleList[i])
|
||||
# print "cache", c, "[",i,"]"
|
||||
# print("cache", c, "[",i,"]")
|
||||
|
||||
# pack into vectors
|
||||
cdef vector[unsigned int] v
|
||||
@@ -3933,9 +4103,9 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
with nogil:
|
||||
status = self._c_cafe.getV(v, vStatus)
|
||||
|
||||
#print("getScalarList")
|
||||
|
||||
#for i in range(0, len(vStatus)):
|
||||
# print (vStatus[i])
|
||||
# print (vStatus[i])
|
||||
# print("====")
|
||||
# Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK
|
||||
# as this may mean we have a double handle instance.
|
||||
@@ -4074,7 +4244,7 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
# print (pvd[i].getPVName(), pvd[i].getAsString(), " [",i,"]", pvd[i].getStatus())
|
||||
|
||||
|
||||
#print ("-----------------------------------------------------------------")
|
||||
|
||||
|
||||
# cdef PVDataHolder * pvd = \
|
||||
# <PVDataHolder *>malloc( 100000000 + \
|
||||
@@ -4312,12 +4482,13 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
print("Error in def getCompoundList: ")
|
||||
self._c_cafe.printStatusMessage(statusBundle)
|
||||
|
||||
cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know
|
||||
cdef int dtcheck = CAFE_NOT_REQUESTED # native type not yet know
|
||||
dtcheck = getMatchedDataType(dt, dtcheck)
|
||||
|
||||
cdef bytes bytesVal
|
||||
localList = []
|
||||
|
||||
|
||||
# Use Scalar
|
||||
if not flagCompound:
|
||||
|
||||
@@ -4325,38 +4496,36 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
|
||||
self.vStr.clear()
|
||||
self.vStr.reserve(len(handleList))
|
||||
#for i in range(0, len(handleList)):
|
||||
# self.vStr[i] = <str> " "
|
||||
|
||||
|
||||
|
||||
with nogil:
|
||||
status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus)
|
||||
|
||||
#warning: __pyx_v_i may be used uninitialized in this function
|
||||
bytesVal = <bytes> (<string> self.vStr[i] )
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(v[i]):
|
||||
try:
|
||||
strVal = (bytesVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-8')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-16')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
strVal = <string> self.vStr[i]
|
||||
for i in range(0, len(v)):
|
||||
bytesVal = <bytes> (<string> self.vStr[i] )
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(v[i]):
|
||||
try:
|
||||
strVal = (bytesVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-8')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
strVal = (bytesVal).decode('utf-16')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
strVal = <string> self.vStr[i]
|
||||
|
||||
localList.append(strVal)
|
||||
localList.append(strVal)
|
||||
|
||||
return localList, status, vStatus
|
||||
|
||||
@@ -4380,6 +4549,7 @@ First input argument, should be a 'list' of of type <class 'int'> if handles or
|
||||
v, self.vFloat, vStatus)
|
||||
|
||||
return self.vFloat, status, vStatus
|
||||
|
||||
|
||||
# continue Can be a compound or native
|
||||
# Native
|
||||
@@ -4612,7 +4782,7 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
|
||||
localListToStruct.append(p1)
|
||||
|
||||
cpdef pvgroup pg
|
||||
cdef pvgroup pg
|
||||
|
||||
pg = pvgroup()
|
||||
|
||||
@@ -4708,7 +4878,7 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
raise _cafeException
|
||||
return None
|
||||
|
||||
cdef unsigned int dtcheck = dtr
|
||||
cdef int dtcheck = dtr
|
||||
dtcheck = getMatchedDataType(dt, dtr)
|
||||
|
||||
cdef bytes bVal
|
||||
@@ -4828,6 +4998,7 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
"First input argument should be of type <class 'int'> if handle, else <class 'str'> if PV"))
|
||||
|
||||
cdef:
|
||||
dbr_char_t * ui8val
|
||||
short * i16val
|
||||
int * ival
|
||||
double * dval
|
||||
@@ -4916,20 +5087,20 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
encoding = False
|
||||
if '.EGU' in self._c_cafe.getPVFromHandle(handle):
|
||||
try:
|
||||
strVal = (bVal).decode('latin-1')
|
||||
valStr = (bVal).decode('latin-1')
|
||||
encoding = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
|
||||
if not encoding:
|
||||
try:
|
||||
valStr = bVal.decode('utf-8')
|
||||
valStr = (bVal).decode('utf-8')
|
||||
encoded = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not encoding:
|
||||
try:
|
||||
valStr = bVal.decode('utf-16')
|
||||
valStr = (bVal).decode('utf-16')
|
||||
encoded = True
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -4997,7 +5168,93 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
|
||||
return mvStr
|
||||
'''
|
||||
elif dtcheck in [CAFE_SHORT, CAFE_CHAR]:
|
||||
elif dtcheck in [CAFE_CHAR]:
|
||||
|
||||
ui8val = <dbr_char_t * >malloc(nelemToRetrieveFromCache * sizeof(np.uint8))
|
||||
|
||||
status = self._c_cafe.getCacheCharArray(handle, ui8val)
|
||||
|
||||
if status == ICAFE_NORMAL:
|
||||
# np.empty preferred, else mvInt does not get correct value for first couple of array elements
|
||||
|
||||
if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']:
|
||||
|
||||
if dt in ['np.short', 'np.int16', 'short', 'int16']:
|
||||
mvShort = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvShort[ij] = <cnp.int16_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
return np.array(mvShort)
|
||||
|
||||
elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']:
|
||||
mvInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int8, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvInt8[ij] = <cnp.int8_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
return np.array(mvInt8)
|
||||
|
||||
elif dt in ['uchar', 'np.uint8', 'uint8']:
|
||||
mvUInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvUInt8[ij] = <cnp.uint8_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
return np.array(mvUInt8)
|
||||
|
||||
else:
|
||||
|
||||
mvUInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.uint8, order='C')
|
||||
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvUInt8[ij] = <cnp.uint8_t > ui8val[ij]
|
||||
|
||||
free(ui8val)
|
||||
|
||||
return np.array(mvUInt8)
|
||||
|
||||
elif art in ['memoryview', 'mv', 'memoryviewslice']:
|
||||
mvShort = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvShort[ij] = <short> ui8val[ij]
|
||||
free(ui8val)
|
||||
|
||||
return mvShort
|
||||
|
||||
elif art in ['array', 'array.array']:
|
||||
arrayArray = array.array('h')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
arrayArray.append( <dbr_char_t> ui8val[ij])
|
||||
free(ui8val)
|
||||
return arrayArray
|
||||
|
||||
elif art in ['ctypes', 'ctype']:
|
||||
ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)()
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
ctypesArray[ij] = <short> ui8val[ij]
|
||||
free(ui8val)
|
||||
return ctypesArray
|
||||
|
||||
else:
|
||||
print("Unknow array type in user request for art='",
|
||||
art, "'. Possible types are:")
|
||||
print("memoryview, numpy, array, ctypes")
|
||||
print("Returning memoryview")
|
||||
mvUInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvUInt8[ij] = <dbr_char_t > ui8val[ij]
|
||||
free(ui8val)
|
||||
|
||||
return mvUInt8
|
||||
|
||||
|
||||
|
||||
elif dtcheck in [CAFE_SHORT]:
|
||||
|
||||
i16val = <short * >malloc(nelemToRetrieveFromCache * sizeof(np.int16))
|
||||
|
||||
@@ -5007,18 +5264,43 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
# np.empty preferred, else mvInt does not get correct value for first couple of array elements
|
||||
|
||||
if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']:
|
||||
|
||||
if dt in ['np.short', 'np.int16', 'short', 'int16']:
|
||||
mvShort = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvShort[ij] = <cnp.int16_t > i16val[ij]
|
||||
free(i16val)
|
||||
return np.array(mvShort)
|
||||
|
||||
mvShortNP = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']:
|
||||
mvInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int8, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvInt8[ij] = <cnp.int8_t > i16val[ij]
|
||||
free(i16val)
|
||||
return np.array(mvInt8)
|
||||
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvShortNP[ij] = <cnp.int16_t > i16val[ij]
|
||||
# arr=np.asarray(mvShort)
|
||||
elif dt in ['uchar', 'np.uint8', 'uint8']:
|
||||
mvUInt8 = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.uint8, order='C')
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvUInt8[ij] = <cnp.uint8_t > i16val[ij]
|
||||
free(i16val)
|
||||
return np.array(mvUInt8)
|
||||
|
||||
free(i16val)
|
||||
else:
|
||||
|
||||
return mvShortNP # arr
|
||||
mvShort = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
|
||||
for ij in range(0, nelemToRetrieveFromCache):
|
||||
mvShort[ij] = <cnp.int16_t > i16val[ij]
|
||||
|
||||
free(i16val)
|
||||
|
||||
return np.array(mvShort) # arr
|
||||
|
||||
elif art in ['memoryview', 'mv', 'memoryviewslice']:
|
||||
mvShort = np.empty(
|
||||
nelemToRetrieveFromCache, dtype=np.int16, order='C')
|
||||
@@ -5056,6 +5338,9 @@ First input argument, should be of type <class 'int'> if group handle, else <cla
|
||||
|
||||
return mvShort
|
||||
|
||||
|
||||
|
||||
|
||||
elif dtcheck in [CAFE_LONG]:
|
||||
|
||||
ival = <int * >malloc(nelemToRetrieveFromCache * sizeof(np.int32))
|
||||
@@ -5531,8 +5816,10 @@ First input argument, should be of type <class 'int'> if handle, else <class 'st
|
||||
handleList = []
|
||||
handleList = self.getHandlesFromWithinGroup(ghandle)
|
||||
|
||||
#cb_list = [cb] * pvg.getNPV()
|
||||
|
||||
for i in range(0, pvg.getNPV()):
|
||||
|
||||
|
||||
mp[i].setMask(mask)
|
||||
mp[i].setCafeDbrType(dbr)
|
||||
mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds)
|
||||
@@ -5542,18 +5829,18 @@ First input argument, should be of type <class 'int'> if handle, else <class 'st
|
||||
sig = inspect.signature(cb)
|
||||
# a=inspect.getargspec(cb)
|
||||
|
||||
mp.setUserArgs(< void * > mpid)
|
||||
mp.setNoCyCallbackParameters(len(sig.parameters))
|
||||
mp.setPyCyHandler(<void *> cb)
|
||||
mp[i].setUserArgs(< void * > mpid)
|
||||
mp[i].setNoCyCallbackParameters(len(sig.parameters))
|
||||
mp[i].setPyCyHandler(<void *> cb) #cb_list[i])
|
||||
|
||||
print('============//1//')
|
||||
print('SIGNATURE:')
|
||||
print(str(sig))
|
||||
for param in sig.parameters.values():
|
||||
print('Parameter:', param)
|
||||
print('len1', len(sig.parameters.values()))
|
||||
print('len2', len(sig.parameters))
|
||||
print('monitor id', mpid)
|
||||
#print('============//1//')
|
||||
#print('SIGNATURE:')
|
||||
#print(str(sig))
|
||||
#for param in sig.parameters.values():
|
||||
# print('Parameter:', param)
|
||||
#print('len1', len(sig.parameters.values()))
|
||||
#print('len2', len(sig.parameters))
|
||||
#print('monitor id', mpid)
|
||||
|
||||
mpV.push_back(mp[i])
|
||||
|
||||
@@ -5580,7 +5867,7 @@ First input argument, should be of type <class 'int'> if handle, else <class 'st
|
||||
DBE_VALUE | DBE_LOG | DBE_ALARM,
|
||||
unsigned short notify_milliseconds=0):
|
||||
############################################################################
|
||||
cdef str _METHOD = ("groupMonitorStartWithCBList(ghandleName, cb," + +
|
||||
cdef str _METHOD = ("groupMonitorStartWithCBList(ghandleName, cb," +
|
||||
"dbr, mask, notify_milliseconds)")
|
||||
|
||||
cdef unsigned int ghandle = 0
|
||||
@@ -5644,14 +5931,14 @@ No of group members doe not match the length of callback object list")
|
||||
mp[i].setNoCyCallbackParameters(len(sig.parameters))
|
||||
mp[i].setPyCyHandler(<void *> cb[i])
|
||||
|
||||
print('============')
|
||||
print('SIGNATURE//2//:')
|
||||
print(str(sig))
|
||||
for param in sig.parameters.values():
|
||||
print('Parameter:', param)
|
||||
print('len1', len(sig.parameters.values()))
|
||||
print('len2', len(sig.parameters))
|
||||
print('monitorid', mpid) # (<unsigned int *> ptr_mpid)[0])
|
||||
#print('============')
|
||||
#print('SIGNATURE//2//:')
|
||||
#print(str(sig))
|
||||
#for param in sig.parameters.values():
|
||||
# print('Parameter:', param)
|
||||
#print('len1', len(sig.parameters.values()))
|
||||
#print('len2', len(sig.parameters))
|
||||
#print('monitorid', mpid) # (<unsigned int *> ptr_mpid)[0])
|
||||
|
||||
|
||||
mpV.push_back(mp[i])
|
||||
@@ -6095,7 +6382,7 @@ No of group members doe not match the length of callback object list")
|
||||
#print(pvd[i].getAsString(0), " " , pvd[i].getStatus())
|
||||
#print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec)
|
||||
localList.append(PVDataHolderToStruct(pvd[i], dt))
|
||||
cpdef pvgroup pg
|
||||
cdef pvgroup pg
|
||||
|
||||
pg = pvgroup()
|
||||
|
||||
@@ -6162,7 +6449,7 @@ No of group members doe not match the length of callback object list")
|
||||
#print(pvd[i].getAsString(0), " " , pvd[i].getStatus())
|
||||
#print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec)
|
||||
localList.append(PVDataHolderToStruct(pvd[i], dt))
|
||||
cpdef pvgroup pg
|
||||
cdef pvgroup pg
|
||||
|
||||
pg = pvgroup()
|
||||
|
||||
@@ -6436,6 +6723,7 @@ No of group members doe not match the length of callback object list")
|
||||
def monitorStart(
|
||||
self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME,
|
||||
unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM,
|
||||
unsigned int nelem=0,
|
||||
unsigned short notify_milliseconds=0):
|
||||
|
||||
_METHOD = "monitorStart(handlePV, object cb=None, \
|
||||
@@ -6477,6 +6765,10 @@ No of group members doe not match the length of callback object list")
|
||||
|
||||
# For setUserArgs pass the address of the variable.
|
||||
|
||||
#Default is native number
|
||||
if nelem:
|
||||
mp.setNelem(nelem)
|
||||
|
||||
mp.setMask(mask)
|
||||
mp.setNotifyDeltaMilliSeconds(notify_milliseconds)
|
||||
|
||||
@@ -6871,7 +7163,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_8')
|
||||
encoding = True
|
||||
print('utf-8')
|
||||
|
||||
vecS.push_back(temp.encode('utf_8'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -6879,7 +7171,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_16')
|
||||
encoding = True
|
||||
print('utf-16')
|
||||
|
||||
vecS.push_back(<string>temp.encode('utf_16').decode('utf_16'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -6887,7 +7179,7 @@ No of group members doe not match the length of callback object list")
|
||||
try:
|
||||
temp = (valSet[i]).decode('utf_32')
|
||||
encoding = True
|
||||
print('utf-32')
|
||||
|
||||
vecS.push_back(temp.encode('utf_32'))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
@@ -7566,6 +7858,53 @@ Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!
|
||||
return status
|
||||
############################################################################
|
||||
|
||||
|
||||
def matchManyWithStatus(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag):
|
||||
|
||||
cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"
|
||||
|
||||
if (len(valSet) != len(handlePVMatch)):
|
||||
raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\
|
||||
Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!")
|
||||
|
||||
cdef vector[unsigned int] handleMatch
|
||||
handleMatch.reserve(len(handlePVMatch))
|
||||
|
||||
cdef vector[double] valSetV
|
||||
valSetV.reserve(len(valSet))
|
||||
|
||||
cdef vector[int] statusV
|
||||
statusV.reserve(len(valSet))
|
||||
|
||||
for i in range(0, len(handlePVMatch)):
|
||||
if isinstance(handlePVMatch[i], (int, long)):
|
||||
handleMatch.push_back(handlePVMatch[i])
|
||||
elif isinstance(handlePVMatch[i], (str)):
|
||||
handleMatch.push_back(self.checkForHandle(handlePVMatch))
|
||||
else:
|
||||
_cafeException = CafeException(_type='CafeError', _source=_METHOD,
|
||||
_error_info="First input argument, should be of type <class 'int'> if handle, else <class 'str'> if PV")
|
||||
raise _cafeException
|
||||
|
||||
for i in range(0, len(valSet)):
|
||||
valSetV.push_back(valSet[i])
|
||||
|
||||
cdef int status
|
||||
|
||||
with nogil:
|
||||
status = self._c_cafe.matchManyWithStatus(
|
||||
valSetV, handleMatch, tolerance, timeout, printFlag, statusV)
|
||||
|
||||
print("status from pxy", statusV)
|
||||
|
||||
if status != ICAFE_NORMAL:
|
||||
if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW:
|
||||
self._c_cafe.printStatusMessage(status)
|
||||
|
||||
return status, statusV
|
||||
############################################################################
|
||||
|
||||
|
||||
############################################################################
|
||||
|
||||
def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag):
|
||||
|
||||
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
29
README
29
README
@@ -1,22 +1,25 @@
|
||||
######
|
||||
# Build for python 3.10:
|
||||
# source build_py310_sls2.sh - links to epics7 gcc 7.5.0
|
||||
|
||||
# Build for python 3.8:
|
||||
# source build_py38_sls2.sh - links to epics7 gcc 7.5.0
|
||||
|
||||
# Build for python 3.7:
|
||||
# source build_py37.sh
|
||||
# source build_py37_sls2.sh - links to epics7 gcc 7.3.0
|
||||
#
|
||||
# Special build for swissfel - with zmq libraries:
|
||||
# source build_py37_sf.sh
|
||||
#
|
||||
# Special build for sls2 - links to epics7:
|
||||
# source build_py37_sls2.sh
|
||||
|
||||
# Build for python 3.5:
|
||||
# source build_py35.sh
|
||||
# source build_py35_sls2.sh - links to epics7 gcc 7.3.0
|
||||
#
|
||||
# Special build for swissfel - with zmq libraries:
|
||||
# source build_py35_sf.sh
|
||||
# source build_py37_sf.sh - links to epics7 gcc 7.3.0
|
||||
#
|
||||
|
||||
###
|
||||
### Edit makefile to change INSTALL_PATH
|
||||
### Install directory:
|
||||
# ./python<version>/lib/${EPICS_HOST_ARCH}
|
||||
# where <version> is 3.7, 3.7-sf, 3.7-sls2
|
||||
# 3.5, 3.5-sf
|
||||
# where <version> is 3.10-sls2, 3.9-sls2 3.8-sls2, 3.7-sls2
|
||||
# 3.5-sls2, 3.7-sf
|
||||
|
||||
|
||||
# make install_py37_sls
|
||||
#
|
||||
378
array-
Normal file
378
array-
Normal file
@@ -0,0 +1,378 @@
|
||||
// <array> -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2007-2017 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Under Section 7 of GPL version 3, you are granted additional
|
||||
// permissions described in the GCC Runtime Library Exception, version
|
||||
// 3.1, as published by the Free Software Foundation.
|
||||
|
||||
// You should have received a copy of the GNU General Public License and
|
||||
// a copy of the GCC Runtime Library Exception along with this program;
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
/** @file include/array
|
||||
* This is a Standard C++ Library header.
|
||||
*/
|
||||
|
||||
#ifndef _GLIBCXX_ARRAY
|
||||
#define _GLIBCXX_ARRAY 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
# include <bits/c++0x_warning.h>
|
||||
#else
|
||||
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <bits/range_access.h>
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
struct __array_traits
|
||||
{
|
||||
typedef _Tp _Type[_Nm];
|
||||
typedef __is_swappable<_Tp> _Is_swappable;
|
||||
typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable;
|
||||
|
||||
static constexpr _Tp&
|
||||
_S_ref(const _Type& __t, std::size_t __n) noexcept
|
||||
{ return const_cast<_Tp&>(__t[__n]); }
|
||||
|
||||
static constexpr _Tp*
|
||||
_S_ptr(const _Type& __t) noexcept
|
||||
{ return const_cast<_Tp*>(__t); }
|
||||
};
|
||||
|
||||
template<typename _Tp>
|
||||
struct __array_traits<_Tp, 0>
|
||||
{
|
||||
struct _Type { };
|
||||
typedef true_type _Is_swappable;
|
||||
typedef true_type _Is_nothrow_swappable;
|
||||
|
||||
static constexpr _Tp&
|
||||
_S_ref(const _Type&, std::size_t) noexcept
|
||||
{ return *static_cast<_Tp*>(nullptr); }
|
||||
|
||||
static constexpr _Tp*
|
||||
_S_ptr(const _Type&) noexcept
|
||||
{ return nullptr; }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A standard container for storing a fixed size sequence of elements.
|
||||
*
|
||||
* @ingroup sequences
|
||||
*
|
||||
* Meets the requirements of a <a href="tables.html#65">container</a>, a
|
||||
* <a href="tables.html#66">reversible container</a>, and a
|
||||
* <a href="tables.html#67">sequence</a>.
|
||||
*
|
||||
* Sets support random access iterators.
|
||||
*
|
||||
* @tparam Tp Type of element. Required to be a complete type.
|
||||
* @tparam N Number of elements.
|
||||
*/
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
struct array
|
||||
{
|
||||
typedef _Tp value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
// Support for zero-sized arrays mandatory.
|
||||
typedef _GLIBCXX_STD_C::__array_traits<_Tp, _Nm> _AT_Type;
|
||||
typename _AT_Type::_Type _M_elems;
|
||||
|
||||
// No explicit construct/copy/destroy for aggregate type.
|
||||
|
||||
// DR 776.
|
||||
void
|
||||
fill(const value_type& __u)
|
||||
{ std::fill_n(begin(), size(), __u); }
|
||||
|
||||
void
|
||||
swap(array& __other)
|
||||
noexcept(_AT_Type::_Is_nothrow_swappable::value)
|
||||
{ std::swap_ranges(begin(), end(), __other.begin()); }
|
||||
|
||||
// Iterators.
|
||||
_GLIBCXX17_CONSTEXPR iterator
|
||||
begin() noexcept
|
||||
{ return iterator(data()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_iterator
|
||||
begin() const noexcept
|
||||
{ return const_iterator(data()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR iterator
|
||||
end() noexcept
|
||||
{ return iterator(data() + _Nm); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_iterator
|
||||
end() const noexcept
|
||||
{ return const_iterator(data() + _Nm); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR reverse_iterator
|
||||
rbegin() noexcept
|
||||
{ return reverse_iterator(end()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_reverse_iterator
|
||||
rbegin() const noexcept
|
||||
{ return const_reverse_iterator(end()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR reverse_iterator
|
||||
rend() noexcept
|
||||
{ return reverse_iterator(begin()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_reverse_iterator
|
||||
rend() const noexcept
|
||||
{ return const_reverse_iterator(begin()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_iterator
|
||||
cbegin() const noexcept
|
||||
{ return const_iterator(data()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_iterator
|
||||
cend() const noexcept
|
||||
{ return const_iterator(data() + _Nm); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_reverse_iterator
|
||||
crbegin() const noexcept
|
||||
{ return const_reverse_iterator(end()); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_reverse_iterator
|
||||
crend() const noexcept
|
||||
{ return const_reverse_iterator(begin()); }
|
||||
|
||||
// Capacity.
|
||||
constexpr size_type
|
||||
size() const noexcept { return _Nm; }
|
||||
|
||||
constexpr size_type
|
||||
max_size() const noexcept { return _Nm; }
|
||||
|
||||
constexpr bool
|
||||
empty() const noexcept { return size() == 0; }
|
||||
|
||||
// Element access.
|
||||
_GLIBCXX17_CONSTEXPR reference
|
||||
operator[](size_type __n) noexcept
|
||||
{ return _AT_Type::_S_ref(_M_elems, __n); }
|
||||
|
||||
constexpr const_reference
|
||||
operator[](size_type __n) const noexcept
|
||||
{ return _AT_Type::_S_ref(_M_elems, __n); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR reference
|
||||
at(size_type __n)
|
||||
{
|
||||
if (__n >= _Nm)
|
||||
std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
|
||||
">= _Nm (which is %zu)"),
|
||||
__n, _Nm);
|
||||
return _AT_Type::_S_ref(_M_elems, __n);
|
||||
}
|
||||
|
||||
constexpr const_reference
|
||||
at(size_type __n) const
|
||||
{
|
||||
// Result of conditional expression must be an lvalue so use
|
||||
// boolean ? lvalue : (throw-expr, lvalue)
|
||||
return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n)
|
||||
: (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) "
|
||||
">= _Nm (which is %zu)"),
|
||||
__n, _Nm),
|
||||
_AT_Type::_S_ref(_M_elems, 0));
|
||||
}
|
||||
|
||||
_GLIBCXX17_CONSTEXPR reference
|
||||
front() noexcept
|
||||
{ return *begin(); }
|
||||
|
||||
constexpr const_reference
|
||||
front() const noexcept
|
||||
{ return _AT_Type::_S_ref(_M_elems, 0); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR reference
|
||||
back() noexcept
|
||||
{ return _Nm ? *(end() - 1) : *end(); }
|
||||
|
||||
constexpr const_reference
|
||||
back() const noexcept
|
||||
{
|
||||
return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1)
|
||||
: _AT_Type::_S_ref(_M_elems, 0);
|
||||
}
|
||||
|
||||
_GLIBCXX17_CONSTEXPR pointer
|
||||
data() noexcept
|
||||
{ return _AT_Type::_S_ptr(_M_elems); }
|
||||
|
||||
_GLIBCXX17_CONSTEXPR const_pointer
|
||||
data() const noexcept
|
||||
{ return _AT_Type::_S_ptr(_M_elems); }
|
||||
};
|
||||
|
||||
#if __cpp_deduction_guides >= 201606
|
||||
template<typename _Tp, typename... _Up>
|
||||
array(_Tp, _Up...)
|
||||
-> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>,
|
||||
1 + sizeof...(_Up)>;
|
||||
#endif
|
||||
|
||||
// Array comparisons.
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
|
||||
{ return std::equal(__one.begin(), __one.end(), __two.begin()); }
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
|
||||
{ return !(__one == __two); }
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
|
||||
{
|
||||
return std::lexicographical_compare(__a.begin(), __a.end(),
|
||||
__b.begin(), __b.end());
|
||||
}
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
|
||||
{ return __two < __one; }
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
|
||||
{ return !(__one > __two); }
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline bool
|
||||
operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
|
||||
{ return !(__one < __two); }
|
||||
|
||||
// Specialized algorithms.
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
inline
|
||||
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
|
||||
// Constrained free swap overload, see p0185r1
|
||||
typename enable_if<
|
||||
_GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value
|
||||
>::type
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
|
||||
noexcept(noexcept(__one.swap(__two)))
|
||||
{ __one.swap(__two); }
|
||||
|
||||
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
typename enable_if<
|
||||
!_GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type
|
||||
swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
|
||||
#endif
|
||||
|
||||
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
|
||||
constexpr _Tp&
|
||||
get(array<_Tp, _Nm>& __arr) noexcept
|
||||
{
|
||||
static_assert(_Int < _Nm, "array index is within bounds");
|
||||
return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::
|
||||
_S_ref(__arr._M_elems, _Int);
|
||||
}
|
||||
|
||||
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
|
||||
constexpr _Tp&&
|
||||
get(array<_Tp, _Nm>&& __arr) noexcept
|
||||
{
|
||||
static_assert(_Int < _Nm, "array index is within bounds");
|
||||
return std::move(_GLIBCXX_STD_C::get<_Int>(__arr));
|
||||
}
|
||||
|
||||
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
|
||||
constexpr const _Tp&
|
||||
get(const array<_Tp, _Nm>& __arr) noexcept
|
||||
{
|
||||
static_assert(_Int < _Nm, "array index is within bounds");
|
||||
return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::
|
||||
_S_ref(__arr._M_elems, _Int);
|
||||
}
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_CONTAINER
|
||||
} // namespace std
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
||||
// Tuple interface to class template array.
|
||||
|
||||
/// tuple_size
|
||||
template<typename _Tp>
|
||||
class tuple_size;
|
||||
|
||||
/// Partial specialization for std::array
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
struct tuple_size<_GLIBCXX_STD_C::array<_Tp, _Nm>>
|
||||
: public integral_constant<std::size_t, _Nm> { };
|
||||
|
||||
/// tuple_element
|
||||
template<std::size_t _Int, typename _Tp>
|
||||
class tuple_element;
|
||||
|
||||
/// Partial specialization for std::array
|
||||
template<std::size_t _Int, typename _Tp, std::size_t _Nm>
|
||||
struct tuple_element<_Int, _GLIBCXX_STD_C::array<_Tp, _Nm>>
|
||||
{
|
||||
static_assert(_Int < _Nm, "index is out of bounds");
|
||||
typedef _Tp type;
|
||||
};
|
||||
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
struct __is_tuple_like_impl<_GLIBCXX_STD_C::array<_Tp, _Nm>> : true_type
|
||||
{ };
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace std
|
||||
|
||||
#ifdef _GLIBCXX_DEBUG
|
||||
# include <debug/array>
|
||||
#endif
|
||||
|
||||
#ifdef _GLIBCXX_PROFILE
|
||||
# include <profile/array>
|
||||
#endif
|
||||
|
||||
#endif // C++11
|
||||
|
||||
#endif // _GLIBCXX_ARRAY
|
||||
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}
|
||||
21
build_py310_sls2.sh
Normal file
21
build_py310_sls2.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
module unload gcc
|
||||
module load gcc/7.5.0
|
||||
#module load gcc/10.4.0
|
||||
rm -f PyCafeDefs.pxi
|
||||
ln -s PyCafeDefs_py37.pxi PyCafeDefs.pxi
|
||||
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
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
_EPICS_BASE=base-7.0.9
|
||||
source /opt/gfa/python 3.10
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
echo ${LD_PRELOAD}
|
||||
|
||||
python setup_py310_sls2.py build_ext -b ./python3.10-sls2/lib/${_EPICS_HOST_ARCH}
|
||||
cp examples.py ./python3.10-sls2/lib/${_EPICS_HOST_ARCH}
|
||||
unset LD_PRELOAD
|
||||
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/6.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}
|
||||
30
build_py35_sls2.sh
Normal file
30
build_py35_sls2.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
#SOURCE build_py37_sls2.sh first
|
||||
#rm -f PyCafeDefs.pxi
|
||||
#ln -s PyCafeDefs_py35.pxi PyCafeDefs.pxi
|
||||
#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_py35.pyx PyCafe.pyx
|
||||
#rm -f PyCafeDefs.pxi
|
||||
#ln -s PyCafeDefs_py35.pxi PyCafeDefs.pxi
|
||||
#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
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
_EPICS_BASE=base-7.0.9
|
||||
source /opt/gfa/python 3.5
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
echo ${LD_PRELOAD}
|
||||
|
||||
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}
|
||||
|
||||
unset LD_PRELOAD
|
||||
@@ -6,6 +6,11 @@ rm -f PyCafe.pxd
|
||||
ln -s PyCafe_sf.pxd PyCafe.pxd
|
||||
rm -f PyCafe.pyx
|
||||
ln -s PyCafe_sf.pyx PyCafe.pyx
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
_EPICS_BASE=base-7.0.9
|
||||
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}
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
echo ${LD_PRELOAD}
|
||||
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}
|
||||
unset LD_PRELOAD
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
rm -f PyCafeDefs.pxi
|
||||
ln -s PyCafeDefs_py37.pxi PyCafeDefs.pxi
|
||||
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
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64 #os.environ['EPICS_HOST_ARCH']
|
||||
_EPICS_BASE=base-7.0.9
|
||||
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}
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
echo ${LD_PRELOAD}
|
||||
|
||||
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}
|
||||
unset LD_PRELOAD
|
||||
|
||||
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}
|
||||
20
build_py38_sls2.sh
Normal file
20
build_py38_sls2.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
module unload gcc
|
||||
module load gcc/7.5.0
|
||||
rm -f PyCafeDefs.pxi
|
||||
ln -s PyCafeDefs_py37.pxi PyCafeDefs.pxi
|
||||
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
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
_EPICS_BASE=base-7.0.9
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
echo ${LD_PRELOAD}
|
||||
|
||||
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}
|
||||
unset LD_PRELOAD
|
||||
38
examples.py
38
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],)
|
||||
@@ -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):
|
||||
|
||||
47
examples.sh
Normal file
47
examples.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
|
||||
|
||||
|
||||
if [ -z "$PS1" ]; then
|
||||
echo "This shell is not interactive"
|
||||
appName=$0
|
||||
else
|
||||
echo "This shell is interactive"
|
||||
appName=$BASH_SOURCE
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Select default Python Version here. Currently only 3.7 is supported
|
||||
PYTHON_VERSION=3.7
|
||||
|
||||
if [ "$1" ]; then
|
||||
if [ "$1" == "3.8" -o "$1" == "38" ]; then
|
||||
echo "User requested python version $1 is not yet supported"
|
||||
echo "Using default version $PYTHON_VERSION"
|
||||
elif [ "$1" == "3.7" -o "$1" == "37" ]; then
|
||||
PYTHON_VERSION=3.7
|
||||
else
|
||||
echo "User requested python version $1 is not supported"
|
||||
echo "Using default version $PYTHON_VERSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "PYTHON_VERSION $PYTHON_VERSION"
|
||||
|
||||
|
||||
# For use if script is sourced rather than executed
|
||||
appNameDefault="examples.sh"
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
_EPICS_BASE=base-7.0.9
|
||||
|
||||
. /opt/gfa/python $PYTHON_VERSION
|
||||
|
||||
export PYTHONPATH=.:
|
||||
|
||||
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
||||
python examples.py
|
||||
unset LD_PRELOAD
|
||||
55
makefile
55
makefile
@@ -5,11 +5,14 @@
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#
|
||||
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
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.22.0-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.22.0-sf-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY35= $(CAFE_CYCAFE_BASE)/cafe-1.22.0-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY37= $(CAFE_CYCAFE_BASE)/cafe-1.22.0-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY38= $(CAFE_CYCAFE_BASE)/cafe-1.22.0-gcc-7.5.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY310= $(CAFE_CYCAFE_BASE)/cafe-1.22.0-gcc-7.5.0/lib/${_EPICS_HOST_ARCH}
|
||||
#############################################
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
@@ -18,30 +21,44 @@ INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HO
|
||||
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
|
||||
install_py37: python3.7-sls2/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)
|
||||
cp python3.7-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
|
||||
cp python3.7-sls2/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
|
||||
install_py35: python3.5-sls2/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)
|
||||
cp python3.5-sls2/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
|
||||
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)
|
||||
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
|
||||
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)
|
||||
cp python3.5-sf/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
|
||||
|
||||
|
||||
install_py310_sls2: python3.10-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY310)
|
||||
cp python3.10-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY310)
|
||||
cp python3.10-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2_PY310)
|
||||
|
||||
install_py38_sls2: python3.8-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY38)
|
||||
cp python3.8-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY38)
|
||||
cp python3.8-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2_PY38)
|
||||
|
||||
install_py37_sls2: python3.7-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY37)
|
||||
cp python3.7-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY37)
|
||||
cp python3.7-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS_PY37)
|
||||
|
||||
install_py35_sls2: python3.5-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY35)
|
||||
cp python3.5-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY35)
|
||||
cp python3.5-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2_PY35)
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
|
||||
63
makefile-
Normal file
63
makefile-
Normal file
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
#
|
||||
#
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#
|
||||
|
||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
||||
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-1-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-1-sf-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-1-gcc-7.3.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY38= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-1-gcc-7.5.0/lib/${_EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2_PY310= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-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_py310_sls2: python3.10-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY310)
|
||||
cp python3.10-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY310)
|
||||
cp python3.10-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2_PY310)
|
||||
|
||||
install_py38_sls2: python3.8-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2_PY38)
|
||||
cp python3.8-sls2/lib/${_EPICS_HOST_ARCH}/PyCafe.cpython-38-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2_PY38)
|
||||
cp python3.8-sls2/lib/${_EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2_PY38)
|
||||
|
||||
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)
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
61
makefile_gcc_7.5.0
Normal file
61
makefile_gcc_7.5.0
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
#
|
||||
#
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#
|
||||
|
||||
|
||||
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
|
||||
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-gcc-7.5.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-sf-gcc-7.5.0/lib/${EPICS_HOST_ARCH}
|
||||
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.21.0-gcc-10.4.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)
|
||||
|
||||
install_py310_sls2: python3.10-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so
|
||||
mkdir -p $(INSTALL_PATH_SLS2)
|
||||
cp python3.10-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-310-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
|
||||
cp python3.10-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
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 }
|
||||
)
|
||||
)
|
||||
64
setup_py310_sls2.py
Normal file
64
setup_py310_sls2.py
Normal file
@@ -0,0 +1,64 @@
|
||||
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='10.4.0'
|
||||
#_CAFE_VERSION='1.20.1-py310-gcc-' + _GCC_VERSION
|
||||
#_EPICS_VERSION='7.0.7'
|
||||
|
||||
_GCC_VERSION='7.5.0'
|
||||
#_GCC_VERSION='10.4.0'
|
||||
_CAFE_VERSION='1.22.0-py310-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.9'
|
||||
|
||||
_EPICS_HOST_ARCH =os.environ['RHREL'] + '-x86_64'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
extra_objects = [ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libca.so',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libCom.so',
|
||||
],
|
||||
include_dirs=[ '/opt/gfa/python-3.10/latest/include/python3.10',
|
||||
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.10/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=['dl','cafe','Qt5Xml'])
|
||||
], 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,6 +7,9 @@ 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++",
|
||||
@@ -15,13 +18,13 @@ 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-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['RHREL'] +'-x86_64' #os.environ['EPICS_HOST_ARCH'] #'SL6-x86_64'
|
||||
|
||||
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 }
|
||||
)
|
||||
)
|
||||
57
setup_py35_sls2.py
Normal file
57
setup_py35_sls2.py
Normal file
@@ -0,0 +1,57 @@
|
||||
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.22.0-py35-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.9'
|
||||
_EPICS_HOST_ARCH=os.environ['RHREL'] +'-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
extra_objects = [ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libca.so',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libCom.so',
|
||||
],
|
||||
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'
|
||||
],
|
||||
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=['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,46 +7,56 @@ 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'
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.22.0-sf-py37-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.9'
|
||||
_EPICS_HOST_ARCH =os.environ['RHREL'] + '-x86_64'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
extra_objects = [ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libca.so',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libCom.so',
|
||||
],
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
os.environ['EPICS'] + '/base/include',
|
||||
os.environ['EPICS'] + '/base/include/os/Linux',
|
||||
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 +
|
||||
'-sf-py37-gcc-7.3.0/include',
|
||||
'/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'],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
|
||||
'/lib/' + _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'
|
||||
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib',
|
||||
'/opt/gfa/python-3.7/latest/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'
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'/lib/' + _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=['ca','Com','dl','cafe'])
|
||||
libraries=['dl','cafe','Qt5Xml'])
|
||||
], annotate=True,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3,
|
||||
'c_string_type': 'str', 'c_string_encoding' : 'ascii',
|
||||
|
||||
60
setup_py37_sf_epics3.py
Normal file
60
setup_py37_sf_epics3.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.5'
|
||||
_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=['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,14 +7,21 @@ default_options['emit_linenums'] = True
|
||||
from Cython.Build import cythonize
|
||||
from numpy import get_include
|
||||
|
||||
|
||||
_CAFE_VERSION='1.14.2'
|
||||
_EPICS_VERSION='7.0.6'
|
||||
|
||||
_GCC_VERSION='7.3.0'
|
||||
_CAFE_VERSION='1.22.0-py37-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.9'
|
||||
_EPICS_HOST_ARCH=os.environ['RHREL'] + '-x86_64' #os.environ['EPICS_HOST_ARCH']
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
#extra_compile_args=['-fPIC'],
|
||||
#extra_link_args=['-static'],
|
||||
extra_objects = [ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libca.so',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libCom.so',
|
||||
],
|
||||
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/include/os/Linux',
|
||||
@@ -22,26 +29,26 @@ setup(
|
||||
'/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 +
|
||||
'-sls2-py37-gcc-7.3.0/include',
|
||||
'/include',
|
||||
'.', get_include()],
|
||||
library_dirs=[ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
os.environ['EPICS_HOST_ARCH'],
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-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'
|
||||
'/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-' + _EPICS_VERSION + '/lib/' +
|
||||
os.environ['EPICS_HOST_ARCH'],
|
||||
_EPICS_HOST_ARCH,
|
||||
'/opt/gfa/cafe/cpp/cafe-' + _CAFE_VERSION +
|
||||
'-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'
|
||||
],
|
||||
libraries=['ca','Com','dl','cafe'])
|
||||
'/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'
|
||||
],
|
||||
libraries=['dl','cafe', 'Qt5Xml'])
|
||||
], annotate=True,
|
||||
compiler_directives={'embedsignature': False, 'language_level': 3,
|
||||
'c_string_type': 'str', 'c_string_encoding' : 'ascii',
|
||||
|
||||
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}
|
||||
)
|
||||
)
|
||||
58
setup_py38_sls2.py
Normal file
58
setup_py38_sls2.py
Normal file
@@ -0,0 +1,58 @@
|
||||
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.22.0-py38-gcc-' + _GCC_VERSION
|
||||
_EPICS_VERSION='7.0.9'
|
||||
_EPICS_HOST_ARCH =os.environ['RHREL'] + '-x86_64'
|
||||
|
||||
setup(
|
||||
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
|
||||
language="c++",
|
||||
extra_objects = [ os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libca.so',
|
||||
os.environ['EPICS'] + '/base-' + _EPICS_VERSION + '/lib/' +
|
||||
_EPICS_HOST_ARCH + '/libCom.so',
|
||||
],
|
||||
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=['dl','cafe','Qt5Xml'])
|
||||
], 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