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= ( callback) print("CALLED") cbobjt() with nogil: return cdef public void cy_data_event_handler_wrapper(void * callback, unsigned int handle, string pvname, PVDataHolder pvd) with gil: global py_cb #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) cdef pvdata data = PVDataHolderToStruct(pvd) #data.show() py_cb = ( 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) py_cb(handle, pvname, data) #if monDictGlobal[mpid] != py_cb: # print( monDictGlobal[mpid]) # print( 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= ( 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) #(args[0])(args[1], args[2]) cbobjt= callback #cbobjt=args[0] cbobjt(handle, pvname) #cbobjt=(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= 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 ", callback) if callback: cbobjt= 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= ( 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= ( callback) cbobjt(handle) with nogil: return # ***********public***************