diff --git a/PyCafe.pxd b/PyCafe.pxd index e9b4188..091ea6e 100644 --- a/PyCafe.pxd +++ b/PyCafe.pxd @@ -1,6 +1,6 @@ # file: PyCafe.pxd -#from cpython.ref cimport PyObject +# from cpython.ref cimport PyObject from libcpp.string cimport string from libcpp.vector cimport vector from libcpp.map cimport map @@ -9,1272 +9,1439 @@ from libcpp.pair cimport pair cimport cython #import numpy as np - cimport numpy as cnp -cdef extern from "Python.h": - ctypedef enum PyGILState_STATE: - PyGILState_LOCKED=0 - PyGILState_UNLOCKED=1 - - void PyEval_InitThreads() - void Py_Initialize() - PyGILState_STATE PyGILState_Ensure() - void PyGILState_Release(PyGILState_STATE) - +IF PY_VERSION_HEX <= 0x30501f0: + include "python35_header.pxi" + cdef extern from "boost/multi_index_container.hpp" namespace "boost": - cdef cppclass multi_index_container: - pass + cdef cppclass multi_index_container: + pass cdef extern from "boost/smart_ptr/shared_ptr.hpp" namespace "boost": - cdef cppclass shared_ptr[T]: - shared_ptr() - shared_ptr(T *p) - shared_ptr(const shared_ptr&) - long use_count() - T operator*() - + cdef cppclass shared_ptr[T]: + shared_ptr() + shared_ptr(T * p) + shared_ptr(const shared_ptr & ) + long use_count() + T operator*() cdef extern from "" namespace "std": - cdef cppclass multimap[T, U]: - cppclass iterator: - pair[T, U]& operator*() nogil - iterator operator++() nogil - iterator operator--() nogil - bint operator==(iterator) nogil - bint operator!=(iterator) nogil - multimap() nogil except + - U& operator[](T&) nogil - iterator begin() nogil - iterator end() nogil - pair[iterator, bint] insert(pair[T, U]) nogil - iterator find(T&) nogil - + cdef cppclass multimap[T, U]: + cppclass iterator: + pair[T, U] & operator*() nogil + iterator operator++() nogil + iterator operator--() nogil + bint operator == (iterator) nogil + bint operator != (iterator) nogil + multimap() nogil except + + U & operator[](T &) nogil + iterator begin() nogil + iterator end() nogil + pair[iterator, bint] insert(pair[T, U]) nogil + iterator find(T & ) nogil cdef extern from "cadef.h": - ctypedef long chtype - ctypedef oldSubscription * evid + ctypedef long chtype + ctypedef oldSubscription * evid - cdef struct oldSubscription: - pass + cdef struct ca_client_context: + pass - cdef struct oldChannelNotify: - pass + cdef struct oldSubscription: + pass - cdef struct event_handler_args: - oldChannelNotify chid - long type - int count - const void *dbr - int status - void * usr - pass + cdef struct oldChannelNotify: + pass + cdef struct event_handler_args: + oldChannelNotify chid + long type + int count + const void * dbr + int status + void * usr + pass - cdef: - int ca_flush_io() - int ca_poll() + cdef: + int ca_flush_io() + int ca_poll() cdef extern from "defines.h": - unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK - short BSREAD_ZEROMQ_TIMEOUT_MS - const short PVNAME_SIZE - ctypedef struct etsDate: - int year - int mon - int day - int hour - int min - int sec - unsigned long nsec - int wday - int yday - int isdst - pass - - ctypedef struct etsNorm: - unsigned int secPastEpoch - unsigned int nsec - pass + double DEFAULT_TIMEOUT_PEND_EVENT + double DEFAULT_TIMEOUT_PEND_IO + const string INVALID_ENUM_RETURN_STRING + const short INVALID_ENUM_RETURN_VALUE + + unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + short BSREAD_ZEROMQ_TIMEOUT_MS + const short PVNAME_SIZE + ctypedef struct etsDate: + int year + int mon + int day + int hour + int min + int sec + unsigned long nsec + int wday + int yday + int isdst + pass + + ctypedef struct etsNorm: + unsigned int secPastEpoch + unsigned int nsec + pass cdef extern from "caeventmask.h": - #ctypedef enum DBE_TYPE: - # DBE_VALUE=1 - # DBE_LOG=2 - # DBE_ARCHIVE=DBE_LOG - # DBE_ALARM=4 - # DBE_PROPERTY=8 - unsigned int DBE_VALUE - unsigned int DBE_LOG - unsigned int DBE_ARCHIVE - unsigned int DBE_ALARM - unsigned int DBE_PROPERTY - - - + # ctypedef enum DBE_TYPE: + # DBE_VALUE=1 + # DBE_LOG=2 + # DBE_ARCHIVE=DBE_LOG + # DBE_ALARM=4 + # DBE_PROPERTY=8 + unsigned int DBE_VALUE + unsigned int DBE_LOG + unsigned int DBE_ARCHIVE + unsigned int DBE_ALARM + unsigned int DBE_PROPERTY + + cdef extern from "time.h": - cdef struct tm: - int tm_sec #seconds after the minute 0-61* - int tm_min #minutes after the hour 0-59 - int tm_hour #hours since midnight 0-23 - int tm_mday #day of the month 1-31 - int tm_mon #months since January 0-11 - int tm_year #years since 1900 - int tm_wday #days since Sunday 0-6 - int tm_yday #days since January 1 0-365 - int tm_isdst #Daylight Saving Time flag - + cdef struct tm: + int tm_sec # seconds after the minute 0-61* + int tm_min # minutes after the hour 0-59 + int tm_hour # hours since midnight 0-23 + int tm_mday # day of the month 1-31 + int tm_mon # months since January 0-11 + int tm_year # years since 1900 + int tm_wday # days since Sunday 0-6 + int tm_yday # days since January 1 0-365 + int tm_isdst # Daylight Saving Time flag + 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 &) - cdef struct local_tm_nano_sec: - tm ansi_tm - unsigned long nSec - -cdef extern from "db_access.h": - unsigned int DBR_STRING #returns a NULL terminated string - unsigned int DBR_SHORT #returns an unsigned short - unsigned int DBR_INT #returns an unsigned short - unsigned int DBR_FLOAT #returns an IEEE floating point value - unsigned int DBR_ENUM #returns an unsigned short which is the enum item - unsigned int DBR_CHAR #returns an unsigned char - unsigned int DBR_LONG #returns an unsigned long - unsigned int DBR_DOUBLE #returns a double precision floating point number - unsigned int DBR_STS_STRING #returns a string status structure (dbr_sts_string) - unsigned int DBR_STS_SHORT #returns a short status structure (dbr_sts_short) - unsigned int DBR_STS_INT #returns a short status structure (dbr_sts_int) - unsigned int DBR_STS_FLOAT #returns a float status structure (dbr_sts_float) - unsigned int DBR_STS_ENUM #returns an enum status structure (dbr_sts_enum) - unsigned int DBR_STS_CHAR #returns a char status structure (dbr_sts_char) - unsigned int DBR_STS_LONG #returns a long status structure (dbr_sts_long) - unsigned int DBR_STS_DOUBLE #returns a double status structure (dbr_sts_double) - unsigned int DBR_TIME_STRING #returns a string time structure (dbr_time_string) - unsigned int DBR_TIME_SHORT #returns a short time structure (dbr_time_short) - unsigned int DBR_TIME_INT #returns a short time structure (dbr_time_short) - unsigned int DBR_TIME_FLOAT #returns a float time structure (dbr_time_float) - unsigned int DBR_TIME_ENUM #returns an enum time structure (dbr_time_enum) - unsigned int DBR_TIME_CHAR #returns a char time structure (dbr_time_char) - unsigned int DBR_TIME_LONG #returns a long time structure (dbr_time_long) - unsigned int DBR_TIME_DOUBLE #returns a double time structure (dbr_time_double) - unsigned int DBR_GR_STRING #returns a graphic string structure (dbr_gr_string) - unsigned int DBR_GR_SHORT #returns a graphic short structure (dbr_gr_short) - unsigned int DBR_GR_INT #returns a graphic short structure (dbr_gr_int) - unsigned int DBR_GR_FLOAT #returns a graphic float structure (dbr_gr_float) - unsigned int DBR_GR_ENUM #returns a graphic enum structure (dbr_gr_enum) - unsigned int DBR_GR_CHAR #returns a graphic char structure (dbr_gr_char) - unsigned int DBR_GR_LONG #returns a graphic long structure (dbr_gr_long) - unsigned int DBR_GR_DOUBLE #returns a graphic double structure (dbr_gr_double) - unsigned int DBR_CTRL_STRING #returns a control string structure (dbr_ctrl_int) - unsigned int DBR_CTRL_SHORT #returns a control short structure (dbr_ctrl_short) - unsigned int DBR_CTRL_INT #returns a control short structure (dbr_ctrl_int) - unsigned int DBR_CTRL_FLOAT #returns a control float structure (dbr_ctrl_float) - unsigned int DBR_CTRL_ENUM #returns a control enum structure (dbr_ctrl_enum) - unsigned int DBR_CTRL_CHAR #returns a control char structure (dbr_ctrl_char) - unsigned int DBR_CTRL_LONG #returns a control long structure (dbr_ctrl_long) - unsigned int DBR_CTRL_DOUBLE #returns a control double structure (dbr_ctrl_double) + 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 & ) + cdef struct local_tm_nano_sec: + tm ansi_tm + unsigned long nSec - ctypedef char[40] dbr_string_t - ctypedef short dbr_short_t - ctypedef float dbr_float_t - ctypedef unsigned short dbr_enum_t - ctypedef unsigned char dbr_char_t - ctypedef int dbr_long_t - ctypedef double dbr_double_t - - cdef struct dbr_sts_string: - pass - cdef struct dbr_sts_short: - pass - cdef struct dbr_sts_int: - pass - cdef struct dbr_sts_float: - dbr_float_t value - dbr_short_t status - pass - cdef struct dbr_sts_enum: - pass - cdef struct dbr_sts_char: - pass - cdef struct dbr_sts_long: - pass - cdef struct dbr_sts_double: - pass - - cdef struct dbr_time_string: - pass - cdef struct dbr_time_short: - pass - cdef struct dbr_time_int: - pass - cdef struct dbr_time_float: - dbr_float_t value - dbr_short_t status - dbr_short_t severity - epicsTimeStamp stamp - pass - cdef struct dbr_time_enum: - pass - cdef struct dbr_time_char: - pass - cdef struct dbr_time_long: - pass - cdef struct dbr_time_double: - pass - - cdef struct dbr_gr_string: - pass - cdef struct dbr_gr_short: - pass - cdef struct dbr_gr_int: - pass - cdef struct dbr_gr_float: - dbr_float_t value - dbr_short_t status - pass - cdef struct dbr_gr_enum: - pass - cdef struct dbr_gr_char: - pass - cdef struct dbr_gr_long: - pass - cdef struct dbr_gr_double: - pass - - cdef struct dbr_ctrl_string: - pass - cdef struct dbr_ctrl_short: - pass - cdef struct dbr_ctrl_int: - pass - cdef struct dbr_ctrl_float: - dbr_float_t value - dbr_short_t status - pass - cdef struct dbr_ctrl_enum: - pass - cdef struct dbr_ctrl_char: - pass - cdef struct dbr_ctrl_long: - pass - cdef struct dbr_ctrl_double: - pass - -cdef extern from "caerr.h": - unsigned int ECA_NORMAL - unsigned int ECA_ALLOCMEM - unsigned int ECA_TOLARGE - unsigned int ECA_TIMEOUT - unsigned int ECA_BADTYPE - unsigned int ECA_INTERNAL - unsigned int ECA_GETFAIL - unsigned int ECA_PUTFAIL - unsigned int ECA_BADCOUNT - unsigned int ECA_BADSTR - unsigned int ECA_DISCONN - unsigned int ECA_DBLCHNL - unsigned int ECA_EVDISALLOW - unsigned int ECA_BADMONID - unsigned int ECA_BADMASK - unsigned int ECA_IODONE - unsigned int ECA_IOINPROGRESS - unsigned int ECA_BADSYNCGRP - unsigned int ECA_PUTCBINPROG - unsigned int ECA_NORDACCESS - unsigned int ECA_NOWTACCESS - unsigned int ECA_ANACHRONISM - unsigned int ECA_NOSEARCHADDR - unsigned int ECA_NOCONVERT - unsigned int ECA_BADCHID - unsigned int ECA_BADFUNCPTR - unsigned int ECA_ISATTACHED - unsigned int ECA_UNAVAILINSERV - unsigned int ECA_CHANDESTROY - unsigned int ECA_BADPRIORITY - unsigned int ECA_NOTTHREADED - unsigned int ECA_16KARRAYCLIENT - unsigned int ECA_CONNSEQTMO - unsigned int ECA_UNRESPTMO +cdef extern from "db_access.h": + unsigned int DBR_STRING # returns a NULL terminated string + unsigned int DBR_SHORT # returns an unsigned short + unsigned int DBR_INT # returns an unsigned short + unsigned int DBR_FLOAT # returns an IEEE floating point value + unsigned int DBR_ENUM # returns an unsigned short which is the enum item + unsigned int DBR_CHAR # returns an unsigned char + unsigned int DBR_LONG # returns an unsigned long + unsigned int DBR_DOUBLE # returns a double precision floating point number + # returns a string status structure (dbr_sts_string) + unsigned int DBR_STS_STRING + # returns a short status structure (dbr_sts_short) + unsigned int DBR_STS_SHORT + unsigned int DBR_STS_INT # returns a short status structure (dbr_sts_int) + # returns a float status structure (dbr_sts_float) + unsigned int DBR_STS_FLOAT + # returns an enum status structure (dbr_sts_enum) + unsigned int DBR_STS_ENUM + unsigned int DBR_STS_CHAR # returns a char status structure (dbr_sts_char) + unsigned int DBR_STS_LONG # returns a long status structure (dbr_sts_long) + # returns a double status structure (dbr_sts_double) + unsigned int DBR_STS_DOUBLE + # returns a string time structure (dbr_time_string) + unsigned int DBR_TIME_STRING + # returns a short time structure (dbr_time_short) + unsigned int DBR_TIME_SHORT + # returns a short time structure (dbr_time_short) + unsigned int DBR_TIME_INT + # returns a float time structure (dbr_time_float) + unsigned int DBR_TIME_FLOAT + # returns an enum time structure (dbr_time_enum) + unsigned int DBR_TIME_ENUM + unsigned int DBR_TIME_CHAR # returns a char time structure (dbr_time_char) + unsigned int DBR_TIME_LONG # returns a long time structure (dbr_time_long) + # returns a double time structure (dbr_time_double) + unsigned int DBR_TIME_DOUBLE + # returns a graphic string structure (dbr_gr_string) + unsigned int DBR_GR_STRING + # returns a graphic short structure (dbr_gr_short) + unsigned int DBR_GR_SHORT + unsigned int DBR_GR_INT # returns a graphic short structure (dbr_gr_int) + # returns a graphic float structure (dbr_gr_float) + unsigned int DBR_GR_FLOAT + unsigned int DBR_GR_ENUM # returns a graphic enum structure (dbr_gr_enum) + unsigned int DBR_GR_CHAR # returns a graphic char structure (dbr_gr_char) + unsigned int DBR_GR_LONG # returns a graphic long structure (dbr_gr_long) + # returns a graphic double structure (dbr_gr_double) + unsigned int DBR_GR_DOUBLE + # returns a control string structure (dbr_ctrl_int) + unsigned int DBR_CTRL_STRING + # returns a control short structure (dbr_ctrl_short) + unsigned int DBR_CTRL_SHORT + # returns a control short structure (dbr_ctrl_int) + unsigned int DBR_CTRL_INT + # returns a control float structure (dbr_ctrl_float) + unsigned int DBR_CTRL_FLOAT + # returns a control enum structure (dbr_ctrl_enum) + unsigned int DBR_CTRL_ENUM + # returns a control char structure (dbr_ctrl_char) + unsigned int DBR_CTRL_CHAR + # returns a control long structure (dbr_ctrl_long) + unsigned int DBR_CTRL_LONG + # returns a control double structure (dbr_ctrl_double) + unsigned int DBR_CTRL_DOUBLE -cdef extern from "caopCodes.h": - cdef cppclass CAOPCodes: - pass - string message(int) - int enumIs(string) - show() + ctypedef char[40] dbr_string_t + ctypedef short dbr_short_t + ctypedef float dbr_float_t + ctypedef unsigned short dbr_enum_t + ctypedef unsigned char dbr_char_t + ctypedef int dbr_long_t + ctypedef double dbr_double_t + cdef struct dbr_sts_string: + pass + cdef struct dbr_sts_short: + pass + cdef struct dbr_sts_int: + pass + cdef struct dbr_sts_float: + dbr_float_t value + dbr_short_t status + pass + cdef struct dbr_sts_enum: + pass + cdef struct dbr_sts_char: + pass + cdef struct dbr_sts_long: + pass + cdef struct dbr_sts_double: + pass -#cdef extern from "defines.h": -# const short PVNAME_SIZE + cdef struct dbr_time_string: + pass + cdef struct dbr_time_short: + pass + cdef struct dbr_time_int: + pass + cdef struct dbr_time_float: + dbr_float_t value + dbr_short_t status + dbr_short_t severity + epicsTimeStamp stamp + pass + cdef struct dbr_time_enum: + pass + cdef struct dbr_time_char: + pass + cdef struct dbr_time_long: + pass + cdef struct dbr_time_double: + pass + cdef struct dbr_gr_string: + pass + cdef struct dbr_gr_short: + pass + cdef struct dbr_gr_int: + pass + cdef struct dbr_gr_float: + dbr_float_t value + dbr_short_t status + pass + cdef struct dbr_gr_enum: + pass + cdef struct dbr_gr_char: + pass + cdef struct dbr_gr_long: + pass + cdef struct dbr_gr_double: + pass + + cdef struct dbr_ctrl_string: + pass + cdef struct dbr_ctrl_short: + pass + cdef struct dbr_ctrl_int: + pass + cdef struct dbr_ctrl_float: + dbr_float_t value + dbr_short_t status + pass + cdef struct dbr_ctrl_enum: + pass + cdef struct dbr_ctrl_char: + pass + cdef struct dbr_ctrl_long: + pass + cdef struct dbr_ctrl_double: + pass + +cdef extern from "caerr.h": + unsigned int ECA_NORMAL + unsigned int ECA_ALLOCMEM + unsigned int ECA_TOLARGE + unsigned int ECA_TIMEOUT + unsigned int ECA_BADTYPE + unsigned int ECA_INTERNAL + unsigned int ECA_GETFAIL + unsigned int ECA_PUTFAIL + unsigned int ECA_BADCOUNT + unsigned int ECA_BADSTR + unsigned int ECA_DISCONN + unsigned int ECA_DBLCHNL + unsigned int ECA_EVDISALLOW + unsigned int ECA_BADMONID + unsigned int ECA_BADMASK + unsigned int ECA_IODONE + unsigned int ECA_IOINPROGRESS + unsigned int ECA_BADSYNCGRP + unsigned int ECA_PUTCBINPROG + unsigned int ECA_NORDACCESS + unsigned int ECA_NOWTACCESS + unsigned int ECA_ANACHRONISM + unsigned int ECA_NOSEARCHADDR + unsigned int ECA_NOCONVERT + unsigned int ECA_BADCHID + unsigned int ECA_BADFUNCPTR + unsigned int ECA_ISATTACHED + unsigned int ECA_UNAVAILINSERV + unsigned int ECA_CHANDESTROY + unsigned int ECA_BADPRIORITY + unsigned int ECA_NOTTHREADED + unsigned int ECA_16KARRAYCLIENT + unsigned int ECA_CONNSEQTMO + unsigned int ECA_UNRESPTMO + +cdef extern from "caopCodes.h": + cdef cppclass CAOPCodes: + pass + string message(int) + int enumIs(string) + show() cdef extern from "tmDateMap.h": - ctypedef enum TM_WDAY: - TM_SUNDAY = 0 - TM_MONDAY = 1 - TM_TUESDAY = 2 - TM_WEDNESDAY = 3 - TM_THURSDAY = 4 - TM_FRIDAY = 5 - TM_SATURDAY = 6 + ctypedef enum TM_WDAY: + TM_SUNDAY = 0 + TM_MONDAY = 1 + TM_TUESDAY = 2 + TM_WEDNESDAY = 3 + TM_THURSDAY = 4 + TM_FRIDAY = 5 + TM_SATURDAY = 6 - ctypedef enum TM_MONTHP: - TM_JAN = 1 - TM_FEB = 2 - TM_MAR = 3 - TM_APR = 4 - TM_MAY = 5 - TM_JUN = 6 - TM_JUL = 7 - TM_AUG = 8 - TM_SEP = 9 - TM_OCT =10 - TM_NOV =11 - TM_DEC =12 + ctypedef enum TM_MONTHP: + TM_JAN = 1 + TM_FEB = 2 + TM_MAR = 3 + TM_APR = 4 + TM_MAY = 5 + TM_JUN = 6 + TM_JUL = 7 + TM_AUG = 8 + TM_SEP = 9 + TM_OCT = 10 + TM_NOV = 11 + TM_DEC = 12 - cdef cppclass TMwdayText: - string message(int) - string asString(int) - int enumIs(string) - int asEnum(string) - show() + cdef cppclass TMwdayText: + string message(int) + string asString(int) + int enumIs(string) + int asEnum(string) + show() - cdef cppclass TMmonthpText: - string message(int) - string asString(int) - int enumIs(string) - int asEnum(string) - show() + cdef cppclass TMmonthpText: + string message(int) + string asString(int) + int enumIs(string) + int asEnum(string) + show() cdef extern from "cafeDataType.h": - ctypedef enum CAFE_DATATYPE: - CAFE_TYPENOTCONN =-1 - CAFE_STRING = 0 - CAFE_SHORT = 1 - CAFE_INT = CAFE_SHORT - CAFE_FLOAT = 2 - CAFE_ENUM = 3 - CAFE_USHORT = CAFE_ENUM - CAFE_CHAR = 4 - CAFE_LONG = 5 - CAFE_DOUBLE = 6 - CAFE_NO_ACCESS = 7 - CAFE_INVALID_DATATYPE = 8 - CAFE_NOT_REQUESTED = 100 - CAFE_NOT_SHOWN = 101 - - ctypedef union CAFE_DATATYPE_UNION: - dbr_string_t str - dbr_short_t s - dbr_float_t f - dbr_enum_t us #unsigned short us; - dbr_char_t ch #unsigned char ch; - dbr_long_t l #int l; - dbr_double_t d + ctypedef enum CAFE_DATATYPE: + CAFE_TYPENOTCONN = -1 + CAFE_STRING = 0 + CAFE_SHORT = 1 + CAFE_INT = CAFE_SHORT + CAFE_FLOAT = 2 + CAFE_ENUM = 3 + CAFE_USHORT = CAFE_ENUM + CAFE_CHAR = 4 + CAFE_LONG = 5 + CAFE_DOUBLE = 6 + CAFE_NO_ACCESS = 7 + CAFE_INVALID_DATATYPE = 8 + CAFE_NOT_REQUESTED = 100 + CAFE_NOT_SHOWN = 101 - ctypedef CAFE_DATATYPE_UNION * CAFE_DATATYPE_UNION_SEQ - - cdef cppclass CAFEDataTypeCode: - pass - string message(int) - string asString(int) - int enumIs(string) - int asEnum(string) - show() + ctypedef union CAFE_DATATYPE_UNION: + dbr_string_t str + dbr_short_t s + dbr_float_t f + dbr_enum_t us # unsigned short us; + dbr_char_t ch # unsigned char ch; + dbr_long_t l # int l; + dbr_double_t d + + ctypedef CAFE_DATATYPE_UNION * CAFE_DATATYPE_UNION_SEQ + + cdef cppclass CAFEDataTypeCode: + pass + string message(int) + string asString(int) + int enumIs(string) + int asEnum(string) + show() cdef extern from "cafeEnum.h": - ctypedef enum DBR_TYPE: - DBR_PRIMITIVE - DBR_PLAIN=DBR_PRIMITIVE - DBR_STS - DBR_TIME - DBR_GR - DBR_CTRL - DBR_PUT # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. - DBR_STSACK # is DBR_STSACK_STRING - DBR_CLASS # is DBR_CLASS_NAME, - DBR_NONE # should not occur, but used internally within cafeVectors.h + ctypedef enum DBR_TYPE: + DBR_PRIMITIVE + DBR_PLAIN = DBR_PRIMITIVE + DBR_STS + DBR_TIME + DBR_GR + DBR_CTRL + # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + DBR_PUT + DBR_STSACK # is DBR_STSACK_STRING + DBR_CLASS # is DBR_CLASS_NAME, + DBR_NONE # should not occur, but used internally within cafeVectors.h - ctypedef enum ChannelFlushSendBufferPolicyKind: - WITH_FLUSH_IO - WITH_PEND_IO - WITH_PEND_EVENT - WITH_POLL + ctypedef enum ChannelFlushSendBufferPolicyKind: + WITH_FLUSH_IO + WITH_PEND_IO + WITH_PEND_EVENT + WITH_POLL - ctypedef enum ChannelWhenToFlushSendBufferPolicyKind: - FLUSH_AUTOMATIC=0 - FLUSH_NOW=FLUSH_AUTOMATIC - FLUSH_AFTER_EACH_CHANNEL_CREATION=FLUSH_NOW - FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION=FLUSH_NOW - FLUSH_AFTER_EACH_MESSAGE=FLUSH_NOW - FLUSH_AFTER_EACH_GROUP_CREATION=FLUSH_NOW - FLUSH_DESIGNATED_TO_CLIENT - - ctypedef enum ChannelGetCacheWaitPolicyKind: - GET_CACHE_NO_CHECK=0 - GET_CACHE_NO_WAIT - GET_CACHE_NOW =GET_CACHE_NO_WAIT - GET_CACHE_WAIT + ctypedef enum ChannelWhenToFlushSendBufferPolicyKind: + FLUSH_AUTOMATIC = 0 + FLUSH_NOW = FLUSH_AUTOMATIC + FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_NOW + FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_NOW + FLUSH_AFTER_EACH_MESSAGE = FLUSH_NOW + FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_NOW + FLUSH_DESIGNATED_TO_CLIENT - ctypedef enum ChannelGetActionWhenMonitorPolicyKind: - GET_FROM_CACHE - GET_FROM_IOC - - ctypedef enum ChannelRequestPolicyKind: - WITHOUT_CALLBACK - WITH_CALLBACK_DEFAULT - WITH_CALLBACK_USER_SUPPLIED + ctypedef enum ChannelGetCacheWaitPolicyKind: + GET_CACHE_NO_CHECK = 0 + GET_CACHE_NO_WAIT + GET_CACHE_NOW = GET_CACHE_NO_WAIT + GET_CACHE_WAIT - ctypedef enum ChannelRequestDataTypePolicyKind: - NATIVE_DATATYPE - LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype + ctypedef enum ChannelGetActionWhenMonitorPolicyKind: + GET_FROM_CACHE + GET_FROM_IOC - ctypedef enum ChannelWaitForResponsePolicyKind: - BLOCKING=0 - WAIT=BLOCKING - NON_BLOCKING=1 - NO_WAIT=NON_BLOCKING + ctypedef enum ChannelRequestPolicyKind: + WITHOUT_CALLBACK + WITH_CALLBACK_DEFAULT + WITH_CALLBACK_USER_SUPPLIED - ctypedef enum StatusMessageKind: - NO_MESSAGE - PRE_REQUEST - FROM_REQUEST - FROM_PEND - FROM_CALLBACK - FROM_MESSAGE - - ctypedef enum CallbackProgressKind: - NOT_INITIATED - PENDING - COMPLETE - + ctypedef enum ChannelRequestDataTypePolicyKind: + NATIVE_DATATYPE + LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype + + ctypedef enum ChannelWaitForResponsePolicyKind: + BLOCKING = 0 + WAIT = BLOCKING + NON_BLOCKING = 1 + NO_WAIT = NON_BLOCKING + + ctypedef enum StatusMessageKind: + NO_MESSAGE + PRE_REQUEST + FROM_REQUEST + FROM_PEND + FROM_CALLBACK + FROM_MESSAGE + + ctypedef enum CallbackProgressKind: + NOT_INITIATED + PENDING + COMPLETE -cdef extern from "exceptions.h": - ctypedef struct CAFEException_pv: - char pv [60] #PVNAME_SIZE - char pvAlias[60] #PVNAME_SIZE - unsigned int handle - CAFE_DATATYPE dataTypeNative - const char * dataTypeNativeText - int statusCode - const char * statusCodeText - const char * statusMessage - const char * source - unsigned int ln - pass +cdef extern from "exceptions.h": + ctypedef struct CAFEException_pv: + char pv[60] # PVNAME_SIZE + char pvAlias[60] # PVNAME_SIZE + unsigned int handle + CAFE_DATATYPE dataTypeNative + const char * dataTypeNativeText + int statusCode + const char * statusCodeText + const char * statusMessage + const char * source + unsigned int ln + pass - ctypedef struct CAFEException_group: - char groupName [60] #[PVNAME_SIZE]; - unsigned int groupHandle - int statusCode - const char * statusCodeText - const char * statusMessage - const char * source - unsigned int ln - pass + ctypedef struct CAFEException_group: + char groupName[60] # [PVNAME_SIZE]; + unsigned int groupHandle + int statusCode + const char * statusCodeText + const char * statusMessage + const char * source + unsigned int ln + pass + + cdef cppclass CAFEException_open: + CAFEException_pv pvEx + pass + const char * what() + + cdef cppclass CAFEException_groupOpen: + CAFEException_group groupEx + pass + const char * what() + +cdef extern from "channelRegalia.h": + cdef cppclass ChannelRegalia: + pass + oldChannelNotify * getChannelID() + bint getConnectFlag() + const char * getHostName() + string getHostNameAsString() + int getDataType() + const char * getClassName() + string getClassNameAsString() + unsigned short getAccessRead() + unsigned short getAccessWrite() + unsigned short getReadAccess() + unsigned short getWriteAccess() + unsigned int getNelem() + int getConnectionState() + int getCafeConnectionState() + string getConnectionStateAsString() + string getCafeConnectionStateAsString() + + cdef cppclass ChannelDataStore: + string description + ChannelRegalia info + PVDataHolder pvd + PVCtrlHolder pvc + pass - cdef cppclass CAFEException_open: - CAFEException_pv pvEx - pass - const char* what() - - cdef cppclass CAFEException_groupOpen: - CAFEException_group groupEx - pass - const char* what() - -cdef extern from "channelRegalia.h": - cdef cppclass ChannelRegalia: - pass - oldChannelNotify * getChannelID() - bint getConnectFlag() - const char * getHostName() - string getHostNameAsString() - int getDataType() - const char * getClassName() - string getClassNameAsString() - unsigned short getAccessRead() - unsigned short getAccessWrite() - unsigned short getReadAccess() - unsigned short getWriteAccess() - unsigned int getNelem() - int getConnectionState() - int getCafeConnectionState() - string getConnectionStateAsString() - string getCafeConnectionStateAsString() - - cdef cppclass ChannelDataStore: - string description - ChannelRegalia info - PVDataHolder pvd - PVCtrlHolder pvc - pass - cdef extern from "handleHelper.h": - - cdef cppclass HandleHelper: - etsDate _etsDate - etsNorm _etsNorm - - HandleHolder() - - int checkConsistency(unsigned int) - - vector[string] getEnumStrings(unsigned int) - string getStringFromEnum(unsigned int, unsigned short) - short getEnumFromString(unsigned int, string) - - const char * getPVFromHandle (unsigned int) - unsigned int getHandleFromPV(const char *) - unsigned int getGroupHandleFromGroupName(const char *) - unsigned int getHandleFromPVWithinGroup(const char *, unsigned int) - vector[unsigned int] getHandlesFromWithinGroupV(unsigned int) - int getChannelRegalia(unsigned int, ChannelRegalia) - - unsigned int getUsrArgsAsUInt(unsigned int) - chtype getDataTypeCB(unsigned int) - chtype getDbrDataTypeCB(unsigned int) - DBR_TYPE getCafeDbrTypeCB(unsigned int) - - int getDescription(unsigned int, string &) - int getUnits (unsigned int, string &) - int getPrecision (unsigned int, short &) - - - int getChannelDevice (unsigned int, string &) - int getChannelAttribute(unsigned int, string &) - - int getStatus (unsigned int) - bint hasAlarmStatusSeverity(unsigned int) - int getAlarmStatusSeverity(unsigned int, short[2]) - int [] getTimeStamp(unsigned int, epicsTimeStamp &ts) + cdef cppclass HandleHelper: + etsDate _etsDate + etsNorm _etsNorm - unsigned int setCafeDbrTypeV(vector[unsigned int], DBR_TYPE) - unsigned int setCafeDbrType(unsigned int, DBR_TYPE) - unsigned int getCafeDbrType(unsigned int, DBR_TYPE &) - unsigned int setNelem(unsigned int, unsigned int) - unsigned int setNelemToNative(unsigned int) - unsigned int setNelemToRetrieveFromCache (unsigned int, unsigned int) - unsigned int setNelemToRetrieveFromCtrlCache (unsigned int, unsigned int) - unsigned int getNelemToRetrieveFromCache (unsigned int) - unsigned int getNelemToRetrieveFromCtrlCache (unsigned int) + HandleHelper() - unsigned int setNelemCtrl (unsigned int, unsigned int); - unsigned int getNelemRequestCtrl (unsigned); - unsigned int getNelemClientCtrl (unsigned); + int addWidget(unsigned int, void * ) + int removeWidget(unsigned int, void *) + int getWidgets(unsigned int, vector[void *]) - unsigned int getNelemClient (unsigned int) - unsigned int getNelemNative (unsigned int) - unsigned int getNelemRequest (unsigned int) - - unsigned int getNmonitor (unsigned int) - vector[unsigned int] getMonitorIDs(unsigned int) + int setPyConnectCallbackFn(unsigned int, void *) - int getDataTypeNative (unsigned int, long &) - int getDataTypeRequest(unsigned int, long &) - - etsNorm getEpicsTimeStampAsUInt32(unsigned int) - etsDate getEpicsTimeStampAsDate(unsigned int) - etsDate epicsTimeStampToDate(epicsTimeStamp) - etsDate etsNormToDate(etsNorm) - etsDate unixTimeToDate(etsNorm) - string etsDateAsString(etsNorm) - - int printHandlesV(vector[unsigned int]) + int checkConsistency(unsigned int) - unsigned int getDisconnectedHandles (vector[unsigned int] &, vector[string] &) - unsigned int getHandles (vector[unsigned int] &, vector[string] &) - unsigned int getHandleStates (vector[unsigned int] &, vector[string] &, vector[unsigned short] &) - - int getMonitorPolicyVector(unsigned int, vector[MonitorPolicy] &); + ca_client_context getContextFromPV(const char *) + ca_client_context getContextFromHandle(unsigned int) + + vector[string] getEnumStrings(unsigned int) + string getStringFromEnum(unsigned int, unsigned short) + short getEnumFromString(unsigned int, string) + + const char * getPVFromHandle(unsigned int) + unsigned int getHandleFromPV(const char *) + unsigned int getGroupHandleFromGroupName(const char *) + unsigned int getHandleFromPVWithinGroup(const char *, unsigned int) + vector[unsigned int] getHandlesFromWithinGroupV(unsigned int) + int getChannelRegalia(unsigned int, ChannelRegalia) + + unsigned int getUsrArgsAsUInt(unsigned int) + chtype getDataTypeCB(unsigned int) + chtype getDbrDataTypeCB(unsigned int) + DBR_TYPE getCafeDbrTypeCB(unsigned int) + + bint hasDescription(unsigned int) + int getDescription(unsigned int, string &) + int getUnits (unsigned int, string &) + int getPrecision (unsigned int, short &) + + int getChannelDevice (unsigned int, string &) + int getChannelAttribute(unsigned int, string &) + + int getStatus(unsigned int) + bint hasAlarmStatusSeverity(unsigned int) + int getAlarmStatusSeverity(unsigned int, short[2]) + int[] getTimeStamp(unsigned int, epicsTimeStamp & ts) + + unsigned int setCafeDbrTypeV(vector[unsigned int], DBR_TYPE) + unsigned int setCafeDbrType(unsigned int, DBR_TYPE) + unsigned int getCafeDbrType(unsigned int, DBR_TYPE &) + unsigned int setNelem(unsigned int, unsigned int) + unsigned int setNelemToNative(unsigned int) + unsigned int setNelemToRetrieveFromCache(unsigned int, unsigned int) + unsigned int setNelemToRetrieveFromCtrlCache(unsigned int, unsigned int) + unsigned int getNelemToRetrieveFromCache(unsigned int) + unsigned int getNelemToRetrieveFromCtrlCache(unsigned int) + + unsigned int setNelemCtrl(unsigned int, unsigned int) + unsigned int getNelemRequestCtrl(unsigned) + unsigned int getNelemClientCtrl(unsigned) + + unsigned int getNelemClient(unsigned int) + unsigned int getNelemNative(unsigned int) + unsigned int getNelemRequest(unsigned int) + + unsigned int getNmonitor(unsigned int) + vector[unsigned int] getMonitorIDs(unsigned int) + + int getDataTypeNative (unsigned int, long &) + int getDataTypeRequest(unsigned int, long &) + + etsNorm getEpicsTimeStampAsUInt32(unsigned int) + etsDate getEpicsTimeStampAsDate(unsigned int) + etsDate epicsTimeStampToDate(epicsTimeStamp) + etsDate etsNormToDate(etsNorm) + etsDate unixTimeToDate(etsNorm) + string etsDateAsString(etsNorm) + + int printHandlesV(vector[unsigned int]) + + unsigned int getDisconnectedHandles (vector[unsigned int] & , vector[string] & ) + unsigned int getHandles (vector[unsigned int] & , vector[string] & ) + unsigned int getHandleStates (vector[unsigned int] &, vector[string] & , vector[unsigned short] & ) + + int getMonitorPolicyVector(unsigned int, vector[MonitorPolicy] & ) cdef extern from "policies.h": - - ctypedef void (*pCallback) (event_handler_args) - - cdef cppclass MonitorPolicy: - - MonitorPolicy() - unsigned int getMonitorID() - void setMask(unsigned int) - void setDataType(chtype) - void setCafeDbrType(DBR_TYPE) - void setHandler(pCallback) - void setDefaultHandler() - void setPyHandler() - void setPyHandlerData() - void setUserArgs(void *) - unsigned int getMask() - unsigned int getNelem() - unsigned int getUserArgs() - DBR_TYPE getCafeDbrType() - unsigned int getDataType() - unsigned int getDbrDataType() - bint maskHasDBE_PROPERTY() - bint maskHasDBE_VALUE() - bint maskHasDBE_LOG() - bint maskHasDBE_ALARM() - - cdef cppclass ChannelOpenPolicy: - ChannelOpenPolicy() - void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind) - ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() - void setFlushSendBufferKind(ChannelFlushSendBufferPolicyKind) - void flushSendBufferNow() - double setTimeout(double) - double getTimeout() - double setDefaultTimeout(double) - double getDefaultTimeout() - double setTimeoutToDefault() - cdef cppclass ChannelRequestPolicy: - ChannelRequestPolicy() - ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() - ChannelWaitForResponsePolicyKind getWaitKind() - ChannelRequestPolicyKind getMethodKind() - pCallback getHandler() - int getCallbackStatus() - void setHandler(pCallback h) - void setPyHandlerGet() - void setPyHandlerPut() - void setMethodKind(ChannelRequestPolicyKind) - void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind) - void setWaitKind(ChannelWaitForResponsePolicyKind) - void setCallbackStatus (int) - void setPolicy(ChannelWhenToFlushSendBufferPolicyKind,ChannelWaitForResponsePolicyKind,ChannelRequestPolicyKind) + ctypedef void(*pCallback)(event_handler_args) - cdef cppclass ChannelRequestDataTypePolicy: - ChannelRequestDataTypePolicy() - ChannelRequestDataTypePolicy(ChannelRequestDataTypePolicyKind) - ChannelRequestDataTypePolicyKind requestKind - void setRequestKind(ChannelRequestDataTypePolicyKind) - ChannelRequestDataTypePolicyKind getRequestKind() - + cdef cppclass MonitorPolicy: - cdef cppclass ChannelTimeoutPolicy: - ChannelTimeoutPolicy() - bint getSelfGoverningTimeout() - void setSelfGoverningTimeout(bool) - double getTimeout() - double getDeltaTimeout() - unsigned short getNtries() - double setTimeout(double) - double setDeltaTimeout(double) - unsigned short setNtries(unsigned short) + MonitorPolicy() + unsigned int getMonitorID() + void setMask(unsigned int) + void setDataType(chtype) + void setCafeDbrType(DBR_TYPE) + void setHandler(pCallback) + void setDefaultHandler() + void setNotifyDeltaMilliSeconds(unsigned short) + void setCyCallback(void *) + void setPyHandler() + void setPyHandlerData() + void setPyCyHandler(void *) + void setPyCyHandlerData(void *) + void setUserArgs(void *) + unsigned int getMask() + unsigned int getNelem() + unsigned short getNotifyDeltaMilliSeconds() + unsigned int getUserArgs() + DBR_TYPE getCafeDbrType() + unsigned int getDataType() + unsigned int getDbrDataType() + bint maskHasDBE_PROPERTY() + bint maskHasDBE_VALUE() + bint maskHasDBE_LOG() + bint maskHasDBE_ALARM() - - cdef cppclass ChannelGetCacheWaitPolicy: - ChannelGetCacheWaitPolicy() - ChannelGetCacheWaitPolicy(ChannelGetCacheWaitPolicyKind) - ChannelGetCacheWaitPolicyKind whenKind - void setWaitKind(ChannelGetCacheWaitPolicyKind) - ChannelGetCacheWaitPolicyKind getWhenKind() + cdef cppclass ChannelCreatePolicy: + ChannelCreatePolicy() + void setPyCallbackFlag(bint) + bint getPyCallbackFlag() + void setPyConnectHandler(void *) + void * getPyConnectHandler() - cdef cppclass ChannelGetActionWhenMonitorPolicy: - ChannelGetActionWhenMonitorPolicy() - ChannelGetActionWhenMonitorPolicy(ChannelGetActionWhenMonitorPolicyKind) - ChannelGetActionWhenMonitorPolicyKind actionKind - void setActionKind(ChannelGetActionWhenMonitorPolicyKind) - ChannelGetActionWhenMonitorPolicyKind getActionKind() + cdef cppclass ChannelOpenPolicy: + ChannelOpenPolicy() + void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind) + ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() + void setFlushSendBufferKind(ChannelFlushSendBufferPolicyKind) + void flushSendBufferNow() + double setTimeout(double) + double getTimeout() + double setDefaultTimeout(double) + double getDefaultTimeout() + double setTimeoutToDefault() + + cdef cppclass ChannelRequestPolicy: + ChannelRequestPolicy() + ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() + ChannelWaitForResponsePolicyKind getWaitKind() + ChannelRequestPolicyKind getMethodKind() + pCallback getHandler() + int getCallbackStatus() + void setHandler(pCallback h) + void setPyHandlerGet() + void setPyHandlerPut() + void setMethodKind(ChannelRequestPolicyKind) + void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind) + void setWaitKind(ChannelWaitForResponsePolicyKind) + void setCallbackStatus(int) + void setPolicy(ChannelWhenToFlushSendBufferPolicyKind, ChannelWaitForResponsePolicyKind, ChannelRequestPolicyKind) + + cdef cppclass ChannelRequestDataTypePolicy: + ChannelRequestDataTypePolicy() + ChannelRequestDataTypePolicy(ChannelRequestDataTypePolicyKind) + ChannelRequestDataTypePolicyKind requestKind + void setRequestKind(ChannelRequestDataTypePolicyKind) + ChannelRequestDataTypePolicyKind getRequestKind() + + cdef cppclass ChannelTimeoutPolicy: + ChannelTimeoutPolicy() + bint getSelfGoverningTimeout() + void setSelfGoverningTimeout(bool) + double getTimeout() + double getDeltaTimeout() + unsigned short getNtries() + double setTimeout(double) + double setDeltaTimeout(double) + unsigned short setNtries(unsigned short) + + cdef cppclass ChannelGetCacheWaitPolicy: + ChannelGetCacheWaitPolicy() + ChannelGetCacheWaitPolicy(ChannelGetCacheWaitPolicyKind) + ChannelGetCacheWaitPolicyKind whenKind + void setWaitKind(ChannelGetCacheWaitPolicyKind) + ChannelGetCacheWaitPolicyKind getWhenKind() + + cdef cppclass ChannelGetActionWhenMonitorPolicy: + ChannelGetActionWhenMonitorPolicy() + ChannelGetActionWhenMonitorPolicy( + ChannelGetActionWhenMonitorPolicyKind) + ChannelGetActionWhenMonitorPolicyKind actionKind + void setActionKind(ChannelGetActionWhenMonitorPolicyKind) + ChannelGetActionWhenMonitorPolicyKind getActionKind() cdef extern from "policyHelper.h": - cdef cppclass PolicyHelper: - - int getChannelGetCacheWaitPolicy (unsigned int, ChannelGetCacheWaitPolicy &) - int setChannelGetCacheWaitPolicy (unsigned int, ChannelGetCacheWaitPolicy) - int setChannelGetCacheWaitPolicyAllHandles (ChannelGetCacheWaitPolicy) - int getChannelGetActionWhenMonitorPolicy(unsigned int, ChannelGetActionWhenMonitorPolicy &) - int setChannelGetActionWhenMonitorPolicy(unsigned int, ChannelGetActionWhenMonitorPolicy ) - int setChannelGetActionWhenMonitorPolicyAllHandles (ChannelGetActionWhenMonitorPolicy) - - int getChannelRequestDataTypePolicy(unsigned int, ChannelRequestDataTypePolicy &) - int setChannelRequestDataTypePolicy(unsigned int, ChannelRequestDataTypePolicy) - int setChannelRequestDataTypePolicyAllHandles(ChannelRequestDataTypePolicy) + cdef cppclass PolicyHelper: - int getChannelRequestPolicyGet (unsigned int , ChannelRequestPolicy &) - int setChannelRequestPolicyGet (unsigned int , ChannelRequestPolicy) - int setChannelRequestPolicyGetAllHandles (ChannelRequestPolicy) - - int getChannelRequestPolicyPut (unsigned int, ChannelRequestPolicy &) - int setChannelRequestPolicyPut (unsigned int , ChannelRequestPolicy) - int setChannelRequestPolicyPutAllHandles (ChannelRequestPolicy) + int getChannelGetCacheWaitPolicy (unsigned int, ChannelGetCacheWaitPolicy &) + int setChannelGetCacheWaitPolicy(unsigned int, ChannelGetCacheWaitPolicy) + int setChannelGetCacheWaitPolicyAllHandles(ChannelGetCacheWaitPolicy) + int getChannelGetActionWhenMonitorPolicy(unsigned int, ChannelGetActionWhenMonitorPolicy &) + int setChannelGetActionWhenMonitorPolicy(unsigned int, ChannelGetActionWhenMonitorPolicy) + int setChannelGetActionWhenMonitorPolicyAllHandles(ChannelGetActionWhenMonitorPolicy) - int getChannelTimeoutPolicyGet (unsigned int, ChannelTimeoutPolicy &) - int setChannelTimeoutPolicyGet (unsigned int, ChannelTimeoutPolicy) + int getChannelRequestDataTypePolicy(unsigned int, ChannelRequestDataTypePolicy &) + int setChannelRequestDataTypePolicy(unsigned int, ChannelRequestDataTypePolicy) + int setChannelRequestDataTypePolicyAllHandles(ChannelRequestDataTypePolicy) - int getChannelTimeoutPolicyPut (unsigned int, ChannelTimeoutPolicy &) - int setChannelTimeoutPolicyPut (unsigned int, ChannelTimeoutPolicy) - - int getTimeout(unsigned int, double &) - int getTimeout(unsigned int, double &, double &) - int getTimeoutMin(double &, double &) - int getTimeoutMax(double &, double &) - int setTimeout(unsigned int, double) - int setTimeout(unsigned int, double, double) - int setTimeout(double) - int setTimeout(double, double) - int setSelfGoverningTimeout(bint) - int getSGTimeout (unsigned int, double &, double &) - int getSGTimeout (unsigned int, double &) - int getSGTimeoutMin (double, double &) - int getSGTimeoutMax (double, double &) - int setSGTimeout (unsigned int, double, double) - int setSGTimeout (unsigned int, double) - int setSGTimeout (double, double) - int setSGTimeout (double) - int setSGSelfGoverningTimeout(bint) + int getChannelRequestPolicyGet (unsigned int, ChannelRequestPolicy & ) + int setChannelRequestPolicyGet(unsigned int, ChannelRequestPolicy) + int setChannelRequestPolicyGetAllHandles(ChannelRequestPolicy) -#cdef extern from "hashConduit.h": + int getChannelRequestPolicyPut (unsigned int, ChannelRequestPolicy &) + int setChannelRequestPolicyPut(unsigned int, ChannelRequestPolicy) + int setChannelRequestPolicyPutAllHandles(ChannelRequestPolicy) + + int getChannelTimeoutPolicyGet (unsigned int, ChannelTimeoutPolicy &) + int setChannelTimeoutPolicyGet(unsigned int, ChannelTimeoutPolicy) + + int getChannelTimeoutPolicyPut (unsigned int, ChannelTimeoutPolicy &) + int setChannelTimeoutPolicyPut(unsigned int, ChannelTimeoutPolicy) + + int getTimeout(unsigned int, double &) + int getTimeout(unsigned int, double & , double & ) + int getTimeoutMin(double & , double & ) + int getTimeoutMax(double & , double & ) + int setTimeout(unsigned int, double) + int setTimeout(unsigned int, double, double) + int setTimeout(double) + int setTimeout(double, double) + int setSelfGoverningTimeout(bint) + int getSGTimeout (unsigned int, double &, double & ) + int getSGTimeout (unsigned int, double &) + int getSGTimeoutMin (double, double &) + int getSGTimeoutMax (double, double & ) + int setSGTimeout(unsigned int, double, double) + int setSGTimeout(unsigned int, double) + int setSGTimeout(double, double) + int setSGTimeout(double) + int setSGSelfGoverningTimeout(bint) + +# cdef extern from "hashConduit.h": # ctypedef multi_index_container<> cafeConduit_set # ctypedef cafeConduit_set cafeConduit_set_by_handle # ctypedef multi_index_container.iterator it_handle cdef extern from "statusCodes.h": - cdef int ICAFE_STATUS_BASE = 600 - cdef int ICAFE_STATUS_CS = ICAFE_STATUS_BASE - cdef int ICAFE_STATUS_CFT = 700 - cdef int ICAFE_STATUS_CA_OP = 800 - cdef int ICAFE_STATUS_ERROR = 1000 - cdef int ICAFE_FILE_ERROR = 1100 - cdef int ICAFE_SERVICE_ERROR =1200; - cdef int ICAFE_BITSHUFFLE_ERROR =1300; - cdef int ICAFE_BSREAD_BASE = 1500; - cdef int ICAFE_ERRNO_BASE = 5000; - cdef int ICAFE_SUCCESS = ECA_NORMAL - cdef int ICAFE_NORMAL = ECA_NORMAL + cdef int ICAFE_STATUS_BASE = 600 + cdef int ICAFE_STATUS_CS = ICAFE_STATUS_BASE + cdef int ICAFE_STATUS_CFT = 700 + cdef int ICAFE_STATUS_CA_OP = 800 + cdef int ICAFE_STATUS_DAQ = 900 + cdef int ICAFE_STATUS_ERROR = 1000 + cdef int ICAFE_FILE_ERROR = 1100 + cdef int ICAFE_SERVICE_ERROR = 1200 + cdef int ICAFE_BITSHUFFLE_ERROR = 1300 + cdef int ICAFE_BSREAD_BASE = 1500 + cdef int ICAFE_ERRNO_BASE = 5000 + cdef int ICAFE_SUCCESS = ECA_NORMAL + cdef int ICAFE_NORMAL = ECA_NORMAL - ctypedef enum CAFE_CS_STATE: - ICAFE_CS_NEVER_CONN=600 - ICAFE_CS_PREV_CONN - ICAFE_CS_CONN - ICAFE_CS_CLOSED - ICAFE_CS_DISCONN - ICAFE_CS_UNKNOWN - - ctypedef enum CAFE_CFT_STATE: - ICAFE_TYPENOTCONN=700 - ICAFE_RULE_FALSE - ICAFE_BADCOUNT - ICAFE_CALLBACK_NOT_YET_INVOKED - ICAFE_WAITING_FOR_PREV_CALLBACK - ICAFE_CACHE_EMPTY - ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT - ICAFE_MONITOR_DELAYED_AS_CONN_DOWN - ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE - ICAFE_SET_AND_GET_MISMATCH - - ctypedef enum CAFE_CC_STATE: - ICAFE_CA_OP_GET=800 - ICAFE_CA_OP_PUT - ICAFE_CA_OP_CREATE_CHANNEL - ICAFE_CA_OP_ADD_EVENT - ICAFE_CA_OP_CLEAR_EVENT - ICAFE_CA_OP_OTHER - ICAFE_CA_OP_CONN_UP - ICAFE_CA_OP_CONN_DOWN - - ctypedef enum CAFE_FILE_ERROR: - ECAFE_LOAD_COLLECTION=1100 - ECAFE_LOAD_GROUP - - ctypedef enum CAFE_ERROR_STATE: - ECAFE_NODATA=1000 - ECAFE_INVALID_TYPE - ECAFE_BADCOUNT - ECAFE_BADSTR - ECAFE_BADTYPE - ECAFE_NO_CONVERT - ECAFE_NULLCONTEXT - ECAFE_NULLCHID - ECAFE_NULLEVID - ECAFE_UNKNOWN_COLLECTION - ECAFE_EMPTY_COLLECTION - ECAFE_COLLECTION_PREV_DEF - ECAFE_COLLECTION_INVALID_MEMBER - ECAFE_RULE_FALSE - ECAFE_UNKNOWN_GROUP - ECAFE_EMPTY_GROUP - ECAFE_GROUP_PREV_DEF - ECAFE_INVALID_HANDLE - ECAFE_INVALID_GROUP_HANDLE - ECAFE_NORDACCESS - ECAFE_NOWTACCESS - ECAFE_TIMEOUT - ECAFE_CANNOT_OPEN_FILE - ECAFE_INVALID_SWITCH_CASE - ECAFE_PVALIAS_PREV_DEF - ECAFE_PVALIAS_INVALID - ECAFE_PVNAME_PREV_DEF_AS_PVALIAS - ECAFE_DEVICE_ATTRIB_NOT_FOUND - ECAFE_HASH_UNIQUEID_EXISTS - ECAFE_WRONG_CA_CONTEXT - ECAFE_INVALID_CAFENUM_POLICY_TYPE - ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED - ECAFE_INVALID_ENUM_INDEX - ECAFE_PVGROUP_GROUPHANDLE_MISMATCH - ECAFE_TIMEOUT_SET_AND_MATCH - ECAFE_HANDLE_MISMATCH_SET_AND_MATCH - ECAFE_INCONSISTENT_CONTAINER_CORRECTED - - ctypedef enum CAFE_SERVICE_ERROR: - ECAFE_BPM_DATA_IS_INVALID=1200 - - ctypedef enum CAFE_BITSHUFFLE_ERROR: - ECAFE_BITSHUFF_DECOMPRESS=1300 - ECAFE_BITSHUFF_ALLOCMEM - ECAFE_BITSHUFF_REALLOCMEM - ECAFE_BITSHUFF_BADCOUNT - - ctypedef enum CAFE_BSREAD_ERROR: - ECAFE_BSREAD_MULTIPART_MESS_NODATA=1500 - ECAFE_BSREAD_PARSEFAIL_MAINHEADER - ECAFE_BSREAD_PARSEFAIL_DATAHEADER - ECAFE_BSREAD_ZMQSTREAM_NULL - - ctypedef enum CAFE_ERRNO_ERROR: - ERRNO_EINTR=5004 - ERRNO_EAGAIN=5011 - ERRNO_EFAULT=5014 - ERRNO_EINVAL=5022 - ERRNO_ENOTSOCK=5088 - ERRNO_EPROTONOSUPPORT=5093 - - ctypedef enum EPICS_GLOBAL_ALARM_SEVERITY: - SEV_NO_ALARM=0 - SEV_MINOR - SEV_MAJOR - SEV_INVALID - - ctypedef enum EPICS_GLOBAL_ALARM_CONDITION: - STAT_NO_ALARM=0 - STAT_READ - STAT_WRITE - STAT_HIHI - STAT_HIGH - STAT_LOLO - STAT_LOW - STAT_STATE - STAT_COS - STAT_COMM - STAT_TIMEOUT - STAT_HWLIMIT - STAT_CALC - STAT_SCAN - STAT_LINK - STAT_SOFT - STAT_BAD_SUB - STAT_UDF - STAT_DISABLE - STAT_SIMM - STAT_READ_ACCESS - STAT_WRITE_ACCESS - - - cdef cppclass CAFEStatusSeverity: - CAFEStatusSeverity() - string message (int) + ctypedef enum CAFE_CS_STATE: + ICAFE_CS_NEVER_CONN = 600 + ICAFE_CS_PREV_CONN + ICAFE_CS_CONN + ICAFE_CS_CLOSED + ICAFE_CS_DISCONN + ICAFE_CS_UNKNOWN - cdef cppclass CAFEStatusInfo: - CAFEStatusInfo() - string message (int) + ctypedef enum CAFE_CFT_STATE: + ICAFE_TYPENOTCONN = 700 + ICAFE_RULE_FALSE + ICAFE_BADCOUNT + ICAFE_CALLBACK_NOT_YET_INVOKED + ICAFE_WAITING_FOR_PREV_CALLBACK + ICAFE_CACHE_EMPTY + ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + ICAFE_SET_AND_GET_MISMATCH - cdef cppclass CAFEStatusCode: - CAFEStatusCode() - void getStates(vector[int], vector[string]) - string message (int) - string msgIDAsString(int) - int enumIs(string) - bint isTimeout(int) - void printAll() - - cdef cppclass CAFEStatus: - CAFEStatus() - string severity(int) - string asString(int) - string msgID(int) - string code(int) - string info(int) - string message(int) - bint isTimeout(int) - void report(int) + ctypedef enum CAFE_CC_STATE: + ICAFE_CA_OP_GET = 800 + ICAFE_CA_OP_PUT + ICAFE_CA_OP_CREATE_CHANNEL + ICAFE_CA_OP_ADD_EVENT + ICAFE_CA_OP_CLEAR_EVENT + ICAFE_CA_OP_OTHER + ICAFE_CA_OP_CONN_UP + ICAFE_CA_OP_CONN_DOWN + ctypedef enum CAFE_STATUS_DAQ: + ICAFE_DAQ_RUN = 900 + ICAFE_DAQ_PAUSED + ICAFE_DAQ_STOPPED + + ctypedef enum CAFE_FILE_ERROR: + ECAFE_LOAD_COLLECTION = 1100 + ECAFE_LOAD_GROUP + + ctypedef enum CAFE_ERROR_STATE: + ECAFE_NODATA = 1000 + ECAFE_INVALID_TYPE + ECAFE_BADCOUNT + ECAFE_BADSTR + ECAFE_BADTYPE + ECAFE_NO_CONVERT + ECAFE_NULLCONTEXT + ECAFE_NULLCHID + ECAFE_NULLEVID + ECAFE_UNKNOWN_COLLECTION + ECAFE_EMPTY_COLLECTION + ECAFE_COLLECTION_PREV_DEF + ECAFE_COLLECTION_INVALID_MEMBER + ECAFE_RULE_FALSE + ECAFE_UNKNOWN_GROUP + ECAFE_EMPTY_GROUP + ECAFE_GROUP_PREV_DEF + ECAFE_INVALID_HANDLE + ECAFE_INVALID_GROUP_HANDLE + ECAFE_NORDACCESS + ECAFE_NOWTACCESS + ECAFE_TIMEOUT + ECAFE_CANNOT_OPEN_FILE + ECAFE_INVALID_SWITCH_CASE + ECAFE_PVALIAS_PREV_DEF + ECAFE_PVALIAS_INVALID + ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + ECAFE_DEVICE_ATTRIB_NOT_FOUND + ECAFE_HASH_UNIQUEID_EXISTS + ECAFE_WRONG_CA_CONTEXT + ECAFE_INVALID_CAFENUM_POLICY_TYPE + ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + ECAFE_INVALID_ENUM_INDEX + ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + ECAFE_TIMEOUT_SET_AND_MATCH + ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + ECAFE_INCONSISTENT_CONTAINER_CORRECTED + + ctypedef enum CAFE_SERVICE_ERROR: + ECAFE_BPM_DATA_IS_INVALID = 1200 + + ctypedef enum CAFE_BITSHUFFLE_ERROR: + ECAFE_BITSHUFF_DECOMPRESS = 1300 + ECAFE_BITSHUFF_ALLOCMEM + ECAFE_BITSHUFF_REALLOCMEM + ECAFE_BITSHUFF_BADCOUNT + + ctypedef enum CAFE_BSREAD_ERROR: + ECAFE_BSREAD_MULTIPART_MESS_NODATA = 1500 + ECAFE_BSREAD_PARSEFAIL_MAINHEADER + ECAFE_BSREAD_PARSEFAIL_DATAHEADER + ECAFE_BSREAD_ZMQSTREAM_NULL + + ctypedef enum CAFE_ERRNO_ERROR: + ERRNO_EINTR = 5004 + ERRNO_EAGAIN = 5011 + ERRNO_EFAULT = 5014 + ERRNO_EINVAL = 5022 + ERRNO_ENOTSOCK = 5088 + ERRNO_EPROTONOSUPPORT = 5093 + + ctypedef enum EPICS_GLOBAL_ALARM_SEVERITY: + SEV_NO_ALARM = 0 + SEV_MINOR + SEV_MAJOR + SEV_INVALID + + ctypedef enum EPICS_GLOBAL_ALARM_CONDITION: + STAT_NO_ALARM = 0 + STAT_READ + STAT_WRITE + STAT_HIHI + STAT_HIGH + STAT_LOLO + STAT_LOW + STAT_STATE + STAT_COS + STAT_COMM + STAT_TIMEOUT + STAT_HWLIMIT + STAT_CALC + STAT_SCAN + STAT_LINK + STAT_SOFT + STAT_BAD_SUB + STAT_UDF + STAT_DISABLE + STAT_SIMM + STAT_READ_ACCESS + STAT_WRITE_ACCESS + + cdef cppclass CAFEStatusSeverity: + CAFEStatusSeverity() + string message(int) + + cdef cppclass CAFEStatusInfo: + CAFEStatusInfo() + string message(int) + + cdef cppclass CAFEStatusCode: + CAFEStatusCode() + void getStates(vector[int], vector[string]) + string message(int) + string msgIDAsString(int) + int enumIs(string) + bint isTimeout(int) + void printAll() + + cdef cppclass CAFEStatus: + CAFEStatus() + string severity(int) + string asString(int) + string msgID(int) + string code(int) + string info(int) + string message(int) + bint isTimeout(int) + void report(int) + + +cdef extern from "zbsDataHolders.h": + + cdef cppclass BSChannel: + BSChannel(string) except + + void setType() + void setOffset() + void setModulo() + void setBSEnabled() + string getName() + string getType() + int getModulo() + int getOffset() + unsigned int getNelem() + bint isBSEnabled() + + cdef cppclass BSDataHolder: + BSDataHolder() except + + BSDataHolder(vector[string]) except + + void init(vector[string]) + BSChannel getBSChannel(unsigned int) + int getIdxFromName(string) + etsNorm getGlobal_timestamp() + unsigned long long getPulse_id() + vector[unsigned int] getHandles() + vector[string] getPV() + vector[PVDataHolder] getPVDataV() + vector[string] getAsStringV() + vector[double] getAsDoubleV() + vector[float] getAsFloatV() + vector[int] getAsIntV() + int reconnect() + void closeBS() + int resetBS() + int setBS(bint) + int setCA(bint) + void setTimeout(int) + void setHWM(int) + bint getIsBS() + void setBSModulo(string, int) + void setBSOffset(string, int) + void setBSModuloOffset(string, int, int) + void printHeader() + unsigned int getNPV() + unsigned int getHWM() + int getTimeout() + unsigned int getNChannels() + unsigned int getNNullData() + float getPGoodData() + void zero() + int getStatus() + + cdef cppclass DBPMData: + double getValue() + epicsTimeStamp getEpicsTimeStamp() + int getStatus() + + cdef cppclass DBPMKeeper: + DBPMKeeper() except + + # DBPMKeeper(vector[string], vector[unsigned int], multimap[float, string]) + DBPMKeeper(vector[string], vector[unsigned int], vector[string], vector[float]) except + + vector[unsigned int] getHandle() + vector[string] getPV() + vector[string] getDevice() + + vector[double] getS() + vector[DBPMData] getX() + vector[DBPMData] getY() + vector[DBPMData] getQ() + vector[DBPMData] getEnergy() + + vector[double] getOffsetX() + vector[double] getOffsetY() + + bint getIsAllXOK() + bint getIsAllYOK() + bint getIsAllQOK() + bint getIsAllEnergyOK() + bint getIsAllOK() + bint setBS(bint) + bint resetBS() + void closeBS() + int getStatus() + PVDataHolder * pvd + int getNPV() cdef extern from "PVDataHolder.h": - - cdef cppclass PVDataHolder: - etsDate _etsDate - etsNorm _etsNorm - - PVDataHolder() except + - PVDataHolder(unsigned int) except + - #shared_ptr [CAFE_DATATYPE_UNION []] val; - #shared_ptr[double []] getDouble() - #shared_ptr[float []] getFloat() - #shared_ptr[int []] getInt() - #shared_ptr[string []] getString() - - #shared_ptr[vector [double]] getAsVDouble() - #shared_ptr[vector [float]] getAsVFloat() - #shared_ptr[vector [int]] getAsVInt() - #shared_ptr[vector [string]] getAsVString() - - char * getAsDbr_string_t() - char * getAsDbr_string_t(unsigned int) - string getAsString() - string getAsString(unsigned int) - double getAsDouble() - double getAsDouble(unsigned int) - float getAsFloat() - float getAsFloat(unsigned int) - short getAsShort() - short getAsShort(unsigned int) - unsigned short getAsUShort() - unsigned short getAsUShort(unsigned int) - unsigned char getAsChar() - unsigned char getAsChar(unsigned int) - int getAsLong() - int getAsLong(unsigned int) - int getAsLongLong() - int getAsLongLong(unsigned int) - - string getWFAsString() - string concatToString() - - unsigned long long getPulseID() - - unsigned int getUserNo() - - unsigned int getNelem() - int setNelem(unsigned int) - void setRule(bint) - bint getRule() - void setHasAlarm(bint) - void setHasTS(bint) - bint getHasAlarm() - bint getHasTS() - - int setString(string) - int setDouble(double) - int setInt(int) - int setVString(vector[string]) - int setVDouble(vector[double]) - int setVInt(vector[int]) - int getAlarmStatus() - int getAlarmSeverity() - string getAlarmStatusAsString() - string getAlarmSeverityAsString() - int getStatus() - string getStatusAsString() - - etsNorm getEpicsTimeStampAsUInt32() - etsDate getEpicsTimeStampAsDate() - etsDate getUnixTimeAsDate(etsNorm) - string getEpicsTimeStampAsString() - string getBSTimeStampAsString() + cdef cppclass PVDataHolder: + etsDate _etsDate + etsNorm _etsNorm - unsigned int getDataType() - char * getPV() - char * getPVName() - void valReset() + PVDataHolder() except + + PVDataHolder(unsigned int) except + + # shared_ptr [CAFE_DATATYPE_UNION []] val; + # shared_ptr[double []] getDouble() + # shared_ptr[float []] getFloat() + # shared_ptr[int []] getInt() + # shared_ptr[string []] getString() + + # shared_ptr[vector [double]] getAsVDouble() + # shared_ptr[vector [float]] getAsVFloat() + # shared_ptr[vector [int]] getAsVInt() + # shared_ptr[vector [string]] getAsVString() + + char * getAsDbr_string_t() + char * getAsDbr_string_t(unsigned int) + string getAsString() + string getAsString(unsigned int) + double getAsDouble() + double getAsDouble(unsigned int) + float getAsFloat() + float getAsFloat(unsigned int) + short getAsShort() + short getAsShort(unsigned int) + unsigned short getAsUShort() + unsigned short getAsUShort(unsigned int) + unsigned char getAsChar() + unsigned char getAsChar(unsigned int) + int getAsLong() + int getAsLong(unsigned int) + int getAsLongLong() + int getAsLongLong(unsigned int) + + string getWFAsString() + string concatToString() + + unsigned long long getPulseID() + + unsigned int getUserNo() + + unsigned int getNelem() + int setNelem(unsigned int) + void setRule(bint) + bint getRule() + void setHasAlarm(bint) + void setHasTS(bint) + bint getHasAlarm() + bint getHasTS() + + int setString(string) + int setDouble(double) + int setInt(int) + int setVString(vector[string]) + int setVDouble(vector[double]) + int setVInt(vector[int]) + + int getAlarmStatus() + int getAlarmSeverity() + string getAlarmStatusAsString() + string getAlarmSeverityAsString() + int getStatus() + string getStatusAsString() + + etsNorm getEpicsTimeStampAsUInt32() + etsDate getEpicsTimeStampAsDate() + etsDate getUnixTimeAsDate(etsNorm) + string getEpicsTimeStampAsString() + string getBSTimeStampAsString() + + unsigned int getDataType() + char * getPV() + char * getPVName() + void valReset() cdef extern from "PVCtrlHolder.h": - - cdef cppclass PVCtrlHolder: - - PVCtrlHolder() except + - PVCtrlHolder(unsigned int) except + - - short getPrecision() - const char * getUnits() - string getUnitsAsString() - short getNoEnumStrings() - vector[string] getEnumStrings() - double getUpperDispLimit_AsDouble() - double getLowerDispLimit_AsDouble() - double getUpperAlarmLimit_AsDouble() - double getUpperWarningLimit_AsDouble() - double getLowerWarningLimit_AsDouble() - double getLowerAlarmLimit_AsDouble() - double getUpperCtrlLimit_AsDouble() - double getLowerCtrlLimit_AsDouble() - - float getFloat(unsigned int) - - string getAsString() - string getAsString(unsigned int) - - char* getAsDbr_string_t() - char* getAsDbr_string_t(unsigned int) - double getAsDouble() - double getAsDouble(unsigned int) - float getAsFloat() - float getAsFloat(unsigned int) - short getAsShort() - short getAsShort(unsigned int) - unsigned short getAsUShort() - unsigned short getAsUShort(unsigned int) - unsigned char getAsChar() - unsigned char getAsChar(unsigned int) - int getAsLong() - int getAsLong(unsigned int) - int getAsLongLong() - int getAsLongLong(unsigned int) - - unsigned int getNelem() - int setNelem(unsigned int) - - int getAlarmStatus() - int getAlarmSeverity() - int getStatus() - - unsigned int getDataType() + + cdef cppclass PVCtrlHolder: + + PVCtrlHolder() except + + PVCtrlHolder(unsigned int) except + + + short getPrecision() + const char * getUnits() + string getUnitsAsString() + short getNoEnumStrings() + vector[string] getEnumStrings() + double getUpperDispLimit_AsDouble() + double getLowerDispLimit_AsDouble() + double getUpperAlarmLimit_AsDouble() + double getUpperWarningLimit_AsDouble() + double getLowerWarningLimit_AsDouble() + double getLowerAlarmLimit_AsDouble() + double getUpperCtrlLimit_AsDouble() + double getLowerCtrlLimit_AsDouble() + + float getFloat(unsigned int) + + string getAsString() + string getAsString(unsigned int) + + char * getAsDbr_string_t() + char * getAsDbr_string_t(unsigned int) + double getAsDouble() + double getAsDouble(unsigned int) + float getAsFloat() + float getAsFloat(unsigned int) + short getAsShort() + short getAsShort(unsigned int) + unsigned short getAsUShort() + unsigned short getAsUShort(unsigned int) + unsigned char getAsChar() + unsigned char getAsChar(unsigned int) + int getAsLong() + int getAsLong(unsigned int) + int getAsLongLong() + int getAsLongLong(unsigned int) + + unsigned int getNelem() + int setNelem(unsigned int) + + int getAlarmStatus() + int getAlarmSeverity() + int getStatus() + + unsigned int getDataType() cdef extern from "PVGroup.h": - cdef cppclass PVGroup: - PVGroup() - PVDataHolder * getPVData() - unsigned int getNPV() - string getNameAsString() - unsigned int getGroupHandle() - int getStatusGroup() - void setPVData(PVDataHolder *) - void show() - void showMax(unsigned int) - void showMaxMax(unsigned int, unsigned int) - pass - - + cdef cppclass PVGroup: + PVGroup() + PVDataHolder * getPVData() + unsigned int getNPV() + string getNameAsString() + unsigned int getGroupHandle() + int getStatusGroup() + void setPVData(PVDataHolder * ) + void show() + void showMax(unsigned int) + void showMaxMax(unsigned int, unsigned int) + pass + +# cdef extern from "instant.h": +# template class Instant + + cdef extern from "cafe.h": - cdef cppclass CAFE: - - ChannelOpenPolicy channelOpenPolicy - ChannelOpenPolicy channelOpenGroupPolicy - ChannelOpenPolicy channelMonitorPolicy - #ChannelRequestPolicy channelRequestPolicyGet - #ChannelRequestPolicy channelRequestPolicyPut - - PolicyHelper getPolicyHelper() - HandleHelper getHandleHelper() - - int _ca_pend_io(double) nogil - int _ca_pend_event(double) nogil - int _ca_flush_io() nogil - int _ca_poll() nogil - - int init() - int open(char *, unsigned int &) except + - int openV(vector[string], vector[unsigned int] &) except + - - void openNoWait() nogil - void openPrepare() nogil - void openGroupPrepare() nogil - - void openNow() nogil - void openNowAndWait(double) nogil - void openGroupNowAndWait(double) nogil - - void openGroupNowAndWaitForInput(double, vector[unsigned int]) nogil - void groupOpenNowAndWait(double, vector[unsigned int]) nogil - - void openMonitorPrepare() nogil - void openMonitorNow() nogil - void openMonitorNowAndWait(double) nogil - - int closeHandlesV(vector[unsigned int]) nogil - int close(unsigned int) nogil - int closeChannels() nogil - - int closeChannelKeepHandle(unsigned int) nogil - int closeChannelsKeepHandles(vector[unsigned int]) nogil - vector[unsigned int] closeDisconnectedChannelsFromWithinGroupV(unsigned int) nogil - - int supplementHandles() - int supplementHandlesV(vector[unsigned int]) - int supplementHandle(unsigned int) - - - bint allChannelsConnected() - bint isChannelConnected(unsigned int) - int printDisconnectedHandles() - int printHandle(unsigned int) - int printHandles() - - bint isEnum(unsigned int) - bint isValid(unsigned int) - - void printStatusMessage(int) - void printStatus(unsigned int, int) - - int attachContextByPVName(const char *) - int attachContextByHandle(unsigned int) - - unsigned int getNelemClient (unsigned int) - unsigned int getNelemNative (unsigned int) - unsigned int getNelemRequest(unsigned int) - - const char * getPVFromHandle (unsigned int) - unsigned int getHandleFromPV (const char *) - - void loadSFGroups(string) - - int getChannelDataStore(unsigned int, ChannelDataStore) nogil - int getChannelInfo(unsigned int, ChannelRegalia) - - CAFEStatus getCafeStatus() - CAFEStatusSeverity getCafeStatusSeverity() - - PVDataHolder * getPVData(vector[unsigned int]) + cdef cppclass CAFE: + ChannelCreatePolicy channelCreatePolicy + ChannelOpenPolicy channelOpenPolicy + ChannelOpenPolicy channelOpenGroupPolicy + ChannelOpenPolicy channelMonitorPolicy + # ChannelRequestPolicy channelRequestPolicyGet + # ChannelRequestPolicy channelRequestPolicyPut - vector[string] getFromGlobalChannelList(vector[string]) + PolicyHelper getPolicyHelper() + HandleHelper getHandleHelper() - string getChannelIDAsString(chid) + int _ca_pend_io(double) nogil + int _ca_pend_event(double) nogil + int _ca_flush_io() nogil + int _ca_poll() nogil - int getWFAsString(unsigned int, string &) nogil - int getWFAsStringCache(unsigned int, string &) + int addWidget(unsigned int, void * ) + int removeWidget(unsigned int, void *) + int getWidgets(unsigned int, vector[void *]) - int getNonBlocking(unsigned int) nogil - int getCacheFloatArray(unsigned int, float *) - int getCacheDoubleArray(unsigned int, double *) - int getCacheShortArray(unsigned int, short *) - int getCacheLongArray(unsigned int, int *) - int getCacheStringArray(unsigned int, string *) - int getCacheDbrStringArray(unsigned int, dbr_string_t[]) - int getCacheDouble(unsigned int, double &) - int getCacheLong(unsigned int, int &) - int getCacheString(unsigned int, string &) - - int getDouble(unsigned int, double &) nogil - int getLong(unsigned int, int &) nogil - int getString(unsigned int, string &) nogil - int getStringTS(unsigned int, string &, short &, short&, epicsTimeStamp&) nogil - - int getCharArray(unsigned int, char []) nogil - int getShortArray(unsigned int, short []) nogil - int getUShortArray(unsigned int, unsigned short[]) nogil - int getDoubleArray(unsigned int, double []) nogil - int getFloatArray(unsigned int, float []) nogil - int getLongArray(unsigned int, int[]) nogil - int getStringArray(unsigned int, string[]) nogil - int getDbrStringArray(unsigned int, dbr_string_t[]) nogil - - int get(unsigned int, PVDataHolder &) nogil - int getCtrl(unsigned int, PVCtrlHolder &) nogil - int getCtrlCache(unsigned int, PVCtrlHolder &) nogil - - int getPVArray(vector[unsigned int], PVDataHolder *) nogil - int getCachePVArray(vector[unsigned int], PVDataHolder *) - int getCachePVArrayNoWait(vector[unsigned int], PVDataHolder *) + int init() + int open(char * , unsigned int & ) nogil except + + int openV(vector[string], vector[unsigned int] &) nogil except + - int getV(vector[unsigned int], vector[int]) nogil - int getCacheVStr(vector[unsigned int], vector[string], vector[int]) nogil - int getCacheVLong(vector[unsigned int], vector[dbr_long_t], vector[int]) nogil - int getCacheVDouble(vector[unsigned int], vector[double], vector[int]) nogil + int openChannelsWithHandles(vector[unsigned int]) nogil + int closeChannelKeepHandle(unsigned int) nogil + int closeChannelsKeepHandles(vector[unsigned int]) nogil + int reconnect(vector[unsigned int]) nogil - int waitForBundledEvents(vector[unsigned int], vector[int]) nogil - int waitForGetEvent(unsigned int) nogil + void openNoWait() nogil + void openPrepare() nogil + void openGroupPrepare() nogil - #bs read - int monitorPulseID() - int monitorStopPulseID() - int setPulseIDBufferSize(unsigned int, unsigned short) - int setPulseIDBufferSizeAll(unsigned short) + bint initCallbackCompleteV(vector[unsigned int]) + bint initCallbackCompleteHandle(unsigned int) - int monitorStart(unsigned int, MonitorPolicy &) nogil - int monitorStopAll() nogil - int monitorStop(unsigned int) nogil - int monitorStopWithID(unsigned int, unsigned int) nogil - int getCache(unsigned int, PVDataHolder &) - - - - MonitorPolicy * createMonitorPolicyArray(const unsigned int) - int groupMonitorStart(unsigned int, vector[int]&, vector[MonitorPolicy] & ) nogil - int groupMonitorStop (unsigned int, vector[int]&) nogil - int groupDefine(char *, vector[const char *]) - int groupOpen(char *, unsigned int &) nogil except + - int groupClose(unsigned int &) nogil except + - int groupAttach(unsigned int, PVGroup &) nogil - int groupGet(unsigned int, PVGroup &) nogil - int groupGetCache(unsigned int, PVGroup &) nogil - int groupSet(unsigned int, PVGroup &) nogil + void openNowAndWaitHandleV(vector[unsigned int], double) nogil - int groupMemberList(const char *, vector[string] &) + void openNow() nogil + void openNowAndWait(double) nogil + void openGroupNowAndWait(double) nogil - int loadCollectionsFromXML(const char *) nogil - int loadGroupsFromXML(const char *) nogil - int devicePositionMap(const char *, map[float, string]&) - int devicePositionV(const char *, vector[string]& , vector[float] &) - - int restoreFromXML(const char * snapshotFile) nogil; - int snapshot2XML (PVGroup pg) nogil; - void openGroupXMLFile(string fileName) nogil; - void closeGroupXMLFile(string fileName) nogil; - int group2XML (const char * grpName, string fileName) nogil; - - int groupList (vector[string] &) + void openGroupNowAndWaitForInput(double, vector[unsigned int]) nogil + void groupOpenNowAndWait(double, vector[unsigned int]) nogil - int printStatusIfError(vector[unsigned int], vector[int]) + void openMonitorPrepare() nogil + void openMonitorNow() nogil + void openMonitorNowAndWait(double) nogil - int setStringArray(unsigned int, char **) nogil - int setCharArray(unsigned int, unsigned char *) nogil - int setLongArray(unsigned int, int *) nogil - int setDoubleArray(unsigned int, double *) nogil - - int setPVArray(vector[unsigned int], PVDataHolder *) nogil - - int setVString(unsigned int, vector[string]) nogil - int setVChar(unsigned int, vector[unsigned char]) nogil - int setVShort(unsigned int, vector[short]) nogil - int setVUShort(unsigned int, vector[unsigned short]) nogil - int setVLong(unsigned int, vector[dbr_long_t]) nogil - int setVFloat (unsigned int, vector[float]) nogil - int setVDouble(unsigned int, vector[double]) nogil - - int setVVString(vector[unsigned int], vector[string], vector[int]&) nogil - int setVVChar(vector[unsigned int], vector[unsigned char], vector[int]&) nogil - int setVVLong(vector[unsigned int], vector[int], vector[int]&) nogil - int setVVDouble(vector[unsigned int], vector[double], vector[int]&) nogil - - int setString(unsigned int, string) nogil - int setChar(unsigned int, unsigned char) nogil - int setShort(unsigned int, short) nogil - int setUShort(unsigned int, unsigned short) nogil - int setLong(unsigned int, int) nogil - int setLongLong(unsigned int, long long) nogil - int setFloat (unsigned int, float) nogil - int setDouble(unsigned int, double) nogil - - int setAndMatch(const unsigned int, double, const unsigned int, double tolerance, double timeout, bint printFlag) nogil - int setAndMatchMany(vector[unsigned int], vector[double], vector[unsigned int], double tolerance, double timeout, bint printFlag) nogil - - int gameSetAndMatch(vector[unsigned int], vector[double], vector[unsigned int], vector[string], vector[unsigned int], double tolerance, double timeout, bint printFlag) nogil - - 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 setNelemToOne(const unsigned int) - int setNelemToPrevious(const unsigned int, const unsigned int) - int setNelemToRetrieveFromCacheToOne(const unsigned int) - int setNelemToRetrieveFromCacheToPrevious(const unsigned int, const unsigned int) - int getNelemToRetrieveFromCache(const unsigned int) - int terminate() nogil + int closeHandlesV(vector[unsigned int]) nogil + int close(unsigned int) nogil + int closeChannels() nogil - pass + + vector[unsigned int] closeDisconnectedChannelsFromWithinGroupV(unsigned int) nogil + + int supplementHandles() nogil + int supplementHandlesV(vector[unsigned int]) nogil + int supplementHandle(unsigned int) nogil + + bint allChannelsConnected() + bint isChannelConnected(unsigned int) + int printDisconnectedHandles() + int printHandle(unsigned int) + int printHandles() + + bint isEnum(unsigned int) + bint isValid(unsigned int) + + void printStatusMessage(int) + void printStatus(unsigned int, int) + + int attachContextByPVName(const char *) + int attachContextByHandle(unsigned int) + + unsigned int getNelemClient(unsigned int) + unsigned int getNelemNative(unsigned int) + unsigned int getNelemRequest(unsigned int) + + const char * getPVFromHandle(unsigned int) + unsigned int getHandleFromPV (const char *) + + void loadSFGroups(string) + + int getChannelDataStore(unsigned int, ChannelDataStore) nogil + int getChannelInfo(unsigned int, ChannelRegalia &) + + CAFEStatus getCafeStatus() + CAFEStatusSeverity getCafeStatusSeverity() + + PVDataHolder * getPVData(vector[unsigned int]) + + vector[string] getFromGlobalChannelList(vector[string]) + + string getChannelIDAsString(chid) + + int getWFAsString(unsigned int, string &) nogil + int getWFAsStringCache(unsigned int, string &) + + int getNonBlocking(unsigned int) nogil + int getCacheFloatArray(unsigned int, float *) + int getCacheDoubleArray(unsigned int, double *) + int getCacheShortArray(unsigned int, short * ) + int getCacheLongArray(unsigned int, int * ) + int getCacheStringArray(unsigned int, string * ) + int getCacheDbrStringArray(unsigned int, dbr_string_t[]) + int getCacheDouble(unsigned int, double &) + int getCacheLong(unsigned int, int & ) + int getCacheString(unsigned int, string & ) + + int getDouble(unsigned int, double &) nogil + int getLong(unsigned int, int &) nogil + int getString(unsigned int, string &) nogil + int getStringTS(unsigned int, string & , short & , short&, epicsTimeStamp&) nogil + + int getCharArray(unsigned int, dbr_char_t[]) nogil + int getShortArray(unsigned int, short[]) nogil + int getUShortArray(unsigned int, unsigned short[]) nogil + int getDoubleArray(unsigned int, double[]) nogil + int getFloatArray(unsigned int, float[]) nogil + int getLongArray(unsigned int, int[]) nogil + int getStringArray(unsigned int, string[]) nogil + int getDbrStringArray(unsigned int, dbr_string_t[]) nogil + + int getStringVector(const unsigned int, vector[string]) nogil + int getShortVector(const unsigned int, vector[short]) nogil + int getFloatVector(const unsigned int, vector[float]) nogil + int getUShortVector(const unsigned int, vector[unsigned short]) nogil + int getUCharVector(const unsigned int, vector[unsigned char]) nogil + int getLongVector(const unsigned int, vector[dbr_long_t]) nogil + int getLongLongVector(const unsigned int, vector[long long]) nogil + int getDoubleVector(const unsigned int, vector[double]) nogil + + int get(unsigned int, PVDataHolder &) nogil + int getCtrl(unsigned int, PVCtrlHolder &) nogil + int getCtrlCache(unsigned int, PVCtrlHolder &) nogil + + int getPVArray(vector[unsigned int], PVDataHolder *) nogil + int getCachePVArray(vector[unsigned int], PVDataHolder * ) + int getCachePVArrayNoWait(vector[unsigned int], PVDataHolder *) + + int getV(vector[unsigned int], vector[int]) nogil + int getCacheVStr(vector[unsigned int], vector[string] &, vector[int] &) nogil + int getCacheVLong(vector[unsigned int], vector[dbr_long_t] &, vector[int] &) nogil + int getCacheVDouble(vector[unsigned int], vector[double] &, vector[int] &) nogil + + int waitForBundledEvents(vector[unsigned int], vector[int]) nogil + int waitForGetEvent(unsigned int) nogil + + # bs read + int monitorPulseID() nogil + int monitorStopPulseID() nogil + int setPulseIDBufferSize(unsigned int, unsigned short) + int setPulseIDBufferSizeAll(unsigned short) + + int monitorStart(unsigned int, MonitorPolicy &) nogil + int monitorStopAll() nogil + int monitorStop(unsigned int) nogil + int monitorStopWithID(unsigned int, unsigned int) nogil + int getCache(unsigned int, PVDataHolder &) + + MonitorPolicy * createMonitorPolicyArray(const unsigned int) + int groupMonitorStart(unsigned int, vector[int]&, vector[MonitorPolicy] & ) nogil + int groupMonitorStop (unsigned int, vector[int] & ) nogil + int groupDefine(char * , vector[const char * ]) + int groupDefineFromCollection(const char * , const const char *, vector[string ]) + int groupOpen(char * , unsigned int & ) nogil except + + int groupClose(unsigned int) nogil except + + int groupCloseKeepName(unsigned int, bint) nogil except + + int groupAttach(unsigned int, PVGroup &) nogil + int groupGet(unsigned int, PVGroup &) nogil + int groupGetCache(unsigned int, PVGroup &) nogil + int groupSet(unsigned int, PVGroup &) nogil + + int groupMemberList(const char * , vector[string] & ) + + + int loadCollectionsFromXML(const char *) nogil + int loadGroupsFromXML(const char *) nogil + int devicePositionMap(const char *, map[float, string]&) + int devicePositionV(const char *, vector[string] & , vector[float] & ) + + int collectionDefine(const char *, vector[string]) nogil + int collectionList(vector[string] &) nogil + int collectionMemberList(const char *, vector[string] &) nogil + + int restoreFromXML(const char * snapshotFile) nogil + int snapshot2XML(PVGroup pg) nogil + void openGroupXMLFile(string fileName) nogil + void closeGroupXMLFile(string fileName) nogil + int group2XML(const char * grpName, string fileName) nogil + + int groupList (vector[string] &) + + bint isGroup(const char *) nogil + bint isCollection(const char *) nogil + + int printStatusIfError(vector[unsigned int], vector[int]) + + int setStringArray(unsigned int, char **) nogil + int setCharArray(unsigned int, unsigned char *) nogil + int setLongArray(unsigned int, int *) nogil + int setDoubleArray(unsigned int, double *) nogil + + int setPVArray(vector[unsigned int], PVDataHolder *) nogil + + int setVString(unsigned int, vector[string]) nogil + int setVChar(unsigned int, vector[unsigned char]) nogil + int setVShort(unsigned int, vector[short]) nogil + int setVUShort(unsigned int, vector[unsigned short]) nogil + int setVLong(unsigned int, vector[dbr_long_t]) nogil + int setVFloat(unsigned int, vector[float]) nogil + int setVDouble(unsigned int, vector[double]) nogil + + int setVVString(vector[unsigned int], vector[string], vector[int] & ) nogil + int setVVChar(vector[unsigned int], vector[unsigned char], vector[int] & ) nogil + int setVVLong(vector[unsigned int], vector[int], vector[int] & ) nogil + int setVVDouble(vector[unsigned int], vector[double], vector[int] & ) nogil + + int setString(unsigned int, string) nogil + int setChar(unsigned int, unsigned char) nogil + int setShort(unsigned int, short) nogil + int setUShort(unsigned int, unsigned short) nogil + int setLong(unsigned int, int) nogil + int setLongLong(unsigned int, long long) nogil + int setFloat(unsigned int, float) nogil + int setDouble(unsigned int, double) nogil + + int setAndMatch(const unsigned int, double, const unsigned int, double tolerance, double timeout, bint printFlag) nogil + int setAndMatchMany(vector[unsigned int], vector[double], vector[unsigned int], double tolerance, double timeout, bint printFlag) nogil + + int gameSetAndMatch(vector[unsigned int], vector[double], vector[unsigned int], vector[string], vector[unsigned int], double tolerance, double timeout, bint printFlag) nogil + + 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 readDBPMOffsets(DBPMKeeper &) + int getDBPM(DBPMKeeper &) nogil + + int prepareDBPM(vector[string] & , vector[unsigned int] & , vector[string] & , vector[float] & ) nogil + + int setNelemToOne(const unsigned int) + int setNelemToPrevious(const unsigned int, const unsigned int) + int setNelemToRetrieveFromCacheToOne(const unsigned int) + int setNelemToRetrieveFromCacheToPrevious(const unsigned int, const unsigned int) + int getNelemToRetrieveFromCache(const unsigned int) + int terminate() nogil + + # BSREAD + int initBSwithCA(BSDataHolder &) nogil + int setBS(BSDataHolder &) nogil + int setBS2CAGroup(BSDataHolder &) nogil + int getBS(BSDataHolder &) nogil + int closeBS(BSDataHolder &) nogil + + pass diff --git a/PyCafe.pyx b/PyCafe.pyx index 97a4dd6..16da2fe 100644 --- a/PyCafe.pyx +++ b/PyCafe.pyx @@ -1,1234 +1,1802 @@ -#dtutils: language = c++ +# dtutils: language = c++ # file: PyCafe.pyx -cimport PyCafe as ccafe -import numpy as np -cimport numpy as cnp +"""Cython interface to the C++ CAFE library. |br| +To import the resulting Python module and instantiate the Cython class: +:: -from cpython cimport array + import PyCafe + cafe = PyCafe.CyCafe() + cyca = PyCafe.CyCa() + +""" import array -from cython.view cimport array as cvarray - -from libc.stdlib cimport malloc, free -from cython.operator cimport dereference as deref, preincrement as inc -from cython cimport view import ctypes +import cython +import inspect +import numbers +import numpy as np + +import os +import sys import time import timeit -import os -import cython -import inspect -import sys -import numbers - -#from libcpp.string cimport string - import Cython.Compiler.Options -Cython.Compiler.Options.annotate=True + +from collections import OrderedDict + +from copy import deepcopy +from cython cimport view +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 libc.stdlib cimport malloc, free + +cimport numpy as cnp +cimport PyCafe as ccafe + +# from libcpp.string cimport string +#Cython.Compiler.Options.annotate = True + +_pymodule = "PyCafe.pyx" # os.path.basename(__file__) +_pymodule_parts = _pymodule.split(".") +_appname = _pymodule_parts[0] + +_python_version = sys.version_info #[0:4] + +cdef object py_cb + +cdef dict openCallbackDictGlobal = {} +cdef dict hmd = {} +cdef dict handleMonDictGlobal = {} +cdef dict monDictGlobal = {} +cdef dict openDictGlobal = {} + +cdef dict getDictGlobal = {} +cdef dict putDictGlobal = {} + +#cdef ccafe.CAFE * _c_cafe +#_c_cafe = new ccafe.CAFE() include "PyCafeDefs.pxi" -cdef dict monDictGlobal={} +def verify_handlepv(func): + """Decorator to validate handle/PV input argument. -#DEF HAVE_BSREAD=1 + PyCafe methods that act on a single channel accept either the PV name or + the handle (object reference) to the PV as returned by the ``open`` method. + If a PV name is given, the decorator retrieves the associated handle to + pass on to the underlying C++ CAFE method. -################################################################################## + Args: + func: The function to be wrapped + + Returns: + The modified input function + + Raises: + TypeError: If handle/PV is not `int` or `str`, respectively. + ValueError: If handle is invalid. + + """ + #This outer code (only) is executed at import PyCafe (compile time) + #while the below is not + + def wrapper(self, *args,**kwargs): + + #print('The positional arguments are', args) + #print('The keyword arguments are', kwargs) + + handlePV = args[0] + cdef unsigned int handle = 0 + + + #Accept if pv/handle is in list of length one + if isinstance(handlePV, list): + if len(handlePV) == 1: + handlePV = handlePV[0] + + if isinstance(handlePV, (int, long)): + if handlePV < 0: + raise ValueError( + "{} {}.pyx: {} \n{}".format( + "Exception raised in", _appname, func.__name__, + ("A handle can never hold a negative value! "))) + + handle = handlePV + + if not self.isValid(handle): + raise ValueError( + "{} {}.pyx: {} \n{}".format( + "Exception raised in", _appname, func.__name__, + ("Invalid handle of type . If handle is not " + "known, \nsuggest using PV name of type " + "as input argument instead. "))) + + elif isinstance(handlePV, str): + handle = self.checkForHandle(handlePV) + else: + raise TypeError( + "{} {}.pyx: {} \n{}".format( + "Exception raised in", _appname, func.__name__, + ("First input argument, should be of type " + "if handle, else if PV"))) + + ##kwargs_keys = list(kwargs.keys()) + ##return func(self, handle, **kwargs) # **splat operator + + + if not kwargs: + if len(args) == 1: + + return func(self, handle) + + else: + return func(self, handle, *args[1:]) + + elif len(kwargs) > 0: + if len(args) == 1: + + return func(self, handle, **kwargs) + + else: + return func(self, handle, *args[1:], **kwargs) #dt=kwargs[kwargs_keys[0]]) + + return wrapper + +################################################################################ cdef class CyCafe: + """ + Class with associated process variable meta data. - cdef: - ccafe.CAFE *_c_cafe - double valFloat #cython float64 - string valStr - int valInt - #double * valFloatArray #cython float64 - #int * valIntArray - #dbr_string_t * valStringArray - - vector[string] vStr - vector[double] vFloat #cython float64 - vector[dbr_long_t] vInt - HandleHelper hh - PolicyHelper ph - CAFEException_pv expv - CAFEException_open exopen - CAFEStatus cs - CAFEStatusSeverity css - ####PyGILState_STATE gstate - tuple pythonVersion - - bint haveExceptions - ChannelRegalia channelInfo - #list moncbList - #list monidList - #dict monDict - - str exString - - cdef vector[string] bpmList - vector[unsigned int] bpmHandles - #multimap[float, string] floatStringMap - #map[float, string] bpmPosDev - vector[float] bpmPos - vector[string] bpmDev - - - def __cinit__(self): - self._c_cafe = new ccafe.CAFE() - if self._c_cafe is NULL: - raise MemoryError() - - - self.cs =self._c_cafe.getCafeStatus() - ##self.css=self._c_cafe_getCafeStatusSeverity() - - self.pythonVersion=sys.version_info[0:4] + Attributes: + _c_cafe (PyCafe.CAFE): The CAFE class. + _enable_exceptions (bool): Activates exceptions for single pv operations + _exception_text (str): Default text for CyCafe exceptions that do not + originate from the C++ CAFE exception - self.haveExceptions=True - - self.exString="EXCEPTION RAISED IN PyCafe.pyx:" - #self.moncbList =[] - #self.monidList=[] - #self.monDict={} - - #Required with gil for callbacks - #However seems to work without this call - ####Py_Initialize() - ####PyEval_InitThreads() - - def __dealloc__(self): - del self._c_cafe - - ################################################################################## - def init(self): - return self._c_cafe.init() - ################################################################################## - - def withExceptions(self, bint exceptions=True): - self.haveExceptions=exceptions - return self.haveExceptions - - #def getMonidList(self): - # return self.monidList - - #def getMoncbList(self): - # return self.moncbList - - #def getMonDict(self): - # return self.monDict - - - - - ################################################################################## - def open(self, pv): - cdef str _METHOD_="open(pv)" - - cdef vector[string] pvV - cdef vector[unsigned int] handleV - cdef bytes py_string - - if isinstance(pv, (list)): - for i in range(0, len(pv)): - if isinstance(pv[i], unicode): - py_string = (pv[i]).encode('UTF-8') - pvV.push_back( py_string ) - elif isinstance(pv[i], bytes): - pvV.push_back( (pv[i]).encode('utf8') ) - else: - print ("Unknown type in {}".format(_METHOD_)) - try: - status=self._c_cafe.openV(pvV, handleV) - except RuntimeError as e: - if isinstance (e.args, tuple): - if 'CAFEException' in (e.args[0]): - _cyCafeException = CyCafeException(_type='cafe', _source=_METHOD_, \ - _ec=ECA_ALLOCMEM, _et=self.cs.code(ECA_ALLOCMEM), _ei=self.cs.info(ECA_ALLOCMEM)) - raise Exception(_cyCafeException) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, e.what())) - - return handleV - - elif not isinstance(pv, (bytes,str)): - - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "Input argument, pv, should be ")) - - cdef unsigned int handle=0 - - try: - self._c_cafe.open(pv, handle) - except RuntimeError as e: - if isinstance (e.args, tuple): - if 'CAFEException' in (e.args[0]): - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, _handle=handle, _pv=pv, \ - _ec=ECA_ALLOCMEM, _et=self.cs.code(ECA_ALLOCMEM), _ei=self.cs.info(ECA_ALLOCMEM)) - raise Exception(_cyCafeException) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, e.what())) - #A notch to allow for possible race condition - if (self.isConnected(handle)==False): - time.sleep(0.02) - return handle - - ################################################################################## - def openNoWait(self): - #self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) - #self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) - with nogil: - self._c_cafe.openNoWait() - return + """ + cdef: + ccafe.CAFE * _c_cafe - def openPrepare(self): - #self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) - #self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) - with nogil: - self._c_cafe.openPrepare() - return - - def openGroupPrepare(self): - #self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) - #self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) - with nogil: - self._c_cafe.openGroupPrepare() - return + double valFloat # cython float64 + dbr_long_t valInt + string valStr - def setOpenDefaultPendTime(self, double timeout): - return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) - - def getOpenDefaultPendTime(self): - return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + vector[double] vFloat # cython float64 + vector[dbr_long_t] vInt + vector[string] vStr + + str _exception_text + bint _enable_exceptions + double _min_timeout + + CAFEStatus cs + CAFEStatusSeverity css + + HandleHelper hh + PolicyHelper ph + + ChannelRegalia channelInfo + # PyGILState_STATE gstate + + DBPMKeeper dbpm + + bint dbpmInitialized + bint BSInitialized + bint isBSinCAOnly + BSDataHolder bsd - ################################################################################## - def openNow(self): - #self._c_cafe.channelOpenPolicy.flushSendBufferNow() - #self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) - #self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) - with nogil: - self._c_cafe.openNow() - return - - ################################################################################## - def openNowAndWait(self, double timeout): - #self._c_cafe.channelOpenPolicy.setTimeout(timeout) - #self._c_cafe.channelOpenPolicy.flushSendBufferNow() - #reset - #self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) - #self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) - #self._c_cafe.channelOpenPolicy.setTimeoutToDefault() - with nogil: - self._c_cafe.openNowAndWait(timeout) - return + ########################################################################### + def __cinit__(self): + """Initializes CAFE and CyCafe class attributes. - ################################################################################## - - - ################################################################################## - def openGroupNowAndWait(self, double timeout): - #self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) - #self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() - #reset - #self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) - #self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) - #self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() - with nogil: - self._c_cafe.openGroupNowAndWait(timeout) - return + """ + cdef str _METHOD = "__cinit__" + self._c_cafe = new ccafe.CAFE() ##_c_cafe ## - ################################################################################## - - - ################################################################################## - def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): - cdef str _METHOD_="openGroupNowAndWaitForInputGroups" - - cdef vector[unsigned int] hList - - if isinstance(groupHandles, (list)) == 1: - for i in range (0, len(groupHandles)): - if isinstance(groupHandles[i], (int,long)) == 1: - hList.push_back(groupHandles[i]) - elif isinstance(groupHandles[i], (str)) == 1: - hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles[i])) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "List input arguments, should be if group handle, else if group name")) - - elif isinstance(groupHandles, (int,long)) == 1: - hList.push_back(groupHandles) - elif isinstance(groupHandles, (str)) == 1: - hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "Second input argument (if not a list), should be if group handle, else if group name")) - - - #list to vector - with nogil: - self._c_cafe.groupOpenNowAndWait(timeout, hList) - return + if self._c_cafe is NULL: + raise MemoryError("Failed to instantiate CAFE()") - ################################################################################## - - def openMonitorPrepare(self): - #self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) - #self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) - with nogil: - self._c_cafe.openMonitorPrepare() - return + self.cs = self._c_cafe.getCafeStatus() + self._exception_text = "Exception raised in PyCafe.pyx:" + self._enable_exceptions = False - ################################################################################## - def openMonitorNow(self): - #self._c_cafe.channelMonitorPolicy.flushSendBufferNow() - #reset - #self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) - #self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) - with nogil: - self._c_cafe.openMonitorNow() - time.sleep(0.1) - return + self._min_timeout = 0.001 #cannot be zero - ################################################################################## + try: + self._c_cafe.init() + except RuntimeError as e: + if isinstance(e.args, (tuple)): + # equivalent to e.what() + if 'CAFEException_init' in (e.args[0]): + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_code=ECA_ALLOCMEM, + _error_text=self.cs.code(ECA_ALLOCMEM), + _error_info=self.cs.info(ECA_ALLOCMEM)) + raise _cafeException + raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + self.dbpmInitialized = False + self.BSInitialized = False + self.isBSinCAOnly = False + + print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) + + IF PY_EXT_C: + print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS") + ELSE: + print("USING API PyCafe_api.h INTERFACE FOR CALLBACKS") + + # Required with gil for callbacks + # Placed in cafe.init() + # Py_Initialize() + # PyEval_InitThreads() + + ########################################################################### + def __dealloc__(self): + del self._c_cafe + + ########################################################################### - ################################################################################## - def getMonitorWhenToFlushSendBuffer(self): - return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() - - - ################################################################################## + + @verify_handlepv + def setPyConnectCallbackFn(self, handlePV, cb: object = None): + if cb is None: + return + pv_name = handlePV + #global openCallbackDictGlobal + #openCallbackDictGlobal[cb] = handlePV + #september 21 2021 + global openDictGlobal + openDictGlobal[pv_name] = cb + + #handle = self.hh.getHandleFromPV(pv_name) + self.hh.setPyConnectCallbackFn(handlePV, cb) + #self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + #self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + #open + #false - ################################################################################## - def openMonitorNowAndWait(self, double timeout): - #self._c_cafe.channelMonitorPolicy.setTimeout(timeout) - #self._c_cafe.channelMonitorPolicy.flushSendBufferNow() - #time.sleep(timeout) - #reset - #self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) - #self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) - with nogil: - self._c_cafe.openMonitorNowAndWait(timeout) - return + def setPyCallbackConnect(self, pv: str = None, cb: object = None): + if None in (pv, cb): + return + global openDictGlobal + openDictGlobal[pv] = cb + + ##self.hh.setPyConnectCallbackFn(handle, cb) - ################################################################################## - - def ca_pend_event(self, double timeout): - self._c_cafe._ca_pend_event(timeout) - return - - def ca_pend_io(self, double timeout): - self._c_cafe._ca_pend_io(timeout) - return - - def ca_poll(self): - with nogil: - self._c_cafe._ca_poll() - return - - def ca_flush_io(self): - with nogil: - self._c_cafe._ca_flush_io() - return - - ################################################################################## - def setChannelRequestPolicyGet(self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, \ - ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ - object cb=None): - cdef str _METHOD_="setChannelRequestPolicyGet" - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First Input argument should be if handle, else if PV")) - - global py_cb_handle_get - - cdef ChannelRequestPolicy cp - self.ph.getChannelRequestPolicyGet(handlePV, cp) - if when: - cp.setWhenToFlushSendBuffer(when) - if wait: - cp.setWaitKind(wait) - if method: - cp.setMethodKind(method) - if cb: - py_cb_handle_get=cb - cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED - - self.ph.setChannelRequestPolicyGet(handlePV, cp) - return - ################################################################################## - - ################################################################################## - def setCallbackGet(self, handlePV, object cb=None): - - cdef str _METHOD_="setCallbackGet" - - cdef ChannelRequestPolicy cp - self.ph.getChannelRequestPolicyGet(handlePV, cp) - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - global py_cb_handle_get - if cb: - py_cb_handle_get=cb - cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED - else: - cp.setMethodKind(WITH_CALLBACK_DEFAULT) - - self.ph.setChannelRequestPolicyGet(handlePV, cp) - return - ################################################################################## - - - ################################################################################## - def setCallbackPut(self, handlePV, object cb=None): - - cdef str _METHOD_="setCallbackPut" - - cdef ChannelRequestPolicy cp - self.ph.getChannelRequestPolicyPut(handlePV, cp) - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - global py_cb_handle_put - if cb: - py_cb_handle_put=cb - cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED - else: - cp.setMethodKind(WITH_CALLBACK_DEFAULT) - - self.ph.setChannelRequestPolicyPut(handlePV, cp) - return - ################################################################################## - - ################################################################################## - def setTimeout(self, timeout): - return self.ph.setTimeout(timeout) - ################################################################################## - - ################################################################################## - def getTimeoutGet(self): - cdef double minValue,p,g - minValue=0 - p=0 - g=0 - self.ph.getTimeoutMin(p,g) - minValue=g - self.ph.getTimeoutMax(p,g) - if (g < minValue): - minValue=g - return minValue - ################################################################################## - - - ################################################################################## - def getTimeoutPut(self): - cdef double minValue,p,g - minValue=0 - p=0 - g=0 - self.ph.getTimeoutMin(p,g) - minValue=p - self.ph.getTimeoutMax(p,g) - if (p < minValue): - minValue=g - return minValue - ################################################################################## + ############################################################################ + def init(self): + """Initialize channel access. + This method is called by ``__cinit__`` when instantiating CyCafe. + It may, optionally, be called by the user when creating a new channel + access context, e.g., if in a separate thread. If omitted, it will + otherwise be called internally by CAFE. - ################################################################################## - def setSelfGoverningTimeout(self, bint b): - return self.ph.setSelfGoverningTimeout(b) - ################################################################################## + Raises: + MemoryError: If insufficient memory to initialize channel access. + Epics status reports ECA_ALLOCMEM. Application cannot continue. - ################################################################################## - # Synchronous Groups - ################################################################################## - def setSGTimeout(self, double timeout): - return self.ph.setSGTimeout(timeout) - ################################################################################## - - ################################################################################## - def getSGTimeoutGet(self): - cdef double minValue,p,g - minValue=0 - p=0 - g=0 - self.ph.getSGTimeoutMin(p,g) - minValue=g - self.ph.getSGTimeoutMax(p,g) - if (g < minValue): - minValue=g - - return minValue - ################################################################################## - - ################################################################################## - def getSGTimeoutPut(self): - cdef double minValue,p,g - minValue=0 - p=0 - g=0 - self.ph.getSGTimeoutMin(p,g) - minValue=p - self.ph.getSGTimeoutMax(p,g) - if (p < minValue): - minValue=p - - return minValue - ################################################################################## - - ################################################################################## - def setSGSelfGoverningTimeout(self, bint b): - cdef PolicyHelper ph - return ph.setSGSelfGoverningTimeout(b) - ################################################################################## - - ################################################################################## - def attachContext(self, handlePV): - cdef str _METHOD_="attachContext" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - return self._c_cafe.attachContextByHandle(handlePV) - elif isinstance(handlePV, (str)) == 1: - return self._c_cafe.attachContextByPVName(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) + """ + cdef str _METHOD = "init" + try: + self._c_cafe.init() + except RuntimeError as e: + if isinstance(e.args, (tuple)): + # e.args[0] is e.what() + if 'CAFEException_init' in (e.args[0]): + raise MemoryError( + "{} {} \n{}\n{}".format( + self._exception_text, _METHOD, + "ECA_ALLOCMEM error in initializing ca context ", + self.cs.info(ECA_ALLOCMEM))) + ''' + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_code=ECA_ALLOCMEM, + _error_text=self.cs.code(ECA_ALLOCMEM), + _error_info=self.cs.info(ECA_ALLOCMEM)) + raise _cafeException + ''' + raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) - ################################################################################## + def withExceptions(self, bint exceptions=True): + """Activate/deactivate CAFE exceptions for single channel operations. - ################################################################################## - def loadCollectionsFromXML(self, const char * fileName): - with nogil: - self._c_cafe.loadCollectionsFromXML(fileName) - return - ################################################################################## - ################################################################################## - def loadGroupsFromXML(self, const char * fileName): - with nogil: - self._c_cafe.loadGroupsFromXML(fileName) - return - ################################################################################## + If the input argument, exceptions, is set to False, the user is obliged + to examine the return code of any set/get method that instigates a CAFE + transaction on a single channel. - def devicePositionMap(self, const char * collectionName): - - p=[] - d=[] - cdef map[float, string] mmfs - cdef map[float, string].iterator it - self._c_cafe.devicePositionMap(collectionName, mmfs) - it= mmfs.begin() - tup=() #tuple - while it != mmfs.end(): - tup=deref(it) - - p.append(tup[0]) - d.append(tup[1]) - inc(it) - return d,p + Args: + exceptions (bool): Activates/deactivates CAFE exceptions if + True/False for single channel operations. The default is True. + + Returns: + bool: Confirmation of the set value + :: + + res = cafe.withExceptions(True|False) + """ + + self._enable_exceptions = exceptions + return self._enable_exceptions + + + @property + def enableExceptions(self): + """Activate/deactivate CAFE exceptions for single channel operations. + + The default value is True. + If set to False, the user is obliged to examine the return code of any + set/get method that instigates a CAFE transaction on a single channel. + + Returns: + bool: The current value + :: + + cafe.enableExceptions = True | False + res = cafe.enableExceptions + + """ + + return self._enable_exceptions + + @enableExceptions.setter + def enableExceptions(self, bint enable): + self._enable_exceptions = enable + + cdef prepareCafeException( + self, int status, str _METHOD, + unsigned int handle = 0, pv_name: str = None): + if handle > 0 and pv_name is None: + pv_name=self._c_cafe.getPVFromHandle(handle) + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _error_code=status, _pv_name=pv_name, + _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + return _cafeException + + ############################################################################ + + def isValid(self, unsigned int handle): + return self._c_cafe.isValid(handle) - def devicePositionV(self, const char * collectionName): - cdef str _METHOD_="devicePositionV(self, const char * collectionName)" - #p=[] - #d=[] - cdef vector[string] dev - cdef vector[float] pos - status=self._c_cafe.devicePositionV(collectionName, dev, pos) - - if status != ICAFE_NORMAL: - raise Exception("{} {} {} {} {} {}".format(self.exString, _METHOD_, \ - "status=", status, self.cs.code(status), self.cs.code(status) )) - - - #for i in range (0, dev.size()): - #d.append(dev[i]) - #p.append(pos[i]) - return dev, pos + ############################################################################ + def removeWidget(self, unsigned int handle, object widget): + return self.hh.removeWidget(handle, widget) + + def addWidget(self, unsigned int handle, object widget): + return self.hh.addWidget(handle, widget) + + def getWidgets(self, unsigned int handle): + cdef vector[void *] widgetV + widgetV.reserve(2) + widgetList = [] + status = self.hh.getWidgets(handle, widgetV) + for i in range(0, widgetV.size()): + widgetList.append( < object > widgetV[i]) + return widgetList + ############################################################################ + + ############################################################################ + # Cython exceptions, only e.what() is preserved. See https: + # //cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html + ############################################################################ + def open(self, pv, cb: object = None): + """Returns handle (object reference) for given process variable. + + Establishes a channel access virtual circuit to the given process + variable, pv. The optional user supplied callback function reports on + the connection state. Within the callback, all cafe operations that + retrieve data from cache and send data values to the process variable + are permitted. Typically, such callback functions are used in GUI + development, and in complex procedures, such as feedback systems in + virtual accelerators. - ################################################################################## - def groupList(self): - cdef vector[string] gList - #conservative guess - gList.reserve(36) + Args: + pv (:obj:`str`, :obj:`bytes`, :obj:`list` of :obj:`str` or :obj:`bytes`): + The process variable name(s) + cb (:obj:`object`, optional): A user supplied callback function to + be invoked upon first connection and subsequent changes to the + connection state. Defaults to None. The callback function must + have the required signature (:obj:`int`, :obj:`str`, :obj:`int`) - self._c_cafe.groupList(gList) - - #Place in list to avoid this warning: - # warning: comparison between signed and unsigned integer expressions - #gl=[] - #for i in range (0, len(gList)): - # gl.append(gList[i]) - return gList - ################################################################################## - - def getDataTypeNative(self, handlePV): - cdef str _METHOD_="getDataTypeNative(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef long ndt=-1 - - self.hh.getDataTypeNative(handle, ndt) - return ndt - - def getDataTypeRequest(self,handlePV): - cdef str _METHOD_="getDataTypeRequest(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef long rdt=-1 - self.hh.getDataTypeRequest(handle, rdt) - return rdt - - def getMonitorIDInCallback(self, handlePV): - cdef str _METHOD_="getMonitorIDInCallback(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self.hh.getUsrArgsAsUInt(handle) - - def getDataTypeInCallback(self, handlePV): - cdef str _METHOD_="getDataTypeInCallback(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self.hh.getDataTypeCB(handle) - - def getDbrDataTypeInCallback(self, handlePV): - cdef str _METHOD_="getDbrDataTypeInCallback(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self.hh.getDbrDataTypeCB(handle) - - def getDbrBaseInCallback(self, handlePV): - cdef str _METHOD_="getDbrBaseInCallback(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self.hh.getCafeDbrTypeCB(handle) - - ################################################################################## - def getHandlesFromWithinGroup(self, gHandleName): - - cdef str _METHOD_="getHandlesFromWithinGroup(gHandleName)" - - cdef unsigned int groupHandle=0 - if isinstance(gHandleName, (int,long)) == 1: - groupHandle=gHandleName - elif isinstance(gHandleName, (str)) == 1: - groupHandle=self.hh.getGroupHandleFromGroupName(gHandleName) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if group handle, else if group name")) - - cdef vector[unsigned int] hList - hList=self.hh.getHandlesFromWithinGroupV(groupHandle) - return hList - ################################################################################## + Returns: + :obj:`int` | :obj:`list` of :obj:`int`: handle(s) to the given pv(s). - - ################################################################################## - def close(self, handlePV): - cdef str _METHOD_="close" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) + Raises: + TypeError: If handle/PV is not instance of `int` or (`str`,`bytes`), + respectively. - cdef int stat - with nogil: - stat=self._c_cafe.close(handle) + .. code-block:: python - return stat - - ################################################################################## - def closeChannels(self): - cdef int stat - with nogil: - stat=self._c_cafe.closeChannels() - return stat - - - ################################################################################## - def closeHandles(self, list handleList): - cdef str _METHOD_="closeHandlesV" - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList, force=False) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be a 'list' of if handles or if PVs")) - - #Do this only to avoid compiler warnings - cdef vector[unsigned int] v - for i in range(0, len(handleList)): - v.push_back(handleList[i]) - cdef int stat - with nogil: - stat=self._c_cafe.closeHandlesV(v) - return stat - - - ################################################################################## - def closeDisconnectedChannelsWithinGroup(self, ghandleName): - cdef str _METHOD_="closeDisconnectedChannelsWithinGroup" - cdef vector[unsigned int] hList - cdef vector[unsigned int] disHandles - - if isinstance(ghandleName, (list)) == 1: - for i in range (0, len(ghandleName)): - if isinstance(ghandleName[i], (int,long)) == 1: - hList.push_back(ghandleName[i]) - elif isinstance(ghandleName[i], (str)) == 1: - hList.push_back(self.checkForGroupHandle(ghandleName[i])) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "List input arguments, should be if group handle, else if group name")) - - elif isinstance(ghandleName, (int,long)) == 1: - hList.push_back(ghandleName) - elif isinstance(ghandleName, (str)) == 1: - hList.push_back(self.checkForGroupHandle(ghandleName)) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument (if not list), should be if group handle, else if group name")) + py_connect_callback(handle, pv_name, status): + if status == cyca.ICAFE_CS_CONN: + value = cafe.getCache(handle[, dt=`str`]) + ... + elif status == cyca.ICAFE_CS_DISCONN: + ... - for i in range (0, len(hList)): - with nogil: - self._c_cafe.closeDisconnectedChannelsFromWithinGroupV(hList[i]) - return - - - ################################################################################## - def closeChannelKeepHandle(self, handlePV): - cdef str _METHOD_="closeChannelKeepHandle" - - cdef vector[unsigned int] hList - cdef int statusClose - - if isinstance(handlePV, (list)) == 1: - for i in range (0, len(handlePV)): - if isinstance(handlePV[i], (int,long)) == 1: - hList.push_back(handlePV[i]) - elif isinstance(handlePV[i], (str)) == 1: - hList.push_back(self.checkForHandle(handlePV[i])) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "List input arguments, should be if group handle, else if group name")) - - elif isinstance(handlePV, (int,long)) == 1: - hList.push_back(handlePV) - elif isinstance(handlePV, (str)) == 1: - hList.push_back(self.checkForHandle(handlePV)) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument (if not list), should be if handle, else if PV")) - - with nogil: - statusClose= self._c_cafe.closeChannelsKeepHandles(hList) - return statusClose - - - ################################################################################## - def allConnected(self): - return self._c_cafe.allChannelsConnected() - - ################################################################################## - def isConnected(self, handlePV): - cdef str _METHOD_="isConnected" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self._c_cafe.isChannelConnected(handle) - - - - ################################################################################## - def supplementHandles(self): - return self._c_cafe.supplementHandles() - ################################################################################## + :: + + handle = cafe.open(pv=pv_name[, cb=py_connect_callback]) - def supplementHandle(self, handlePV): - cdef str _METHOD_="supplementHandle" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self._c_cafe.supplementHandle(handle) - - - ################################################################################## - def supplementHandlesV(self, handleList): - cdef str _METHOD_="supplementHandlesV" - if isinstance(handleList, (str,int,long)): - hl=[] - hl.append(handleList) - handleList=[] - handleList=hl - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be a 'list' of if handles, else if PVs")) - return self._c_cafe.supplementHandlesV(handleList) - - ################################################################################## - def printDisconnected(self): - self._c_cafe.printDisconnectedHandles() - return + """ + cdef str _METHOD = "open" + cdef vector[string] pvV + cdef vector[unsigned int] handleV + cdef bytes py_string - def printDisconnectedHandles(self): - self._c_cafe.printDisconnectedHandles() - return - - ################################################################################## - def printHandles(self): - self._c_cafe.printHandles() - return - - ################################################################################## - def printHandle(self, handlePV): - cdef str _METHOD_="printHandle" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - self._c_cafe.printHandle(handle) - return - ################################################################################## - - ################################################################################## - def printHandlesV(self, list handleList): - cdef str _METHOD_="printHandlesV" - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be a 'list' of if handles or if PVs")) - - #Do this only to avoid compiler warnings - cdef vector[unsigned int] v - for i in range(0, len(handleList)): - v.push_back(handleList[i]) - self.hh.printHandlesV(v) - return - ################################################################################## - - ################################################################################## - def getDisconnectedHandles(self): - cdef vector[unsigned int] dhV - cdef vector[string] pvV - self.hh.getDisconnectedHandles(dhV,pvV) - return dhV,pvV - ################################################################################## - - - ################################################################################## - def getHandles(self): - cdef vector[unsigned int] dhV - cdef vector[string] pvV - self.hh.getHandles(dhV,pvV) - return dhV,pvV - ################################################################################## - - - ################################################################################## - def getHandleStates(self): - cdef vector[unsigned int] dhV - cdef vector[string] pvV - cdef vector[unsigned short] stateV - self.hh.getHandleStates(dhV,pvV, stateV) - return dhV,pvV,stateV - ################################################################################## - - - ################################################################################## - def getStatusSeverity(self, int statusCode): - return self._c_cafe.getCafeStatusSeverity().message(statusCode) - - ################################################################################## - def getStatusCodeAsText(self, int statusCode): - return self.cs.code(statusCode) - - ################################################################################## - def getStatusCodeAsString(self, int statusCode): - return self.cs.code(statusCode) - - ################################################################################## - def getStatusInfo(self, int statusCode): - return self.cs.info(statusCode) - - ################################################################################## - def getStatusMsg(self, int statusCode): - return self.cs.message(statusCode) - - ################################################################################## - def getStatus(self, handlePV): - cdef str _METHOD_="getStatus" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - return self.hh.getStatus(handle) - - ################################################################################## - def getChannelDevice(self, handlePV): - cdef str _METHOD_="getChannelDevice" - cdef string valString=str("") - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(pv=handlePV, force=False) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - if handle == 0: - valString=str("") - if isinstance(handlePV, (str)) == 1: - delSplit=handlePV.split(":") - if (len(delSplit) > 1): - valString=str(delSplit[0]) - else: - statusLocal=self.hh.getChannelDevice(handle, valString) - return valString - - ################################################################################## - def getChannelAttribute(self, handlePV): - cdef str _METHOD_="getChannelAttribute" - cdef string valString=str("") - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(pv=handlePV, force=False) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - if handle == 0: - valString=str("") - if isinstance(handlePV, (str)) == 1: - delSplit=handlePV.split(":") - if (len(delSplit) > 1): - valString=str(delSplit[0]) - else: - statusLocal=self.hh.getChannelAttribute(handle, valString) - return valString - - ################################################################################## - def getDescription(self, handlePV): - cdef str _METHOD_="getDescription" - cdef string valString - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - statusLocal=self.hh.getDescription(handle, valString) - return valString - - - ################################################################################## - def getUnits(self, handlePV): - cdef str _METHOD_="getUnits" - cdef string valString - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - statusLocal=self.hh.getUnits(handle, valString) - - return valString - - - ################################################################################## - def getPrecision(self, handlePV): - cdef str _METHOD_="getPrecision" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - cdef short precision=0 - statusLocal=self.hh.getPrecision(handle, precision) - return precision - - ################################################################################## - def hasAlarmStatusSeverity(self,handlePV): - cdef str _METHOD_="hasAlarmStatusSeverity" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - return self.hh.hasAlarmStatusSeverity(handle) - - ################################################################################## - def getAlarmStatusSeverity(self,handlePV): - cdef str _METHOD_="getAlarmStatusSeverity" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef short aStatSev[2] - status=self.hh.getAlarmStatusSeverity(handle,aStatSev) - return aStatSev[0], aStatSev[1] - - ################################################################################## - def getTimeStamp(self,handlePV): - cdef str _METHOD_="getTimeStamp" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef HandleHelper hh - - hh._etsNorm=self.hh.getEpicsTimeStampAsUInt32(handle) - - cpdef ll=[] - ll.append(hh._etsNorm.secPastEpoch) - ll.append(hh._etsNorm.nsec) - #print ("TimeStamp ", ll) - return ll - - ################################################################################## - def getTimeStampAsDate(self,handlePV): - cdef str _METHOD_="getimeStampAsDate" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef HandleHelper hh - cpdef ld=[] - - hh._etsDate =self.hh.getEpicsTimeStampAsDate(handle) - ld.append(hh._etsDate.year ) - ld.append(hh._etsDate.mon ) - ld.append(hh._etsDate.day ) - ld.append(hh._etsDate.hour ) - ld.append(hh._etsDate.min ) - ld.append(hh._etsDate.sec ) - ld.append(hh._etsDate.nsec ) - #print ("TimeStampAsDate ", ld) - return ld - - ################################################################################## - ### Allow user to choose whether or not to open ##### - cpdef checkForHandle(self, str pv, bint force=True): - cdef unsigned int _handle=0; - _handle=self.hh.getHandleFromPV(pv) - if _handle == 0: - if (force): - return self.open(pv) - else: - return 0 - else: - return _handle - ################################################################################## - - - ################################################################################## - cpdef checkForHandleList(self, list pvList, bint force=True): + if isinstance(pv, (list)): + for i in range(0, len(pv)): + if isinstance(pv[i], str): + pvV.push_back(pv[i]) + elif isinstance(pv[i], bytes): + pvV.push_back(pv[i].decode('utf_8') ) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("The pv name entered within list should be " + "of type or "))) + try: + if cb is not None: + for i in range(0, len(pvV)): + self.setPyCallbackConnect(pvV[i], cb) + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) - cdef unsigned int nToOpen=0 - handleList=[] - cdef unsigned int _handle=0 - for i in range(0, len(pvList)): - _handle=self.hh.getHandleFromPV(pvList[i]) - if _handle == 0: - if (force): - nToOpen=nToOpen+1; - self.openNoWait() - _handle=self.open(pvList[i]) - handleList.append(_handle) - else: - handleList.append(_handle) - if nToOpen > 0: - self.openNowAndWait(2.0+nToOpen*0.01) - return handleList - ################################################################################## - - - ################################################################################## - cpdef checkForGroupHandle(self, str gName, bint force=True): - cdef unsigned int _ghandle=0; - _ghandle=self.hh.getGroupHandleFromGroupName(gName) - if _ghandle == 0: - if (force): - return self.groupOpen(gName) - else: - return 0 - else: - return _ghandle - ################################################################################## - - - ################################################################################## - def getPVNameFromHandle(self, int h): - return self._c_cafe.getPVFromHandle(h) - ################################################################################## - - ################################################################################## - def getHandleFromPVName(self, str name): - #if type(name) is unicode: - # py_string = (name).encode('UTF-8') - # return self._c_cafe.getHandleFromPV(py_string) - return self._c_cafe.getHandleFromPV(name) - ################################################################################## - - - def getChannelDataStore(self, handlePV): - cdef str _METHOD_="getChannelDataStore" - cdef unsigned int handle=0 - cdef str pv="" - if isinstance(handlePV, (int,long)): - handle=handlePV - pv = self._c_cafe.getPVFromHandle(handle) - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV, force=True) - pv=handlePV - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def getChannelDataStore") - - cdef ChannelDataStore cds - cdef int status=ICAFE_NORMAL - - #with nogil: - # status=self._c_cafe.getChannelDataStore(handle,cds) - #cdef PVDataHolder pvd - #pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) - #status=self._c_cafe.getCache(handle, pvd) - - #cdef PVCtrlHolder pvc - #pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) - #status=self._c_cafe.getCtrlCache(handle, pvc) - - pvds=self.getPVCache(handle) - pvcs=self.getCtrlCache(handle) - infos=self.getChannelInfo(handle) - - ''' + IF PY_EXT_C: + with nogil: + status = self._c_cafe.openV(pvV, handleV) + ELSE: + #Gil acquired and released within conduit.h + #with nogil: + status = self._c_cafe.openV(pvV, handleV) + if not self.initCallbackComplete(handleV): + time.sleep(0.2) + else: + time.sleep(0.02) + except RuntimeError as e: + # Reset + if cb is not None: + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + + if isinstance(e.args, (tuple)): + # equivalent to e.what() + if 'CAFEException' in (e.args[0]): + errors = e.args[0].split(",") + if len(errors) > 5: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _pv_name=errors[1], _handle=int(errors[2]), + _error_code=int(errors[3]), + _error_text=errors[4], _error_info=errors[5]) + raise _cafeException + raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + + if cb is not None: + # Reset + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + return handleV + + elif not isinstance(pv, (bytes, str)): + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + "Input argument, pv, should be of type ")) + + cdef unsigned int handle = 0 + cdef vector[string] vecS + + cdef char * pvStr = pv + + if cb is not None: + self.setPyCallbackConnect(pv, cb) + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + try: + IF PY_EXT_C: + #print("OPEN WITH NO GIL==>", pvStr) + with nogil: + self._c_cafe.open(pvStr, handle) + #print("OPEN WITH NO GIL//==>", pvStr) + ELSE: + #Gil acquired and released within conduit.h + #with nogil: + self._c_cafe.open(pvStr, handle) + except RuntimeError as e: + # Reset + if cb is not None: + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + if isinstance(e.args, (tuple)): + if 'CAFEException' in (e.args[0]): + errors = e.args[0].split(",") # from e.what() + if len(errors) > 5: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _pv_name=errors[1], + _handle=int(errors[2]), _error_code=int(errors[3]), + _error_text=errors[4], _error_info=errors[5]) + raise _cafeException + + raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + + # Reset + if cb is not None: + self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + # A notch to allow for possible race condition + if not self._c_cafe.isChannelConnected(handle): + time.sleep(0.1) + else: + time.sleep(0.01) # Let pycallbacks complete + return handle + + ############################################################################ + def openNoWait(self): + # channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + # channelOpenPolicy.setWhenToFlushSendBuffer( + # FLUSH_DESIGNATED_TO_CLIENT) + with nogil: + self._c_cafe.openNoWait() + return + + def openPrepare(self): + # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + # FLUSH_DESIGNATED_TO_CLIENT) + with nogil: + self._c_cafe.openPrepare() + + def openGroupPrepare(self): + # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + # WITH_PEND_EVENT) + # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + # FLUSH_DESIGNATED_TO_CLIENT) + with nogil: + self._c_cafe.openGroupPrepare() + + def setOpenDefaultPendTime(self, double timeout): + return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + + def getOpenDefaultPendTime(self): + return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + ############################################################################ + + ############################################################################ + def openNow(self): + # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + with nogil: + self._c_cafe.openNow() + + ############################################################################# + + def openNowAndWait(self, double timeout=0, handlesPV=None): + cdef str _METHOD = "openNowAndWait" + + if timeout <=0 : + timeout = self._c_cafe.channelOpenPolicy.getTimeout() + + # self._c_cafe.channelOpenPolicy.setTimeout(timeout) + # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + # reset + # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + # self._c_cafe.channelOpenPolicy.setTimeoutToDefault() + + cdef vector[unsigned int] hList + cdef vector[string] pvV + cdef npoll = 0 + + if handlesPV is not None: + if isinstance(handlesPV, (list)): + for i in range(0, len(handlesPV)): + if isinstance(handlesPV[i], (int, long)): + hList.push_back(handlesPV[i]) + elif isinstance(handlesPV[i], (str)): + hList.push_back(self.getHandleFromPVName(handlesPV[i])) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("List input arguments, should be < type 'int' >" + + "if handle, else < type 'str' > if pv name"))) + elif isinstance(handlesPV, (int, long)): + hList.push_back(handlesPV) + elif isinstance(handlesPV, (str)): + hList.push_back(self.getHandleFromPVName(handlesPV)) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "Input argument, should be of type if handle, \ + else if pv name")) + with nogil: + self._c_cafe.openNowAndWaitHandleV(hList, timeout) + # Did all callbacks complete? wait 50ms + for i in range(0, 100): + if not self._c_cafe.initCallbackCompleteV(hList): + time.sleep(0.001) + npoll = npoll+1 + else: + break + # if npoll > 1: + # print("npoll in _c_cafe.initCallbackCompleteV(hList)", npoll) + + else: + with nogil: + self._c_cafe.openNowAndWait(timeout) + ###handleList, pvList = self.getHandles() + + self.hh.getHandles(hList, pvV) + # Did all callbacks complete? wait 10ms + for i in range(0, 100): + if not self._c_cafe.initCallbackCompleteV(hList): + time.sleep(0.001) + npoll = npoll+1 + else: + break + #print("npoll in self._c_cafe.initCallbackCompleteV(hList)", npoll) + + + ############################################################################ + + ############################################################################ + + def openGroupNowAndWait(self, double timeout=0): + if timeout <= 0: + self._c_cafe.channelOpenGroupPolicy.getTimeout() + # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + # self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + # reset + # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + # FLUSH_NOW) + # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + # WITH_PEND_EVENT) + # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + with nogil: + self._c_cafe.openGroupNowAndWait(timeout) + return + + ############################################################################ + + ############################################################################ + + def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): + cdef str _METHOD = "openGroupNowAndWaitForInputGroups" + + cdef vector[unsigned int] hList + + if isinstance(groupHandles, (list)): + for i in range(0, len(groupHandles)): + if isinstance(groupHandles[i], (int, long)): + hList.push_back(groupHandles[i]) + elif isinstance(groupHandles[i], (str)): + hList.push_back( + self.hh.getGroupHandleFromGroupName(groupHandles[i])) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + "List input arguments, should be of type \ + if group handle, else if group name")) + elif isinstance(groupHandles, (int, long)): + hList.push_back(groupHandles) + elif isinstance(groupHandles, (str)): + hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("Second input argument (if not a list), should be of " + "type if group handle, " + "else if group name"))) + + # list to vector + with nogil: + self._c_cafe.groupOpenNowAndWait(timeout, hList) + return + + ############################################################################ + + def openMonitorPrepare(self): + # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + # FLUSH_DESIGNATED_TO_CLIENT) + with nogil: + self._c_cafe.openMonitorPrepare() + return + + ############################################################################## + + def openMonitorNow(self): + # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + # reset + # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind( + # WITH_FLUSH_IO) + with nogil: + self._c_cafe.openMonitorNow() + time.sleep(0.01) + return + + ############################################################################ + + ############################################################################ + + cdef getMonitorWhenToFlushSendBuffer(self): + return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() + + ############################################################################ + + ############################################################################ + def openMonitorNowAndWait(self, double timeout): + cdef _METHOD = "openMonitorNowAndWait(timeout)" + # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + # time.sleep(timeout) + # reset + # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + + with nogil: + self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + + if timeout <= 0: + raise UserWarning \ + ("{} {} \n{} {}".format( + self._exception_text, _METHOD, + ("input argument, timeout, must be a positive number!\n" + "timeout reset to:"), self._min_timeout)) + + + ############################################################################ + + def ca_pend_event(self, double timeout): + cdef _METHOD = "ca_pend_event(timeout)" + + cdef double _timeout = timeout + if timeout <= 0: + _timeout = DEFAULT_TIMEOUT_PEND_EVENT + + self._c_cafe._ca_pend_event(_timeout) + + if timeout < 0: + raise UserWarning \ + ("{} {} \n{} {}".format( + self._exception_text, _METHOD, + ("input argument, timeout, must be a positive number!\n" + "timeout reset to CAFE default:"), _timeout)) + + def ca_pend_io(self, double timeout): + cdef _METHOD = "ca_pend_io(timeout)" + + cdef double _timeout = timeout + if timeout <= 0: + _timeout = DEFAULT_TIMEOUT_PEND_IO + + self._c_cafe._ca_pend_io(timeout) + + if timeout < 0: + raise UserWarning \ + ("{} {} \n{} {}".format( + self._exception_text, _METHOD, + ("input argument, timeout, must be a positive number!\n" + "timeout reset to CAFE default:"), _timeout)) + + def ca_poll(self): + with nogil: + self._c_cafe._ca_poll() + + + def ca_flush_io(self): + with nogil: + self._c_cafe._ca_flush_io() + + + ############################################################################ + def setChannelRequestPolicyGet( + self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + ChannelWaitForResponsePolicyKind wait, + ChannelRequestPolicyKind method, cb: object = None): + + cdef str _METHOD = "setChannelRequestPolicyGet" + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + global getDictGlobal + + cdef ChannelRequestPolicy crp + self.ph.getChannelRequestPolicyGet(handlePV, crp) + if when: + crp.setWhenToFlushSendBuffer(when) + if wait: + crp.setWaitKind(wait) + if method: + crp.setMethodKind(method) + if cb is not None: + getDictGlobal[handle] = cb + crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + + self.ph.setChannelRequestPolicyGet(handlePV, crp) + return + ################################################################################ + + ################################################################################ + + + def initCallbackComplete(self, handlePV): + cdef str _METHOD = "initCallbackComplete" + cdef vector[unsigned int] hList + + if isinstance(handlePV, (list)): + for i in range(0, len(handlePV)): + if isinstance(handlePV[i], (int, long)): + hList.push_back(handlePV[i]) + elif isinstance(handlePV[i], (str)): + hList.push_back(self.getHandleFromPV(handlePV[i])) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("List input arguments, should be of type if handle" + + "else if pvname"))) + return self._c_cafe.initCallbackCompleteV(hList) + + elif isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("Input argument should be of type if handle," + + "else if pvname"))) + + #print("cb complete", self._c_cafe.initCallbackCompleteHandle(handle)) + return self._c_cafe.initCallbackCompleteHandle(handle) + ############################################################################ + + ############################################################################ + def setCallbackGet(self, handlePV, object cb = None): + + cdef str _METHOD = "setCallbackGet" + + cdef ChannelRequestPolicy crp + self.ph.getChannelRequestPolicyGet(handlePV, crp) + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument should be of type if handle, \ + else if PV")) + + global getDictGlobal + if cb is not None: + getDictGlobal[handle] = cb + crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + else: + crp.setMethodKind(WITH_CALLBACK_DEFAULT) + + self.ph.setChannelRequestPolicyGet(handlePV, crp) + return + ############################################################################ + + ############################################################################ + def setCallbackPut(self, handlePV, object cb=None): + + cdef str _METHOD = "setCallbackPut" + + cdef ChannelRequestPolicy crp + self.ph.getChannelRequestPolicyPut(handlePV, crp) + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + + global putDictGlobal + if cb is not None: + putDictGlobal[handle] = cb + crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED + else: + crp.setMethodKind(WITH_CALLBACK_DEFAULT) + + self.ph.setChannelRequestPolicyPut(handlePV, crp) + return + ############################################################################ + + ############################################################################ + def setTimeout(self, timeout): + return self.ph.setTimeout(timeout) + ############################################################################ + + ############################################################################ + def getTimeoutGet(self): + cdef double minValue, p, g + minValue = 0 + p = 0 + g = 0 + self.ph.getTimeoutMin(p, g) + minValue = g + self.ph.getTimeoutMax(p, g) + if (g < minValue): + minValue = g + return minValue + ############################################################################ + + ############################################################################ + + def getTimeoutPut(self): + cdef double minValue, p, g + minValue = 0 + p = 0 + g = 0 + self.ph.getTimeoutMin(p, g) + minValue = p + self.ph.getTimeoutMax(p, g) + if (p < minValue): + minValue = g + return minValue + ############################################################################ + + ############################################################################ + + def setSelfGoverningTimeout(self, bint b): + return self.ph.setSelfGoverningTimeout(b) + ############################################################################ + + ############################################################################ + # Synchronous Groups + ############################################################################ + def setSGTimeout(self, double timeout): + return self.ph.setSGTimeout(timeout) + ############################################################################ + + ############################################################################ + def getSGTimeoutGet(self): + cdef double minValue, p, g + minValue = 0 + p = 0 + g = 0 + self.ph.getSGTimeoutMin(p, g) + minValue = g + self.ph.getSGTimeoutMax(p, g) + if (g < minValue): + minValue = g + + return minValue + ############################################################################ + + ############################################################################ + def getSGTimeoutPut(self): + cdef double minValue, p, g + minValue = 0 + p = 0 + g = 0 + self.ph.getSGTimeoutMin(p, g) + minValue = p + self.ph.getSGTimeoutMax(p, g) + if (p < minValue): + minValue = p + + return minValue + ############################################################################ + + ############################################################################ + def setSGSelfGoverningTimeout(self, bint b): + cdef PolicyHelper ph + return ph.setSGSelfGoverningTimeout(b) + ############################################################################ + + ############################################################################ + + def getContext(self, handlePV): + cdef str _METHOD = "getContext" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + return < long > self.hh.getContextFromHandle(handlePV) + elif isinstance(handlePV, (str)): + return < long > self.hh.getContextFromPV(handlePV) + else: + _cafeException = CafeException( + _type='TypeError', _source=_METHOD, + _error_info=( + "First input argument should be of type if handle, " + "else if PV")) + raise _cafeException + + + ############################################################################ + + def attachContext(self, handlePV): + cdef str _METHOD = "attachContext" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + return self._c_cafe.attachContextByHandle(handlePV) + elif isinstance(handlePV, (str)): + return self._c_cafe.attachContextByPVName(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + + + ############################################################################ + def collectionDefine(self, const char * cName, vector[string] cMembers): + with nogil: + self._c_cafe.collectionDefine(cName, cMembers) + + ############################################################################ + def defineCollection(self, const char * cName, vector[string] cMembers): + with nogil: + self._c_cafe.collectionDefine(cName, cMembers) + + ############################################################################ + def collectionList(self): + cdef vector[string] collectionList + with nogil: + self._c_cafe.collectionList(collectionList) + return collectionList + ############################################################################ + + ############################################################################ + def collectionMemberList(self, const char * cName): + cdef vector[string] cMemberList + with nogil: + self._c_cafe.collectionMemberList(cName, cMemberList) + return cMemberList + ############################################################################ + + + ############################################################################ + def loadCollectionsFromXML(self, const char * fileName): + with nogil: + self._c_cafe.loadCollectionsFromXML(fileName) + return + ############################################################################ + + ############################################################################ + + def loadGroupsFromXML(self, const char * fileName): + with nogil: + self._c_cafe.loadGroupsFromXML(fileName) + return + ############################################################################ + + def devicePositionMap(self, const char * collectionName): + p = [] + d = [] + cdef map[float, string] mmfs + cdef map[float, string].iterator it + self._c_cafe.devicePositionMap(collectionName, mmfs) + it = mmfs.begin() + tup = () # tuple + while it != mmfs.end(): + tup = deref(it) + p.append(tup[0]) + d.append(tup[1]) + inc(it) + return d, p + + def devicePositionV(self, const char * collectionName): + cdef str _METHOD = "devicePositionV" + # p=[] + # d=[] + cdef vector[string] dev + cdef vector[float] pos + status = self._c_cafe.devicePositionV(collectionName, dev, pos) + + if status != ICAFE_NORMAL: + raise Exception("{} {} {} {} {} {}".format( + self._exception_text, _METHOD, + "status=", status, self.cs.code(status), self.cs.code(status))) + + # for i in range (0, dev.size()): + # d.append(dev[i]) + # p.append(pos[i]) + return dev, pos + + ############################################################################ + + def groupList(self): + cdef vector[string] gList + # conservative guess + gList.reserve(36) + + self._c_cafe.groupList(gList) + + # Place in list to avoid this warning: + # warning: comparison between signed and unsigned integer expressions + # gl=[] + # for i in range (0, len(gList)): + # gl.append(gList[i]) + return gList + ############################################################################ + + def getDataTypeNative(self, handlePV): + cdef str _METHOD = "getDataTypeNative" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + + cdef long ndt = -1 + + self.hh.getDataTypeNative(handle, ndt) + return ndt + + def getDataTypeRequest(self, handlePV): + cdef str _METHOD = "getDataTypeRequest" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle,\ + else if PV")) + + cdef long rdt = -1 + self.hh.getDataTypeRequest(handle, rdt) + return rdt + + def getMonitorIDInCallback(self, handlePV): + cdef str _METHOD = "getMonitorIDInCallback" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + return self.hh.getUsrArgsAsUInt(handle) + + def getDataTypeInCallback(self, handlePV): + cdef str _METHOD = "getDataTypeInCallback" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + return < long > self.hh.getDataTypeCB(handle) + + def getDbrDataTypeInCallback(self, handlePV): + cdef str _METHOD = "getDbrDataTypeInCallback" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First input argument, should be of type if handle," + + "else if PV"))) + return < long > self.hh.getDbrDataTypeCB(handle) + + def getDbrBaseInCallback(self, handlePV): + cdef str _METHOD = "getDbrBaseInCallback" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First input argument, should be of type if handle," + + "else if PV"))) + return < unsigned int > self.hh.getCafeDbrTypeCB(handle) + + ############################################################################ + def getHandlesFromWithinGroup(self, gHandleName): + + cdef str _METHOD = "getHandlesFromWithinGroup" + + cdef unsigned int groupHandle = 0 + if isinstance(gHandleName, (int, long)): + groupHandle = gHandleName + elif isinstance(gHandleName, (str)): + groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First input argument, should be of type if group handle," + + "else if group name"))) + + cdef vector[unsigned int] hList + hList = self.hh.getHandlesFromWithinGroupV(groupHandle) + return hList + ############################################################################ + + ############################################################################ + + def close(self, handlePV): + cdef str _METHOD = "close" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First input argument, should be of type if handle," + + "else if PV"))) + + cdef int status + with nogil: + status = self._c_cafe.close(handle) + + return status + + ############################################################################ + def closeChannels(self): + cdef int status + with nogil: + status = self._c_cafe.closeChannels() + return status + + ############################################################################ + def closeHandles(self, list handleList): + cdef str _METHOD = "closeHandles" + if not handleList: + return ICAFE_NORMAL + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList, force=False) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "First input argument, should be a 'list' of of type \ + if handles or if PVs")) + + # Do this only to avoid compiler warnings + cdef vector[unsigned int] v + for i in range(0, len(handleList)): + v.push_back(handleList[i]) + cdef int status + with nogil: + status = self._c_cafe.closeHandlesV(v) + return status + + ############################################################################ + + def closeDisconnectedChannelsWithinGroup(self, ghandleName): + cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" + cdef vector[unsigned int] hList + cdef vector[unsigned int] disHandles + + if isinstance(ghandleName, (list)): + for i in range(0, len(ghandleName)): + if isinstance(ghandleName[i], (int, long)): + hList.push_back(ghandleName[i]) + elif isinstance(ghandleName[i], (str)): + hList.push_back(self.checkForGroupHandle(ghandleName[i])) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "List input arguments, should be of type \ + if group handle, else if group name")) + + elif isinstance(ghandleName, (int, long)): + hList.push_back(ghandleName) + elif isinstance(ghandleName, (str)): + hList.push_back(self.checkForGroupHandle(ghandleName)) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument (if not list), should be of type \ + if group handle, else if group name")) + + for i in range(0, len(hList)): + with nogil: + self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + hList[i]) + return + + ############################################################################ + def closeChannelKeepHandle(self, handlePV): + cdef str _METHOD = "closeChannelKeepHandle" + + cdef vector[unsigned int] hList + cdef int statusClose + + if isinstance(handlePV, (list)): + for i in range(0, len(handlePV)): + if isinstance(handlePV[i], (int, long)): + hList.push_back(handlePV[i]) + elif isinstance(handlePV[i], (str)): + hList.push_back(self.checkForHandle(handlePV[i])) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "List input arguments, should be of type \ + if group handle, else if group name")) + + elif isinstance(handlePV, (int, long)): + hList.push_back(handlePV) + elif isinstance(handlePV, (str)): + hList.push_back(self.checkForHandle(handlePV)) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument (if not list), should be of type \ + if handle, else if PV")) + + with nogil: + statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + return statusClose + + #def reconnect(self, vector[unsigned int] handleList): + def reconnect(self, list handleList): + cdef int status1 = ICAFE_NORMAL + cdef int status2 = ICAFE_NORMAL + cdef vector[unsigned int] v + v.reserve(len(handleList)) + for i in range(0, len(handleList)): + v.push_back(handleList[i]) + #print("Channels Closing...") + self.openMonitorPrepare() + + for i in range (0, len(handleList)): + self.monitorStop(handleList[i]) + + self.openMonitorNow() + time.sleep(0.05) + #with nogil: + # status= self._c_cafe.reconnect(handleList) + #print("Channels Closing...") + with nogil: + status1 = self._c_cafe.closeChannelsKeepHandles(v) + time.sleep(0.05) + #print("Channels Closed") + self.openPrepare() + with nogil: + status2 = self._c_cafe.openChannelsWithHandles(v) + #print("Channels Opened") + + self.openNowAndWait(self._c_cafe.channelOpenPolicy.getTimeout(), v) + #print("Channels Opened//", status1, status2) + time.sleep(0.05) + return max(status1, status2) + + ############################################################################ + + def allConnected(self): + return self._c_cafe.allChannelsConnected() + + ############################################################################ + + @verify_handlepv + def isConnected(self, handlePV): + cdef str _METHOD = "isConnected" + return self._c_cafe.isChannelConnected(handlePV) + + ############################################################################ + def supplementHandles(self, handleList=None): + cdef str _METHOD = "supplementHandles" + if handleList is None: + with nogil: + self._c_cafe.supplementHandles() + elif isinstance(handleList, (list)): + #Convert to vector + self.supplementHandlesV(handleList) + elif isinstance(handleList, (int, long, str)): + self.supplementHandle(handleList) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "Input argument, if given, should be if list of \ + handles or PVs, else of type if handle or if \ + PV. If no input argument, then all channels are supplemented.")) + + ############################################################################ + @verify_handlepv + def supplementHandle(self, handlePV): + #decorator casts to handlePV to int + cdef unsigned int handle = handlePV + with nogil: + self._c_cafe.supplementHandle(handle) + + ############################################################################ + + def supplementHandlesV(self, handleList): + cdef str _METHOD = "supplementHandlesV" + if isinstance(handleList, (str, int, long)): + hl = [] + hl.append(handleList) + #handleList = [] + handleList = hl + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument should be a 'list' of of type \ + if handles, else if PVs")) + cdef vector[unsigned int] v + for i in range(0, len(handleList)): + v.push_back(handleList[i]) + + with nogil: + self._c_cafe.supplementHandlesV(v) + + ############################################################################ + + def printDisconnected(self): + self._c_cafe.printDisconnectedHandles() + + def printDisconnectedHandles(self): + self._c_cafe.printDisconnectedHandles() + + ############################################################################ + def printHandles(self): + self._c_cafe.printHandles() + + ############################################################################ + @verify_handlepv + def printHandle(self, handlePV): + self._c_cafe.printHandle(handlePV) + + ############################################################################ + + ############################################################################ + def printHandlesV(self, list handleList): + cdef str _METHOD = "printHandlesV" + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be a 'list' of of type \ + if handles, else if PVs")) + + # Do this only to avoid compiler warnings + cdef vector[unsigned int] v + for i in range(0, len(handleList)): + v.push_back(handleList[i]) + self.hh.printHandlesV(v) + return + ############################################################################ + + ############################################################################ + def getDisconnectedHandles(self): + cdef vector[unsigned int] dhV + cdef vector[string] pvV + self.hh.getDisconnectedHandles(dhV, pvV) + return dhV, pvV + ############################################################################ + + ############################################################################ + + def getHandles(self, asDict=False): + cdef vector[unsigned int] dhV + cdef vector[string] pvV + self.hh.getHandles(dhV, pvV) + if asDict: + return dict(zip(dhV, pvV)) + else: + return dhV, pvV + ############################################################################ + + ############################################################################ + + def getHandleStates(self): + cdef vector[unsigned int] dhV + cdef vector[string] pvV + cdef vector[unsigned short] stateV + self.hh.getHandleStates(dhV, pvV, stateV) + return dhV, pvV, stateV + ############################################################################ + + ############################################################################ + def getStatusSeverity(self, int statusCode): + return self._c_cafe.getCafeStatusSeverity().message(statusCode) + + ############################################################################ + def getStatusCodeAsText(self, int statusCode): + return self.cs.code(statusCode) + + ############################################################################ + def getStatusCodeAsString(self, int statusCode): + return self.cs.code(statusCode) + + ############################################################################ + def getStatusInfo(self, int statusCode): + return self.cs.info(statusCode) + + ############################################################################ + def getStatusMsg(self, int statusCode): + return self.cs.message(statusCode) + + ############################################################################ + @verify_handlepv + def getStatus(self, handlePV): + return self.hh.getStatus(handlePV) + + ############################################################################ + def getChannelDevice(self, handlePV): + cdef str _METHOD = "getChannelDevice" + cdef string valString = str("") + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(pv=handlePV, force=False) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + if handle == 0: + valString = str("") + if isinstance(handlePV, (str)): + delSplit = handlePV.split(":") + if (len(delSplit) > 1): + valString = str(delSplit[0]) + else: + statusLocal = self.hh.getChannelDevice(handle, valString) + return valString + + ############################################################################ + def getChannelAttribute(self, handlePV): + cdef str _METHOD = "getChannelAttribute" + cdef string valString = str("") + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(pv=handlePV, force=False) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument, should be of type if handle, \ + else if PV")) + if handle == 0: + valString = str("") + if isinstance(handlePV, (str)): + delSplit = handlePV.split(":") + if (len(delSplit) > 1): + valString = str(delSplit[0]) + else: + statusLocal = self.hh.getChannelAttribute(handle, valString) + return valString + + ############################################################################ + + @verify_handlepv + def getDescription(self, handlePV): + cdef unsigned int handle = handlePV + if not self.hh.hasDescription(handle): + with nogil: + self._c_cafe.supplementHandle(handle) + cdef string valString + self.hh.getDescription(handle, valString) + return valString + + ############################################################################ + @verify_handlepv + def hasDescription(self, handlePV): + return self.hh.hasDescription(handlePV) + + ############################################################################ + @verify_handlepv + def getUnits(self, handlePV): + cdef string valString + self.hh.getUnits(handlePV, valString) + return valString + + ############################################################################ + @verify_handlepv + def getPrecision(self, handlePV): + cdef short precision = 0 + self.hh.getPrecision(handlePV, precision) + return precision + + ############################################################################ + @verify_handlepv + def hasAlarmStatusSeverity(self, handlePV): + return self.hh.hasAlarmStatusSeverity(handlePV) + + ############################################################################ + @verify_handlepv + def getAlarmStatusSeverity(self, handlePV): + cdef short aStatSev[2] + self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + return aStatSev[0], aStatSev[1] + + ############################################################################ + @verify_handlepv + def getTimeStamp(self, handlePV): + + cdef HandleHelper hh + hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV) + + cpdef ll = [] + ll.append(hh._etsNorm.secPastEpoch) + ll.append(hh._etsNorm.nsec) + + return ll + + ############################################################################ + @verify_handlepv + def getTimeStampAsDate(self, handlePV): + + cdef HandleHelper hh + cpdef ld = [] + + hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + ld.append(hh._etsDate.year) + ld.append(hh._etsDate.mon) + ld.append(hh._etsDate.day) + ld.append(hh._etsDate.hour) + ld.append(hh._etsDate.min) + ld.append(hh._etsDate.sec) + ld.append(hh._etsDate.nsec) + + return ld + + ############################################################################ + ### Allow user to choose whether or not to open ##### + cpdef checkForHandle(self, str pv, bint force=True): + cdef unsigned int _handle = 0 + _handle = self.hh.getHandleFromPV(pv) + if _handle == 0: + if (force): + return self.open(pv) + else: + return 0 + else: + return _handle + ############################################################################ + + ############################################################################ + cpdef checkForHandleList(self, list pvList, bint force=True): + + cdef unsigned int nToOpen = 0 + handleList = [] + cdef unsigned int _handle = 0 + for i in range(0, len(pvList)): + _handle = self.hh.getHandleFromPV(pvList[i]) + if _handle == 0: + if (force): + nToOpen = nToOpen+1 + self.openNoWait() + _handle = self.open(pvList[i]) + handleList.append(_handle) + else: + handleList.append(_handle) + if nToOpen > 0: + self.openNowAndWait(2.0+nToOpen*0.01) + return handleList + ############################################################################ + + ############################################################################ + cpdef checkForGroupHandle(self, str gName, bint force=True): + cdef unsigned int _ghandle = 0 + _ghandle = self.hh.getGroupHandleFromGroupName(gName) + if _ghandle == 0: + if (force): + return self.groupOpen(gName) + else: + return 0 + else: + return _ghandle + ############################################################################ + + ############################################################################ + + def getPVNameFromHandle(self, int h): + return self._c_cafe.getPVFromHandle(h) + ############################################################################ + + ############################################################################ + def getHandleFromPVName(self, str name): + # if type(name) is unicode: + # py_string = (name).encode('UTF-8') + # return self._c_cafe.getHandleFromPV(py_string) + return self._c_cafe.getHandleFromPV(name) + ############################################################################ + + ############################################################################ + + def getPVFromHandle(self, int h): + return self._c_cafe.getPVFromHandle(h) + ############################################################################ + + ############################################################################ + def getHandleFromPV(self, str name): + # if type(name) is unicode: + # py_string = (name).encode('UTF-8') + # return self._c_cafe.getHandleFromPV(py_string) + return self._c_cafe.getHandleFromPV(name) + ############################################################################ + + def getChannelDataStore(self, handlePV): + cdef str _METHOD = "getChannelDataStore" + cdef unsigned int handle = 0 + cdef str pv = "" + if isinstance(handlePV, (int, long)): + handle = handlePV + pv = self._c_cafe.getPVFromHandle(handle) + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV, force=True) + pv = handlePV + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument should be of type if handle, \ + else if PV")) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + raise Exception( + "EXCEPTION RAISED in PyCafe def getChannelDataStore") + + cdef ChannelDataStore cds + cdef int status = ICAFE_NORMAL + + # with nogil: + # status=self._c_cafe.getChannelDataStore(handle,cds) + # cdef PVDataHolder pvd + # pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) + #status=self._c_cafe.getCache(handle, pvd) + + # cdef PVCtrlHolder pvc + # pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) + #status=self._c_cafe.getCtrlCache(handle, pvc) + + pvds = self.getPVCache(handle) + pvcs = self.getCtrlCache(handle) + infos = self.getChannelInfo(handle) + + ''' #remove all after "." found=pv.find(".") if found != -1: @@ -1244,1040 +1812,1134 @@ cdef class CyCafe: print('handle',handleDesc, 'pv = ', pv) desc=self.get(handleDesc,'str') print('desc', desc) - ''' - ''' + + if status !=ICAFE_NORMAL: if status != ICAFE_CS_CLOSED: if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: self._c_cafe.printStatusMessage(status) raise Exception("EXCEPTION RAISED in PyCafe def getChannelDataStore. Status = %d" %status) - ''' - - #return cds.description, channelRegaliaToStruct(cds.info), PVDataHolderToStruct(cds.pvd), PVCtrlHolderToStruct(cds.pvc) - return infos, pvds, pvcs - - ################################################################################## - def getChannelInfo(self, handlePV): - cdef str _METHOD_="getChannelInfo" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV, force=True) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def getChannelInfo") - - cdef ChannelRegalia cr - status=self._c_cafe.getChannelInfo(handle,cr) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def getChannelInfo. Status = %d" %status) - - #cdef channelInfo ci=channelRegaliaToStruct(cr) - #ci.channelID=self._c_cafe.getChannelIDAsString(cr.getChannelID()) - #do hex(cr.getChannelID()) to get channelId in hex form - - return channelRegaliaToStruct(cr) - ################################################################################## - - def getChannelList(self, list listStrings): - return self._c_cafe.getFromGlobalChannelList(listStrings) - - ################################################################################## - - - - - ################################################################################## - def getWFAsString(self, handlePV, bint cache=False): - cdef str _METHOD_="getWFAsString" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - cdef string strWF - if (cache == True): - status=self._c_cafe.getWFAsStringCache(handle, strWF) - else: - with nogil: - status=self._c_cafe.getWFAsString(handle, strWF) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def %s. Status = %d" %_METHOD_,status) - - return strWF - - ################################################################################## - - - ################################################################################## - def getWFAsStringCache(self, handlePV): - return self.getWFAsString(handlePV, cache=True) - - ################################################################################## - - - ################################################################################## - - def getEnumStrings(self, handlePV): - cdef str _METHOD_="getEnumStrings" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - return self.hh.getEnumStrings(handle) - - - ################################################################################## - - def getEnumFromString(self, handlePV, str enumString): - cdef str _METHOD_="getEnumFromString" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - enumValue=self.hh.getEnumFromString(handle, enumString) - if enumValue == -1: - raise Exception("{} {} {} {} {}".format(self.exString, _METHOD_, \ - ": ENUM string value:", enumString, "not recognized! ")) - return enumValue - - ################################################################################## - - def getStringFromEnum(self, handlePV, int enumValue): - cdef str _METHOD_="getStringFromEnum" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - return self.hh.getStringFromEnum(handle, enumValue) - - ################################################################################## - - def loadSFGroups(self): - cdef bytes py_string - py_string = ('VA').encode('UTF-8') - #cdef vector[string] gnV - #gnV.push_back(py_string) - #return self._c_cafe.loadSFGroups(gnV[0]) - return self._c_cafe.loadSFGroups(py_string) - - def loadSFGroupsWithBase(self, str VA): - cdef bytes py_string - py_string = (VA).encode('UTF-8') - return self._c_cafe.loadSFGroups(py_string) - #return self._c_cafe.loadSFGroups(VA) - - - - - ################################################################################## - def setDbrBase(self, handlePV, DBR_TYPE dbrBase): - cdef str _METHOD_="setDbrBase" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - #Print Warning Message - if dbrBase > DBR_TIME: - print ("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") - print ("Allowed DBR_TYPEs are DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") - print ("The value entered was", dbrBase, "hence assuming DBR_TIME" ) - dbrBase=DBR_TIME - - return self.hh.setCafeDbrType(handle, dbrBase) - ################################################################################## - - - ################################################################################## - def getDbrBase(self, handlePV): - cdef str _METHOD_="getDbrBase" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - - cdef DBR_TYPE _cafeDbrType=DBR_PLAIN - cdef int status=self.hh.getCafeDbrType(handle,_cafeDbrType) - - return _cafeDbrType - - ################################################################################## - - - ################################################################################## - def setGetCacheWaitPolicy(self, handlePV, ChannelGetCacheWaitPolicyKind wpk): - cdef str _METHOD_="setGetCacheWaitPolicy" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - #Print Warning Message - if wpk > GET_CACHE_WAIT: - print ("WARNING: PyCafe def setGetCacheWaitPolicy(handle/PV, ChannelGetCacheWaitPolicyKind)") - print ("Allowed ChannelGetCacheWaitPolicyKind are GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), GET_CACHE_WAIT (2)") - print ("The value entered was", wpk, "hence assuming default value GET_CACHE_WAIT" ) - wpk=GET_CACHE_WAIT - - cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy - channelGetCacheWaitPolicy.setWaitKind(wpk) - - return self.ph.setChannelGetCacheWaitPolicy(handle,channelGetCacheWaitPolicy) - ################################################################################## - - ################################################################################## - def setGetCacheWaitPolicyAllHandles(self, ChannelGetCacheWaitPolicyKind wpk): - - #Print Warning Message - if wpk > GET_CACHE_WAIT: - print ("WARNING: PyCafe def setGetCacheWaitPolicyAllHandles(ChannelGetCacheWaitPolicyKind)") - print ("Allowed ChannelGetCacheWaitPolicyKind are GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), GET_CACHE_WAIT (2)") - print ("The value entered was", wpk, "hence assuming default value GET_CACHE_WAIT" ) - wpk=GET_CACHE_WAIT - - cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy - channelGetCacheWaitPolicy.setWaitKind(wpk) - - return self.ph.setChannelGetCacheWaitPolicyAllHandles(channelGetCacheWaitPolicy) - ################################################################################## - - ################################################################################## - def setGetActionWhenMonitorPolicy(self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): - cdef str _METHOD_="setGetActionWhenMonitorPolicy" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - #Print Warning Message - if wmpk > GET_FROM_IOC: - print ("WARNING: PyCafe def setGetActionWhenMonitorPolicy(handle/PV, ChannelGetActionWhenMonitorPolicyKind)") - print ("Allowed ChannelGetActionWhenMonitorPolicyKind are GET_FROM_CACHE (0), GET_FROM_IOC (1)") - print ("The value entered was", wmpk, "hence assuming default value GET_FROM_IOC" ) - wmpk=GET_FROM_IOC - - cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy - channelGetActionWhenMonitorPolicy.setActionKind(wmpk) - - return self.ph.setChannelGetActionWhenMonitorPolicy(handle,channelGetActionWhenMonitorPolicy) - ################################################################################## - - - ################################################################################## - def setGetActionWhenMonitorPolicyAllHandles(self, ChannelGetActionWhenMonitorPolicyKind wmpk): - - #Print Warning Message - if wmpk > GET_FROM_IOC: - print ("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles(ChannelGetActionWhenMonitorPolicyKind)") - print ("Allowed ChannelGetActionWhenMonitorPolicyKind are GET_FROM_CACHE (0), GET_FROM_IOC (1)") - print ("The value entered was", wmpk, "hence assuming default value GET_FROM_IOC" ) - wmpk=GET_FROM_IOC - - cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy - channelGetActionWhenMonitorPolicy.setActionKind(wmpk) - - return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles(channelGetActionWhenMonitorPolicy) - ################################################################################## - - ################################################################################## - def getNonBlocking(self, handlePV): - ################################################################################## - cdef str _METHOD_="getNonBlocking" - cdef unsigned int handle=0 - cdef int status - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - with nogil: - status=self._c_cafe.getNonBlocking(handle) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - raise Exception("EXCEPTION RAISED in PyCafe def getNonBlocking. Status = %d" %status) - - return status - ################################################################################## - - ################################################################################## - def getStr(self, handlePV, object cb=None): - return self.get(handlePV,dt='str') - ################################################################################## - - ################################################################################## - def getInt(self, handlePV, object cb=None): - return self.get(handlePV, dt='int') - ################################################################################## - - ################################################################################## - def getFloat(self, handlePV, object cb=None): - return self.get(handlePV, dt='float') - ################################################################################## - - ################################################################################## - def get(self, handlePV, str dt='native'): - ################################################################################## - cdef str _METHOD_ = "get" - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - cdef int status - cdef long dtr=0 - status=self.hh.getDataTypeNative(handle, dtr) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe', _source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - return None - - elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: - if self._c_cafe.isChannelConnected(handle) is False: - self._c_cafe.getChannelInfo(handle,self.channelInfo) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,self.channelInfo.getCafeConnectionState() ) - if self.haveExceptions: - #raise Exception("EXCEPTION RAISED in PyCafe def get. \ -#Channel Not Connected, status = %d" %self.channelInfo.getCafeConnectionState()) - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=self.channelInfo.getCafeConnectionState(), \ - _et=self.cs.code(self.channelInfo.getCafeConnectionState()), \ - _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) - raise Exception(_cyCafeException) - - - return None - - #Likely to be superfluous - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) - if self.haveExceptions: - _cyCafeException = CyCafeException(type='cafe', _source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) - raise Exception(_cyCafeException) - return None - - #global py_cb_handle_get - #if cb: - #py_cb_handle_get=cb - #self.setChannelRequestPolicyGet(handle, wait=WAIT, when=FLUSH_NOW, method=WITH_CALLBACK_USER_SUPPLIED, pcb=True) - - cdef unsigned int dtcheck = dtr - dtcheck=getMatchedDataType(dt, dtr) - - - - if dtcheck in [CAFE_STRING]: - with nogil: - status=self._c_cafe.getString(handle, self.valStr) - if status==ICAFE_NORMAL: - return self.valStr - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - with nogil: - status=self._c_cafe.getLong(handle, self.valInt) - if status==ICAFE_NORMAL: - return self.valInt - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - with nogil: - status=self._c_cafe.getDouble(handle, self.valFloat) - - if status==ICAFE_NORMAL: - return self.valFloat - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - if self._c_cafe.isEnum(handle): - with nogil: - status=self._c_cafe.getString(handle, self.valStr) - if status==ICAFE_NORMAL: - return self.valStr - else: - with nogil: - status=self._c_cafe.getLong(handle, self.valInt) - if status ==ICAFE_NORMAL: - return self.valInt - else: - print ("This line in PyCafe def get should never appear!") - return None - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - return None - - - ################################################################################## - #END: def get(self, handlePV, dt) - ################################################################################## - - - ################################################################################## - def getIntList(self, handlePV): - return self.getList(handlePV, 'int') - - ################################################################################## - def getFloatList(self, handlePV): - return self.getList(handlePV, 'float') - - ################################################################################## - def getStrList(self, handlePV): - return self.getList(handlePV, 'str') - - ################################################################################## - def getList(self, handlePV, str dt='native'): - cdef str _METHOD_="getList(handlePV, str dt='native')" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - - cdef int status - cdef long dtr=0 - - status=self.hh.getDataTypeNative(handle, dtr) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return [None] - - elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: - if self._c_cafe.isChannelConnected(handle) is False: - self._c_cafe.getChannelInfo(handle,self.channelInfo) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,self.channelInfo.getCafeConnectionState() ) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ - _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) - raise Exception(_cyCafeException) - return [None] - - #This paragraph should be superfluous - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) - raise Exception(_cyCafeException) - return [None] - - cdef unsigned int dtcheck = dtr - dtcheck=getMatchedDataType(dt, dtr) - - #print ("dtcheck", dtcheck) - - cdef unsigned int nelemNative =self.hh.getNelemNative (handle) - cdef unsigned int nelemClient =self.hh.getNelemClient (handle) - cdef unsigned int nelemRequest=self.hh.getNelemRequest(handle) - - - cdef unsigned int nelemMethod = nelemClient - - cdef dbr_string_t * valStringArray - cdef int * valIntArray - cdef double * valDoubleArray - - if dtcheck in [CAFE_STRING]: - - valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) - - with nogil: - status=self._c_cafe.getDbrStringArray(handle, valStringArray) - - ll=[] - for i in range(0,nelemMethod): - ll.append(valStringArray[i]) - free(valStringArray) - if status == ICAFE_NORMAL: - return ll - - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - - valIntArray = malloc( nelemMethod * sizeof(int)) - - with nogil: - status=self._c_cafe.getLongArray(handle, valIntArray) - - ll=[] - for i in range(0, nelemMethod): - ll.append(valIntArray[i]) - free(valIntArray) - if status == ICAFE_NORMAL: - return ll - - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - - valDoubleArray = malloc( nelemMethod * sizeof(double)) - - with nogil: - status=self._c_cafe.getDoubleArray(handle, valDoubleArray) - - ll=[] - for i in range(0, nelemMethod): - ll.append(valDoubleArray[i]) - free(valDoubleArray) - if status == ICAFE_NORMAL: - return ll - - elif dtcheck==CAFE_ENUM: - - #if enum, string taken as native - if self._c_cafe.isEnum(handle): - valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) - - with nogil: - status=self._c_cafe.getDbrStringArray(handle, valStringArray) - - ll=[] - for i in range(0,nelemMethod): - ll.append(valStringArray[i]) - free(valStringArray) - if status ==ICAFE_NORMAL: - return ll - else: - valIntArray = malloc( nelemMethod * sizeof(int)) - with nogil: - status=self._c_cafe.getLongArray(handle, valIntArray) - - ll=[] - for i in range(0,nelemMethod): - ll.append(valIntArray[i]) - free(valIntArray) - if status ==ICAFE_NORMAL: - return ll - #Will not happen; already covered above - elif dtcheck in [CAFE_NO_ACCESS,CAFE_TYPENOTCONN]: - print ("Channel", self._c_cafe.getPVFromHandle(handle), " not connected") - return None - else: - print ("This line in PyCafe def getAsList should never appear!") - return None - - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.withExceptions is False: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return None - - - ################################################################################## - def getStrArray(self, handlePV, str art='memoryview'): - return self.getArray(handlePV, dt='str', art=art) - ################################################################################## - - ################################################################################## - def getIntArray(self, handlePV, str art='memoryview' ): - return self.getArray(handlePV, dt='int', art=art) - ################################################################################## - - ################################################################################## - def getFloatArray(self, handlePV, str art='memoryview'): - return self.getArray(handlePV, dt='float', art=art ) - ################################################################################## - - ################################################################################## - def getArray(self, handlePV, str dt='native', str art='memoryview'): - ################################################################################## - #Typed Memoryviews from K.W. Smith - #Cython has a C-level type the typed memoryview, that conceptually overlaps - #with the Python memoryiew and expands on it. A typed memory view is used to - #view (share) data from a buffer-producing object. - #A typed memoryview has a memory-view like interface and is easier to use than - #working with C-level buffers directly. And because a typed memoryview is designed - #to work with the buffer protocol it supports any buffer-producing object efficiently - #allowing sharing of data buffers without copying - #If we declare a typed memoryview with a single colon in each dimension's slot, - #the typed mv can acquire a buffer from an object if the same dimensionality and with - #either strided or contiguous packing. - #Declaring a C-contiguous typed memoryview: all dimensions except the last is specified - #with two colons followed by a literal 1. The mnemonic is that the last dimension has - #a unitary stride, i.e., is contiguous in memory, hence C contiguous - - cdef str _METHOD_="getArray" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - cdef: - short * i16val - - int * ival - double * dval - float * fval - dbr_string_t * sval - cnp.int16_t [::1] mvShort #C-contiguous - int [::1] mvInt #C-contiguous - double [::1] mvDouble #C-contiguous - float [::1] mvFloat #C-contiguous - #str [:,::1] mvStr - cnp.ndarray arr - long dtr=0 - int status - #cvarray mvDoubleArray - - unsigned int i - unsigned int ij - array.array a - - cnp.uint8_t [::1] mvUInt8 #C-contiguous - cnp.int8_t [::1] mvInt8 #C-contiguous - cnp.uint16_t [::1] mvUInt16 #C-contiguous - cnp.int16_t [::1] mvInt16 #C-contiguous - cnp.uint32_t [::1] mvUInt32 #C-contiguous - cnp.int32_t [::1] mvInt32 #C-contiguous - cnp.uint64_t [::1] mvUInt64 #C-contiguous - cnp.int64_t [::1] mvInt64 #C-contiguous - #cnp.float16_t [::1] mvFloat16 #C-contiguous - cnp.float32_t [::1] mvFloat32 #C-contiguous - cnp.float64_t [::1] mvFloat64 #C-contiguous - - - - #cdef PVDataHolder pvd - - status=self.hh.getDataTypeNative(handle, dtr) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return [None] - - elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: - if self._c_cafe.isChannelConnected(handle) is False: - self._c_cafe.getChannelInfo(handle,self.channelInfo) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,self.channelInfo.getCafeConnectionState() ) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ - _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) - raise Exception(_cyCafeException) - return [None] - - #Likely to be superfluous - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) - raise Exception(_cyCafeException) - return [None] - - cdef unsigned int dtcheck = dtr - - dtcheck=getMatchedDataType(dt, dtr) - - cdef unsigned int nelemNative = self.hh.getNelemNative (handle) - cdef unsigned int nelemClient = self.hh.getNelemClient (handle) - cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) - - cdef unsigned int nelemMethod = nelemClient - cdef unsigned int nelemMemory = nelemClient #previously nelemNative - has to be at least size of nelemClient - - #print('native', self.hh.getNelemNative(handle)) - #print('client', self.hh.getNelemClient(handle)) - #print('request',self.hh.getNelemRequest(handle)) - - #print ('dtcheck', dtcheck) - - #cdef double [::1] cyarr_view - #The element type of a typed memoryview may be a numeric scalar type (int, float) - #It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct - - if dtcheck in [CAFE_STRING, CAFE_ENUM]: - sval = malloc( nelemMemory * sizeof(dbr_string_t)) - with nogil: - status=self._c_cafe.getDbrStringArray(handle, sval) - - #http://cython.readthedocs.org/en/latest/src/tutorial/numpy.html - #Some data types are not yet supported, like boolean arrays and string arrays. - - locallist=[] - - if status==ICAFE_NORMAL: - - if art in ['numpy','ndarray','numpy.ndarray']: - - ###elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: - - mvStr = np.empty(nelemMethod, dtype=(np.str_,40)) - #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') - - for i in range(0, nelemMethod): - #print sval[i].decode('utf8'), i - mvStr[i]=str(sval[i]) #.decode('utf8') - #locallist.append(sval[i]) - - free(sval) - - return np.array(mvStr) - - elif art in ['memoryview','mv','memoryviewslice']: - mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') - - for ij in range(0, nelemMethod): - mvStr[ij]=str(sval[ij]) - free(sval) - - return memoryview(mvStr) - - elif art in ['array','array.array']: - print ("PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") - #RETURNING LIST - DOES NOT SUPPORT array of strings; - #arrayArray=array.array('u', 'hello \u2641') - arrayArray=[] - for ij in range(0, nelemMethod): - arrayArray.append(str(sval[ij])) - free(sval) - return arrayArray - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_char_p*nelemMethod)() #c_wchar_p is unicode! - for ij in range(0, nelemMethod): - ctypesArray[ij]=(sval[ij]).encode('utf-8') - free(sval) - return ctypesArray - - else: - print("Unknown array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') - for ij in range(0, nelemMethod): - mvStr[ij]=sval[ij] - free(sval) - - return mvStr - - - elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: - - - i16val = malloc(nelemMemory * sizeof(np.int16)) - with nogil: - status=self._c_cafe.getShortArray(handle, i16val) - - 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']: - - # ##mvInt=ival - # ##arr = np.ascontiguousarray(mvInt) - # ##set_base(arr, ival) - - 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]=i16val[ij] - free(i16val) - return np.array(mvShort) - - elif dt in ['np.int8','np.bool_','np.byte','bool','byte']: - mvInt8 = np.empty(nelemMethod, dtype=np.int8, order='C') - for ij in range(0, nelemMethod): - mvInt8[ij]=i16val[ij] - free(i16val) - return np.array(mvInt8) - - - elif dt in ['uchar','np.uint8']: - mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') - for ij in range(0, nelemMethod): - mvUInt8[ij]=i16val[ij] - free(i16val) - return np.array(mvUInt8) - - else: - - mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') - #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') - for ij in range(0, nelemMethod): - mvShort[ij]=i16val[ij] - #mvShortNP=cnp.asarray(i16val) - - #aaa=np.full(nelemMethod,i16val[ij] - free(i16val) - - return memoryview(mvShort) - - elif art in ['array','array.array']: - - a=array.array('h') - for ij in range(0, nelemMethod): - a.append(i16val[ij]) - free(i16val) - return a - - elif art in ['ctypes', 'ctype']: - - ctypesArray16=(ctypes.c_int16*nelemMethod)() - for ij in range(0, nelemMethod): - ctypesArray16[ij]=i16val[ij] - free(i16val) - return ctypesArray16 - - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') - for ij in range(0, nelemMethod): - mvShort[ij]=i16val[ij] - free(i16val) - - return mvShort - - - elif dtcheck in [CAFE_LONG]: - - ival = malloc( nelemMemory * sizeof(np.int32)) - with nogil: - status=self._c_cafe.getLongArray(handle, ival) - - if status==ICAFE_NORMAL: - #np.empty preferred, else mvInt does not get correct value for first couple of array elements - - #nelemMethod=self.hh.getnelemMethod(handle) - - if art in ['numpy','ndarray','numpy.ndarray']: - - -##elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: - - - if dt in ['np.int32','int32']: - mvInt32 = np.empty(nelemMethod, dtype=np.int32, order='C') - for ij in range(0, nelemMethod): - mvInt32[ij]=ival[ij] - free(ival) - return np.array(mvInt32) # - elif dt in ['np.uint32','uint32']: - mvUInt32 = np.empty(nelemMethod, dtype=np.uint32, order='C') - for ij in range(0, nelemMethod): - mvUInt32[ij]=ival[ij] - free(ival) - return np.array(mvUInt32) - - - #elif dt in ['np.int64','int64']: - # mvInt64 = np.empty(nelemMethod, dtype=np.int64, order='C') - # for ij in range(0, nelemMethod): - # mvInt64[ij]=ival[ij] - # free(ival) - # return np.array(mvInt64) # - #elif dt in ['np.uint64','uint64']: - # mvUInt64 = np.empty(nelemMethod, dtype=np.uint64, order='C') - # for ij in range(0, nelemMethod): - # mvUInt64[ij]=ival[ij] - # free(ival) - # return np.array(mvUInt64) - - - else: - mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') - for ij in range(0, nelemMethod): - mvInt[ij]=ival[ij] - free(ival) - return np.array(mvInt) #arr - - elif art in ['memoryview','mv','memoryviewslice']: - mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') - for ij in range(0, nelemMethod): - mvInt[ij]=ival[ij] - free(ival) - return memoryview(mvInt) - - elif art in ['array','array.array']: - a=array.array('h') - for ij in range(0, nelemMethod): - a.append(ival[ij]) - free(ival) - return a - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_int32*nelemMethod)() - for ij in range(0, nelemMethod): - ctypesArray[ij]=ival[ij] - free(ival) - return ctypesArray - - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') - for ij in range(0, nelemMethod): - mvInt[ij]=ival[ij] - free(ival) - return mvInt - - - elif dtcheck in [CAFE_FLOAT]: - - fval = malloc( nelemMemory * sizeof(float)) - start=time.time() - with nogil: - status=self._c_cafe.getFloatArray(handle, fval) + ''' + + # return cds.description, channelRegaliaToStruct(cds.info), PVDataHolderToStruct(cds.pvd), PVCtrlHolderToStruct(cds.pvc) + return infos, pvds, pvcs + + ############################################################################ + @verify_handlepv + def getChannelInfo(self, handlePV): + cdef str _METHOD = "getChannelInfo(handlePV)" + + status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + if self._enable_exceptions and status != ICAFE_NORMAL: + PyCafeException = self.prepareCafeException( + status, _METHOD, handle=handlePV) + raise PyCafeException + # cdef channelInfo ci=channelRegaliaToStruct(cr) + # ci.channelID=self._c_cafe.getChannelIDAsString(cr.getChannelID()) + # do hex(cr.getChannelID()) to get channelId in hex form + + return channelRegaliaToStruct(self.channelInfo) + ############################################################################ + + + def getChannelList(self, list listStrings): + return self._c_cafe.getFromGlobalChannelList(listStrings) + + ################################################################################## + + ################################################################################## + @verify_handlepv + def getWFAsString(self, handlePV, cache: bool = False): + cdef str _METHOD = "getWFAsString" + cdef string strWF + + cdef bytes bWF + cdef unsigned int handle = handlePV + if cache: + status = self._c_cafe.getWFAsStringCache(handle, strWF) + else: + with nogil: + status = self._c_cafe.getWFAsString(handle, strWF) + + #mport codecs + #new_str = codecs.decode(strWF.c_str(), 'utf-32', errors='strict') #unicode_escape_decode(strWF)[0] + #new_str = ("'" + strWF + "'").decode('latin-1') + #print(new_str) + #new_new_str = new_str.encode('utf-16', 'surrogatepass').decode('utf-16') + #strWF= new_new_str + + + + + #PyCafeException = self.prepareCafeException( + # status, _METHOD, handle=handle) + ##FOR TESTINg raise PyCafeException + + if status != ICAFE_NORMAL: + + if self._enable_exceptions: + PyCafeException = self.prepareCafeException( + status, _METHOD, handle=handle) + raise PyCafeException + + elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + + bWF = strWF + a = (bWF).decode('latin-1') + return a + ''' + b = a.encode('latin-1') + + try: + c = b.decode('utf-8') + return c + except UnicodeError: + return a + ''' + + ############################################################################ + + ############################################################################ + + def getWFAsStringCache(self, handlePV): + return self.getWFAsString(handlePV, cache=True) + + ############################################################################ + + ############################################################################ + @verify_handlepv + def isEnum(self, handlePV): + return self._c_cafe.isEnum(handlePV) + ############################################################################ + + ############################################################################ + @verify_handlepv + def getEnumStrings(self, handlePV): + return self.hh.getEnumStrings(handlePV) + + ############################################################################ + @verify_handlepv + def getEnumFromString(self, handlePV, str enumString): + cdef str _METHOD = "getEnumFromString" + cdef short enumValue + enumValue = self.hh.getEnumFromString(handlePV, enumString) + if enumValue == INVALID_ENUM_RETURN_VALUE: + raise ValueError( + "{0} {1} \n{2} {3} {4} \n{5}".format( + self._exception_text, _METHOD, + "ENUM string value:", enumString, "not recognized! ", + "Execute getEnumStrings(handlePV) to view enumerated values")) + return enumValue + + ############################################################################ + @verify_handlepv + def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + cdef str _METHOD = "getStringFromEnum" + cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + if enumString == INVALID_ENUM_RETURN_STRING: + raise ValueError( + "{} {} \n{} {} {} \n{}".format( + self._exception_text, _METHOD, + "ENUM value:", enumValue, "is not a valid option. ", + "Execute getEnumStrings(handlePV) to view enumerated values")) + return enumString + + ############################################################################ + + def loadSFGroups(self): + cdef str VA = 'VA' + return self._c_cafe.loadSFGroups( VA) + + def loadSFGroupsWithBase(self, str VA): + return self._c_cafe.loadSFGroups( VA) + + + ############################################################################ + @verify_handlepv + def setDbrBase(self, handlePV, DBR_TYPE dbrBase): + + # Print Warning Message + if dbrBase > DBR_TIME: + print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + print("Allowed DBR_TYPEs are:") + print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + print("The value entered was", dbrBase, "hence assuming DBR_TIME") + dbrBase = DBR_TIME + + return self.hh.setCafeDbrType(handlePV, dbrBase) + ############################################################################ + + ############################################################################ + @verify_handlepv + def getDbrBase(self, handlePV): + + cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) + + return _cafeDbrType + + ############################################################################ + + ############################################################################ + @verify_handlepv + def setGetCacheWaitPolicy( + self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + + # Print Warning Message + if wpk > GET_CACHE_WAIT: + print( + ("WARNING: PyCafe def setGetCacheWaitPolicy(" + "handle/PV, ChannelGetCacheWaitPolicyKind)")) + print("Allowed ChannelGetCacheWaitPolicyKind are:") + print( + ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + "GET_CACHE_WAIT (2)")) + print( + "The value entered was", wpk, + "hence assuming default value GET_CACHE_WAIT") + wpk = GET_CACHE_WAIT + + cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + channelGetCacheWaitPolicy.setWaitKind(wpk) + + return self.ph.setChannelGetCacheWaitPolicy( + handlePV, channelGetCacheWaitPolicy) + ############################################################################ + + ############################################################################ + def setGetCacheWaitPolicyAllHandles( + self, ChannelGetCacheWaitPolicyKind wpk): + + # Print Warning Message + if wpk > GET_CACHE_WAIT: + print( + "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + ChannelGetCacheWaitPolicyKind)") + print("Allowed ChannelGetCacheWaitPolicyKind are:") + print( + "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + GET_CACHE_WAIT (2)") + print( + "The value entered was", wpk, + "hence assuming default value GET_CACHE_WAIT") + wpk = GET_CACHE_WAIT + + cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + channelGetCacheWaitPolicy.setWaitKind(wpk) + + return self.ph.setChannelGetCacheWaitPolicyAllHandles( + channelGetCacheWaitPolicy) + ############################################################################ + + ############################################################################ + @verify_handlepv + def setGetActionWhenMonitorPolicy( + self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + + # Print Warning Message + if wmpk > GET_FROM_IOC: + print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + print("The value entered was", wmpk, + "hence assuming default value GET_FROM_IOC") + wmpk = GET_FROM_IOC + + cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + + return self.ph.setChannelGetActionWhenMonitorPolicy( + handlePV, channelGetActionWhenMonitorPolicy) + ############################################################################ + + ############################################################################ + def setGetActionWhenMonitorPolicyAllHandles( + self, ChannelGetActionWhenMonitorPolicyKind wmpk): + + # Print Warning Message + if wmpk > GET_FROM_IOC: + print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + print( + "The value entered was", wmpk, + "hence assuming default value GET_FROM_IOC") + wmpk = GET_FROM_IOC + + cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + + return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( + channelGetActionWhenMonitorPolicy) + ############################################################################ + + ############################################################################ + @verify_handlepv + def getNonBlocking(self, handlePV): + '''Requires cafe.ca_flush_io by user. + In this resepct, it differs from cafe.getAsync + which will accepts a list, and execute a flush + at the end. + ''' + cdef unsigned int handle = handlePV + cdef int status + + with nogil: + status = self._c_cafe.getNonBlocking(handle) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + raise Exception( + "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + Status = {0}".format(status)) + + return status + ############################################################################ + + ############################################################################ + def getStr(self, handlePV, object cb=None): + return self.get(handlePV, dt='str') + ############################################################################ + + ############################################################################ + def getInt(self, handlePV, object cb=None): + return self.get(handlePV, dt='int') + ############################################################################ + + ############################################################################ + def getFloat(self, handlePV, object cb=None): + return self.get(handlePV, dt='float') + ############################################################################ + + def caget(self, str pv_name, str dt='native'): + return self.get(pv_name, dt) + + def caput(self, str pv_name, pv_value): + return self.set(pv_name, pv_value) + + ############################################################################ + @verify_handlepv + def get(self, handlePV = 0, str dt='native'): + cdef str _METHOD = "get(handlePV, dt)" + + cdef unsigned int handle = handlePV + cdef int status + cdef long dtr = 0 + + status = self.hh.getDataTypeNative(handle, dtr) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + raise _cafeException + return None + + elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + if not self._c_cafe.isChannelConnected(handle): + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus( + handle, self.channelInfo.getCafeConnectionState()) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=self.channelInfo.getCafeConnectionState(), + _error_text=self.cs.code( + self.channelInfo.getCafeConnectionState()), + _error_info=self.cs.info( + self.channelInfo.getCafeConnectionState())) + raise _cafeException + + return None + + # Likely to be superfluous + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + if self._enable_exceptions: + _cafeException = CafeException( + type='cafe', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=ICAFE_TYPENOTCONN, + _error_text=self.cs.code(ICAFE_TYPENOTCONN), + _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + raise _cafeException + return None + + + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + and dtr in [DBR_CHAR] and dt in ['str']: + return self.getWFAsString(handle) + + cdef unsigned int dtcheck = dtr + dtcheck = getMatchedDataType(dt, dtr) + + + if dtcheck in [CAFE_STRING]: + with nogil: + status = self._c_cafe.getString(handle, self.valStr) + if status == ICAFE_NORMAL: + return self.valStr + elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + with nogil: + status = self._c_cafe.getLong(handle, self.valInt) + if status == ICAFE_NORMAL: + return self.valInt + elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + with nogil: + status = self._c_cafe.getDouble(handle, self.valFloat) + + if status == ICAFE_NORMAL: + return self.valFloat + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + if self._c_cafe.isEnum(handle): + with nogil: + status = self._c_cafe.getString(handle, self.valStr) + if status == ICAFE_NORMAL: + return self.valStr + else: + with nogil: + status = self._c_cafe.getLong(handle, self.valInt) + if status == ICAFE_NORMAL: + return self.valInt + else: + print("This line in PyCafe def get should never appear!") + return None + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + return None + + ############################################################################ + # END: def get(self, handlePV, dt) + ############################################################################ + + ############################################################################ + def getIntList(self, handlePV): + return self.getList(handlePV, 'int') + + ############################################################################ + def getFloatList(self, handlePV): + return self.getList(handlePV, 'float') + + ############################################################################ + def getStrList(self, handlePV): + return self.getList(handlePV, 'str') + + ############################################################################ + @verify_handlepv + def getList(self, handlePV, str dt='native'): + cdef str _METHOD = "getList" + cdef unsigned int handle = handlePV + + cdef int status + cdef long dtr = 0 + + status = self.hh.getDataTypeNative(handle, dtr) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + return [None] + + elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + if not self._c_cafe.isChannelConnected(handle): + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus( + handle, self.channelInfo.getCafeConnectionState()) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=self.channelInfo.getCafeConnectionState(), + _error_text=self.cs.code( + self.channelInfo.getCafeConnectionState()), + _error_info=self.cs.info( + self.channelInfo.getCafeConnectionState())) + raise _cafeException + return [None] + + # This paragraph should be superfluous + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD,_handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=ICAFE_TYPENOTCONN, + _error_text=self.cs.code(ICAFE_TYPENOTCONN), + _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + raise _cafeException + return [None] + + cdef unsigned int dtcheck = dtr + dtcheck = getMatchedDataType(dt, dtr) + + #print ("dtcheck input/native", dtcheck, dt, dtr) + + cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + + cdef unsigned int nelemMethod = nelemClient + + cdef dbr_string_t * valStringArray + cdef dbr_long_t * valIntArray + cdef dbr_char_t * valCharAray + cdef dbr_enum_t * valUShortArray + cdef double * valDoubleArray + cdef float * valFloatArray + cdef short * valShortArray + # cdef vector[short] valShortVector + # cdef vector[float] valFloatVector + + if dtcheck in [CAFE_STRING]: + + valStringArray = malloc( + nelemMethod * sizeof(dbr_string_t)) + + with nogil: + status = self._c_cafe.getDbrStringArray(handle, valStringArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valStringArray[i]) + free(valStringArray) + if status == ICAFE_NORMAL: + return ll + + elif dtcheck in [CAFE_CHAR]: + + valCharArray = malloc( + nelemMethod * sizeof(dbr_char_t)) + + with nogil: + status = self._c_cafe.getCharArray(handle, valCharArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valCharArray[i]) + free(valCharArray) + if status == ICAFE_NORMAL: + return ll + + elif dtcheck in [CAFE_LONG]: + + valIntArray = malloc( + nelemMethod * sizeof(dbr_long_t)) + + with nogil: + status = self._c_cafe.getLongArray(handle, valIntArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valIntArray[i]) + free(valIntArray) + if status == ICAFE_NORMAL: + return ll + + elif dtcheck in [CAFE_SHORT]: + + valShortArray = malloc(nelemMethod * sizeof(short)) + + with nogil: + status = self._c_cafe.getShortArray(handle, valShortArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valShortArray[i]) + free(valShortArray) + if status == ICAFE_NORMAL: + return ll + elif dtcheck in [CAFE_FLOAT]: + ''' + valFloatVector.reserve(nelemMethod) + start=time.time() + for i in range (0, 10000): + with nogil: + status=self._c_cafe.getFloatVector(handle, valFloatVector) + end=time.time() + print ("END TIME FLOAT", end - start) + return valFloatVector + ''' + + # Speedier than vectors + valFloatArray = malloc(nelemMethod * sizeof(float)) + # start=time.time() + # for i in range (0, 10000): + + with nogil: + status = self._c_cafe.getFloatArray(handle, valFloatArray) + + # end=time.time() + #print ("END TIME FLOAT", end - start) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valFloatArray[i]) + free(valFloatArray) + if status == ICAFE_NORMAL: + return ll + + elif dtcheck in [CAFE_DOUBLE]: + + valDoubleArray = malloc(nelemMethod * sizeof(double)) + + with nogil: + status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valDoubleArray[i]) + free(valDoubleArray) + if status == ICAFE_NORMAL: + return ll + + elif dtcheck == CAFE_ENUM: + + # if enum, string taken as native + if self._c_cafe.isEnum(handle): + valStringArray = malloc( + nelemMethod * sizeof(dbr_string_t)) + + with nogil: + status = self._c_cafe.getDbrStringArray( + handle, valStringArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valStringArray[i]) + free(valStringArray) + if status == ICAFE_NORMAL: + return ll + else: + valUShortArray = malloc( + nelemMethod * sizeof(dbr_enum_t)) + with nogil: + status = self._c_cafe.getUShortArray( + handle, valUShortArray) + + ll = [] + for i in range(0, nelemMethod): + ll.append(valUShortArray[i]) + free(valUShortArray) + if status == ICAFE_NORMAL: + return ll + # Will not happen; already covered above + elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + print("Channel", self._c_cafe.getPVFromHandle( + handle), " not connected") + return None + else: + print("This line in PyCafe def getAsList should never appear!") + return None + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions is False: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, + _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + return None + + ################################################################################## + + def getStrArray(self, handlePV, str art='numpy'): + return self.getArray(handlePV, dt='str', art=art) + ############################################################################ + + ############################################################################ + def getIntArray(self, handlePV, str art='numpy'): + return self.getArray(handlePV, dt='int', art=art) + ############################################################################ + + ############################################################################ + def getFloatArray(self, handlePV, str art='numpy'): + return self.getArray(handlePV, dt='float', art=art) + ############################################################################ + + ############################################################################ + @verify_handlepv + def getArray(self, handlePV, str dt='native', str art='numpy'): + ############################################################################ + # Typed Memoryviews from K.W. Smith + # Cython has a C-level type the typed memoryview, that conceptually overlaps + # with the Python memoryiew and expands on it. A typed memory view is used + # to view (share) data from a buffer-producing object. + # A typed memoryview has a memory-view like interface and is easier to use + # than working with C-level buffers directly. And because a typed memoryview + # is designated to work with the buffer protocol it supports any buffer- + # producing object efficiently allowing data buffers to be shared without + # copying. + # If we declare a typed memoryview with a single colon in each dimension's + # slot, the typed mv can acquire a buffer from an object if the same + # dimensionality and with either strided or contiguous packing. + # Declaring a C-contiguous typed memoryview: all dimensions except the last + # is specified with two colons followed by a literal 1. The mnemonic is that + # the last dimension has a unitary stride, i.e., is contiguous in memory, + # hence C contiguous. + + cdef str _METHOD = "getArray" + cdef unsigned int handle = handlePV + ''' + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument should be of type if handle, \ + else if PV")) + ''' + cdef: + short * i16val + + int * ival + double * dval + float * fval + dbr_string_t * sval + cnp.int16_t[::1] mvShort # C-contiguous + int[::1] mvInt # C-contiguous + double[::1] mvDouble # C-contiguous + float[::1] mvFloat # C-contiguous + # str [:,::1] mvStr + cnp.ndarray arr + long dtr = 0 + int status + # cvarray mvDoubleArray + + unsigned int i + unsigned int ij + array.array a + + cnp.uint8_t[::1] mvUInt8 # C-contiguous + cnp.int8_t[::1] mvInt8 # C-contiguous + cnp.uint16_t[::1] mvUInt16 # C-contiguous + cnp.int16_t[::1] mvInt16 # C-contiguous + cnp.uint32_t[::1] mvUInt32 # C-contiguous + cnp.int32_t[::1] mvInt32 # C-contiguous + cnp.uint64_t[::1] mvUInt64 # C-contiguous + cnp.int64_t[::1] mvInt64 # C-contiguous + # cnp.float16_t [::1] mvFloat16 #C-contiguous + cnp.float32_t[::1] mvFloat32 # C-contiguous + cnp.float64_t[::1] mvFloat64 # C-contiguous + + # cdef PVDataHolder pvd + + status = self.hh.getDataTypeNative(handle, dtr) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + return [None] + + elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + if self._c_cafe.isChannelConnected(handle) is False: + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus( + handle, self.channelInfo.getCafeConnectionState()) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=self.channelInfo.getCafeConnectionState(), + _error_text=self.cs.code( + self.channelInfo.getCafeConnectionState()), + _error_info=self.cs.info( + self.channelInfo.getCafeConnectionState())) + raise _cafeException + return [None] + + # Likely to be superfluous + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=ICAFE_TYPENOTCONN, + _error_text=self.cs.code(ICAFE_TYPENOTCONN), + _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + raise _cafeException + return [None] + + cdef unsigned int dtcheck = dtr + + dtcheck = getMatchedDataType(dt, dtr) + + cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + + cdef unsigned int nelemMethod = nelemClient + # previously nelemNative - has to be at least size of nelemClient + cdef unsigned int nelemMemory = nelemClient + + #print('native', self.hh.getNelemNative(handle)) + #print('client', self.hh.getNelemClient(handle)) + # print('request',self.hh.getNelemRequest(handle)) + + #print ('dtcheck', dtcheck) + + # cdef double [::1] cyarr_view + # The element type of a typed memoryview may be a numeric scalar type (int, float) + # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + + if dtcheck in [CAFE_STRING, CAFE_ENUM]: + sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + with nogil: + status = self._c_cafe.getDbrStringArray(handle, sval) + + # http://cython.readthedocs.org/en/latest/src/tutorial/numpy.html + # Some data types are not yet supported, like boolean arrays and string arrays. + + locallist = [] + + if status == ICAFE_NORMAL: + + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + + # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + + mvStr = np.empty(nelemMethod, dtype=(np.str_, 40)) + #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + + for i in range(0, nelemMethod): + # print sval[i].decode('utf8'), i + mvStr[i] = str(sval[i]) # .decode('utf8') + # locallist.append(sval[i]) + + free(sval) + + return np.array(mvStr) + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + mvStr = np.empty(nelemMethod, dtype=( + np.str_, 40), order='C') + + for ij in range(0, nelemMethod): + mvStr[ij] = str(sval[ij]) + free(sval) + + return memoryview(mvStr) + + elif art in ['array', 'array.array']: + print( + "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + # RETURNING LIST - DOES NOT SUPPORT array of strings; + #arrayArray=array.array('u', 'hello \u2641') + arrayArray = [] + for ij in range(0, nelemMethod): + arrayArray.append(str(sval[ij])) + free(sval) + return arrayArray + + elif art in ['ctypes', 'ctype']: + # c_wchar_p is unicode! + ctypesArray = (ctypes.c_char_p*nelemMethod)() + for ij in range(0, nelemMethod): + ctypesArray[ij] = (sval[ij]).encode('utf-8') + free(sval) + return ctypesArray + + else: + print("Unknown array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvStr = np.empty(nelemMethod, dtype=( + np.str_, 40), order='C') + for ij in range(0, nelemMethod): + mvStr[ij] = sval[ij] + free(sval) + + return mvStr + + elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + + i16val = malloc(nelemMemory * sizeof(np.int16)) + # start=time.time() + with nogil: + status = self._c_cafe.getShortArray(handle, i16val) + # end=time.time() + #print ("END TIME SHORT", end - start) + 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']: + + # ##mvInt=ival + # ##arr = np.ascontiguousarray(mvInt) + # ##set_base(arr, ival) + + 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] = i16val[ij] + free(i16val) + 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] = i16val[ij] + free(i16val) + return np.array(mvInt8) + + elif dt in ['uchar', 'np.uint8', 'uint8']: + mvUInt8 = np.empty( + nelemMethod, dtype=np.uint8, order='C') + for ij in range(0, nelemMethod): + mvUInt8[ij] = i16val[ij] + free(i16val) + return np.array(mvUInt8) + + else: + + mvShort = np.empty( + nelemMethod, dtype=np.int16, order='C') + #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + for ij in range(0, nelemMethod): + mvShort[ij] = i16val[ij] + # mvShortNP=cnp.asarray(i16val) + + # aaa=np.full(nelemMethod, i16val[ij] + free(i16val) + + return memoryview(mvShort) + + elif art in ['array', 'array.array']: + + a = array.array('h') + for ij in range(0, nelemMethod): + a.append( < short > i16val[ij]) + free(i16val) + return a + + elif art in ['ctypes', 'ctype']: + + ctypesArray16 = (ctypes.c_int16*nelemMethod)() + for ij in range(0, nelemMethod): + ctypesArray16[ij] = i16val[ij] + free(i16val) + return ctypesArray16 + + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + for ij in range(0, nelemMethod): + mvShort[ij] = i16val[ij] + free(i16val) + + return mvShort + + elif dtcheck in [CAFE_LONG]: + + ival = malloc(nelemMemory * sizeof(np.int32)) + with nogil: + status = self._c_cafe.getLongArray(handle, ival) + + if status == ICAFE_NORMAL: + # np.empty preferred, else mvInt does not get correct value for first couple of array elements + + # nelemMethod=self.hh.getnelemMethod(handle) + + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + + # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + + if dt in ['np.int32', 'int32']: + mvInt32 = np.empty( + nelemMethod, dtype=np.int32, order='C') + for ij in range(0, nelemMethod): + mvInt32[ij] = ival[ij] + free(ival) + return np.array(mvInt32) + elif dt in ['np.uint32', 'uint32']: + mvUInt32 = np.empty( + nelemMethod, dtype=np.uint32, order='C') + for ij in range(0, nelemMethod): + mvUInt32[ij] = ival[ij] + free(ival) + return np.array(mvUInt32) + + # elif dt in ['np.int64','int64']: + # mvInt64 = np.empty(nelemMethod, dtype=np.int64, order='C') + # for ij in range(0, nelemMethod): + # mvInt64[ij]=ival[ij] + # free(ival) + # return np.array(mvInt64) # + # elif dt in ['np.uint64','uint64']: + # mvUInt64 = np.empty(nelemMethod, dtype=np.uint64, order='C') + # for ij in range(0, nelemMethod): + # mvUInt64[ij]=ival[ij] + # free(ival) + # return np.array(mvUInt64) + + else: + mvInt = np.empty( + nelemMethod, dtype=np.int32, order='C') + for ij in range(0, nelemMethod): + mvInt[ij] = ival[ij] + free(ival) + return np.array(mvInt) # arr + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + for ij in range(0, nelemMethod): + mvInt[ij] = ival[ij] + free(ival) + return memoryview(mvInt) + + elif art in ['array', 'array.array']: + a = array.array('h') + for ij in range(0, nelemMethod): + a.append( < int > ival[ij]) + free(ival) + return a + + elif art in ['ctypes', 'ctype']: + ctypesArray = (ctypes.c_int32*nelemMethod)() + for ij in range(0, nelemMethod): + ctypesArray[ij] = ival[ij] + free(ival) + return ctypesArray + + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + for ij in range(0, nelemMethod): + mvInt[ij] = ival[ij] + free(ival) + return mvInt + + elif dtcheck in [CAFE_FLOAT]: + + fval = malloc(nelemMemory * sizeof(float)) + # start=time.time() + with nogil: + status = self._c_cafe.getFloatArray(handle, fval) # pvd.setNelem(self.hh.getnelemMethod(handle)) # with nogil: # status=self._c_cafe.get(handle, pvd) - if status==ICAFE_NORMAL: - #nelemMethod=self.hh.getnelemMethod(handle) + if status == ICAFE_NORMAL: + # nelemMethod=self.hh.getnelemMethod(handle) - if art in ['numpy','ndarray','numpy.ndarray']: + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: - ##elif dt in ['np.float16','np.float32']: + # elif dt in ['np.float16','np.float32']: - mvFloat = np.empty(nelemMethod, dtype=np.float32) - for ij in range(0, nelemMethod): - mvFloat[ij]=fval[ij] # pvd.getAsFloat(ij) - #arr=np.asarray(mvFloat) + mvFloat = np.empty(nelemMethod, dtype=np.float32) + for ij in range(0, nelemMethod): + mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) + # arr=np.asarray(mvFloat) - free(fval) + free(fval) #arr = np.ascontiguousarray(mvDouble) #set_base(arr, dval) - return np.array(mvFloat) #arr + return np.array(mvFloat) # arr - elif art in ['memoryview','mv','memoryviewslice']: + elif art in ['memoryview', 'mv', 'memoryviewslice']: + # Method A to return memory view + mvFloat = np.empty(nelemMethod, dtype=np.float32) + for ij in range(0, nelemMethod): + mvFloat[ij] = fval[ij] - #Method A to return memory view - mvFloat = np.empty(nelemMethod, dtype=np.float32) - for ij in range(0, nelemMethod): - mvFloat[ij]=fval[ij] + free(fval) + # memoryview(mvFloat).tolist() #tolist() only supports byte views - free(fval) - #memoryview(mvFloat).tolist() #tolist() only supports byte views - - return memoryview(mvFloat) + return memoryview(mvFloat) - - #Method B to return memory view - ''' + # Method B to return memory view + ''' mvDoubleArray=cvarray(shape=(nelemMethod,), itemsize=sizeof(double), format="d") cyarr_view=mvDoubleArray for i in range(0, nelemMethod): @@ -2288,24 +2950,24 @@ cdef class CyCafe: return cyarr_view ''' - elif art in ['array','array.array']: - - a=array.array('f') - - for ij in range(0, nelemMethod): - a.append(fval[ij]) - free(fval) - - return a - ''' + elif art in ['array', 'array.array']: + + a = array.array('f') + + for ij in range(0, nelemMethod): + a.append(fval[ij]) + free(fval) + + return a + ''' arrayArray=array.array('f') for ij in range(0, nelemMethod): arrayArray.append(fval[ij]) free(fval) return arrayArray ''' - - ''' + + ''' cvFloatArray=cvarray(shape=(nelemMethod,), itemsize=sizeof(float), format="f") cyarr_view=cvFloatArray for i in range(0, nelemMethod): @@ -2315,1788 +2977,1845 @@ cdef class CyCafe: free(fval) return cyarr_view ''' - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_float*nelemMethod)() - for ij in range(0, nelemMethod): - ctypesArray[ij]=fval[ij] - free(fval) - return ctypesArray - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvFloat = np.empty(nelemMethod, dtype=np.float32) - for ij in range(0, nelemMethod): - mvFloat[ij]=fval[ij] - free(fval) - return mvFloat + elif art in ['ctypes', 'ctype']: + ctypesArray = (ctypes.c_float*nelemMethod)() + for ij in range(0, nelemMethod): + ctypesArray[ij] = fval[ij] + free(fval) + return ctypesArray + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvFloat = np.empty(nelemMethod, dtype=np.float32) + for ij in range(0, nelemMethod): + mvFloat[ij] = fval[ij] + free(fval) + return mvFloat - elif dtcheck in [CAFE_DOUBLE]: + elif dtcheck in [CAFE_DOUBLE]: - #start=time.time() - dval = malloc( nelemMemory * sizeof(double)) - - with nogil: - #for ij in range(0, 10000): - status=self._c_cafe.getDoubleArray(handle, dval) - - if status==ICAFE_NORMAL: - #nelemMethod=self.hh.getnelemMethod(handle) + # start=time.time() + dval = malloc(nelemMemory * sizeof(double)) - if art in ['numpy','ndarray','numpy.ndarray']: + with nogil: + # for ij in range(0, 10000): + status = self._c_cafe.getDoubleArray(handle, dval) + if status == ICAFE_NORMAL: + # nelemMethod=self.hh.getnelemMethod(handle) - #elif dt in ['double', 'np.float_','np.float64']: + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: - #mvDouble=dval - mvDouble = np.empty(nelemMethod, dtype=np.float64) - for ij in range(0, nelemMethod): - mvDouble[ij]=dval[ij] - #arr=np.asarray(mvDouble) - free(dval) - #end=time.time() - #print (end - start) - return np.array(mvDouble) #arr + # elif dt in ['double', 'np.float_','np.float64']: - elif art in ['memoryview','mv','memoryviewslice']: + # mvDouble=dval + mvDouble = np.empty(nelemMethod, dtype=np.float64) + for ij in range(0, nelemMethod): + mvDouble[ij] = dval[ij] + # arr=np.asarray(mvDouble) + free(dval) + # end=time.time() + #print (end - start) + return np.array(mvDouble) # arr - #Method A to return memory view - mvDouble = np.empty(nelemMethod, dtype=np.float64) - for ij in range(0, nelemMethod): - mvDouble[ij]=dval[ij] - free(dval) - #end=time.time() - #print (end - start) - return memoryview(mvDouble) + elif art in ['memoryview', 'mv', 'memoryviewslice']: - elif art in ['array','array.array']: - a=array.array('d') - for ij in range(0, nelemMethod): - a.append(dval[ij]) - free(dval) - #end=time.time() - #print (end - start) - return a + # Method A to return memory view + mvDouble = np.empty(nelemMethod, dtype=np.float64) + for ij in range(0, nelemMethod): + mvDouble[ij] = dval[ij] + free(dval) + # end=time.time() + #print (end - start) + return memoryview(mvDouble) - elif art in ['ctypes', "ctype"]: - ctypesArray=(ctypes.c_double*nelemMethod)() - for ij in range(0, nelemMethod): - ctypesArray[ij]=dval[ij] - free(dval) - return ctypesArray + elif art in ['array', 'array.array']: + a = array.array('d') + for ij in range(0, nelemMethod): + a.append(dval[ij]) + free(dval) + # end=time.time() + #print (end - start) + return a - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvDouble = np.empty(nelemMethod, dtype=np.float64) - for ij in range(0, nelemMethod): - mvDouble[ij]=dval[ij] - free(dval) - return mvDouble + elif art in ['ctypes', "ctype"]: + ctypesArray = (ctypes.c_double*nelemMethod)() + for ij in range(0, nelemMethod): + ctypesArray[ij] = dval[ij] + free(dval) + return ctypesArray - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return [None] + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvDouble = np.empty(nelemMethod, dtype=np.float64) + for ij in range(0, nelemMethod): + mvDouble[ij] = dval[ij] + free(dval) + return mvDouble - ################################################################################## - #END: def getArray(self, handlePV, dt): - ################################################################################## - + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, + _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException - ################################################################################## - def getPVInt(self, handlePV): - return self.getPV(handlePV,'int') - ################################################################################## - - ################################################################################## - def getPVFloat(self, handlePV): - return self.getPV(handlePV,'float') - ################################################################################## - - ################################################################################## - def getPVStr(self, handlePV): - return self.getPV(handlePV,'str') - ################################################################################## - - ################################################################################## - def getPV(self, handlePV, str dt='native'): - ################################################################################## - cdef str _METHOD_="getPV" - - cdef unsigned int handle=0 + return [None] - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - cdef int status - cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + ############################################################################ + # END: def getArray(self, handlePV, dt): + ############################################################################ - with nogil: - status=self._c_cafe.get(handle, pvd) + ############################################################################ - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - - pvd_valnone=PVDataHolderToStruct(pvd, dt) - pvd_valnone.value[0]=None - return pvd_valnone - - return PVDataHolderToStruct(pvd, dt) - - ################################################################################## - #END def getPV(self, handlePV): - ################################################################################## + def getPVInt(self, handlePV): + return self.getPV(handlePV, 'int') + ############################################################################ - - ################################################################################## - def getPVStrList(self, handleList): - return self.getPVList(handleList, dt='str') - ################################################################################## - - ################################################################################## - def getPVIntList(self, handleList): - return self.getPVList(handleList, dt='int') - ################################################################################## - - ################################################################################## - def getPVFloatList(self, handleList): - return self.getPVList(handleList, dt='float') - ################################################################################## - - ################################################################################## - def getPVList(self, handleList, str dt='native', cacheFlag=False): - ################################################################################## - cdef str _METHOD_="getPVList" + ############################################################################ + def getPVFloat(self, handlePV): + return self.getPV(handlePV, 'float') + ############################################################################ - if isinstance(handleList, (str,int,long)): - hl=[] - hl.append(handleList) - handleList=[] - handleList=hl - - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be a 'list' of if handles, else if PVs")) - -#cdef unsigned int nelemTotal=0 -#for i in range(0, len(handleList)): + ############################################################################ + def getPVStr(self, handlePV): + return self.getPV(handlePV, 'str') + ############################################################################ + + ############################################################################ + def getPV(self, handlePV, str dt='native'): + cdef str _METHOD = "getPV" + + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "First input argument should be of type if handle, else if PV")) + + cdef int status + cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + + with nogil: + status = self._c_cafe.get(handle, pvd) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + pvd_valnone = PVDataHolderToStruct(pvd, dt) + pvd_valnone.value[0] = None + return pvd_valnone + + return PVDataHolderToStruct(pvd, dt) + + ################################################################################## + # END def getPV(self, handlePV): + ################################################################################## + + ################################################################################## + + def getPVStrList(self, handleList): + return self.getPVList(handleList, dt='str') + ################################################################################## + + ################################################################################## + def getPVIntList(self, handleList): + return self.getPVList(handleList, dt='int') + ################################################################################## + + ################################################################################## + def getPVFloatList(self, handleList): + return self.getPVList(handleList, dt='float') + ################################################################################## + + ################################################################################## + def getPVList(self, handleList, str dt='native', cacheFlag=False): + cdef str _METHOD = "getPVList" + + if isinstance(handleList, (str, int, long)): + hl = [] + hl.append(handleList) + handleList = [] + handleList = hl + + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format( + self._exception_text, _METHOD, + "First input argument should be a 'list' of of type \ + if handles, else if PVs")) + +# cdef unsigned int nelemTotal=0 +# for i in range(0, len(handleList)): # nelemTotal+=self.hh.getNelemNative(handleList[i]) - + # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) #16 is size of boost_shared_ptr (size 40) - + # cdef PVDataHolder * pvd = \ # malloc( 100000000 + \ # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) - cdef vector[unsigned int] v + cdef vector[unsigned int] v - #do this to avoid compiler warning messages + # do this to avoid compiler warning messages - for i in range(0, len(handleList)): - v.push_back(handleList[i]) + for i in range(0, len(handleList)): + v.push_back(handleList[i]) - cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) - for i in range(0, len(handleList)): - pvd[i].setNelem(self.hh.getNelemNative(handleList[i])) - #print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i - - cdef int status - - if(cacheFlag): - status=self._c_cafe.getCachePVArray(v, pvd) - else: - with nogil: - status=self._c_cafe.getPVArray(v, pvd) - - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - for i in range(0, len(handleList)): - if (pvd[i].getStatus() != ICAFE_NORMAL): - print ("Handle=", handleList[i], "PV=", self.hh.getPVFromHandle(handleList[i]) ) - print ("with error status=", pvd[i].getStatus() ) - self._c_cafe.printStatusMessage(status) - print ("") - #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) - - - cdef unsigned int dtn - cdef unsigned int dtcheck - - cdef CAFEDataTypeCode cdt - - pvdList=[] - cpdef pvdata p1 + for i in range(0, v.size()): # len(handleList)): # + pvd[i].setNelem(self.hh.getNelemNative(v[i])) # handleList[i])) + # print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i - for i in range(0, len(handleList)): - dtn = pvd[i].getDataType(); - - dtcheck=getMatchedDataType(dt, dtn) - localList=[] + cdef int status - if pvd[i].getNelem() == 1: - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - if self._c_cafe.isEnum(handleList[i]): - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_CHAR: - localList.append(pvd[i].getAsLong()) #( pvd[i].getAsChar()) - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) #no data + if cacheFlag: + status = self._c_cafe.getCachePVArray(v, pvd) + else: + with nogil: + status = self._c_cafe.getPVArray(v, pvd) - else: - localListInner=[] - if dtcheck==CAFE_STRING: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsString(j)) - elif dtcheck==CAFE_SHORT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_FLOAT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - elif dtcheck==CAFE_ENUM: - for j in range(0, pvd[i].getNelem()): - #if enum, string taken as native - if self._c_cafe.isEnum(handleList[i]): - localListInner.append(pvd[i].getAsString(j)) - else: - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_CHAR: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j))#( pvd[i].getAsChar(j)) - elif dtcheck==CAFE_LONG: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_DOUBLE: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - else: - for j in range(0, pvd[i].getNelem()): - localListInner.append(0) #no data - localList.append(localListInner) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + for i in range(0, v.size()): #len(handleList)): + if (pvd[i].getStatus() != ICAFE_NORMAL): + print("Handle=", handleList[i], "PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvd[i].getStatus()) + self._c_cafe.printStatusMessage(status) + print("") + #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) - p1 = pvdata() - p1.value =localList - p1.status=pvd[i].getStatus() - p1.nelem =pvd[i].getNelem() - p1.alarmStatus =pvd[i].getAlarmStatus() - p1.alarmSeverity=pvd[i].getAlarmSeverity() - p1.alarmStatusAsString =pvd[i].getAlarmStatusAsString() - p1.alarmSeverityAsString=pvd[i].getAlarmSeverityAsString() - p1.dataType=pvd[i].getDataType() - p1.dataTypeAsString=cdt.message(pvd.getDataType()) - pvd._etsNorm=pvd[i].getEpicsTimeStampAsUInt32() - - ll=[] - ll.append((pvd[i]._etsNorm).secPastEpoch) - ll.append((pvd[i]._etsNorm).nsec) - p1.ts=ll - - pvd._etsDate=pvd[i].getEpicsTimeStampAsDate() - - ld=[] - ld.append( (pvd[i]._etsDate).year ) - ld.append( (pvd[i]._etsDate).mon ) - ld.append( (pvd[i]._etsDate).day ) - ld.append( (pvd[i]._etsDate).hour ) - ld.append( (pvd[i]._etsDate).min ) - ld.append( (pvd[i]._etsDate).sec ) - ld.append( (pvd[i]._etsDate).nsec ) - p1.tsDate=ld - - pvdList.append(p1) - - #free(pvd) + cdef unsigned int dtn + cdef unsigned int dtcheck + cdef CAFEDataTypeCode cdt - return pvdList, status - - - ################################################################################## - #END: def getPVList(self, handlePV, dt): - ################################################################################## + pvdList = [] + cpdef pvdata p1 - ################################################################################## - def printStatusIfError(self, handleList, statusList): - ################################################################################## - cdef str _METHOD_="printStatusIfError" - - if isinstance(handleList,(str,int,long)): - handleListB=[] - handleListB.append(handleList) - handleList=[] - handleList=handleListB + for i in range(0, v.size()): #len(handleList)): + dtn = pvd[i].getDataType() - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be a 'list' of if handles or if PVs")) + dtcheck = getMatchedDataType(dt, dtn) + localList = [] - if isinstance(statusList, (int,long)): - statusListB=[] - statusListB.append(statusList) - statusList=[] - statusList=statusListB + if pvd[i].getNelem() == 1: + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + if self._c_cafe.isEnum(handleList[i]): + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_CHAR: + # ( pvd[i].getAsChar()) + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(0) # no data - if not isinstance(statusList, (list)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "Second input argument should be of ")) + else: + localListInner = [] + if dtcheck == CAFE_STRING: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsString(j)) + elif dtcheck == CAFE_SHORT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_FLOAT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + elif dtcheck == CAFE_ENUM: + for j in range(0, pvd[i].getNelem()): + # if enum, string taken as native + if self._c_cafe.isEnum(handleList[i]): + localListInner.append(pvd[i].getAsString(j)) + else: + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_CHAR: + for j in range(0, pvd[i].getNelem()): + # ( pvd[i].getAsChar(j)) + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_LONG: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_DOUBLE: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + else: + for j in range(0, pvd[i].getNelem()): + localListInner.append(0) # no data + localList.append(localListInner) - if not isinstance(statusList[0], (int, long, float)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "Second input argument should be a of ")) + p1 = pvdata() + p1.value = localList + p1.status = pvd[i].getStatus() + p1.nelem = pvd[i].getNelem() + p1.alarmStatus = pvd[i].getAlarmStatus() + p1.alarmSeverity = pvd[i].getAlarmSeverity() + p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + p1.dataType = pvd[i].getDataType() + p1.dataTypeAsString = cdt.message(pvd.getDataType()) + pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() - cdef vector[unsigned int] v - #do next step to avoid: - #warning: comparison between signed and unsigned integer expressions - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + ll = [] + ll.append((pvd[i]._etsNorm).secPastEpoch) + ll.append((pvd[i]._etsNorm).nsec) + p1.ts = ll - self._c_cafe.printStatusIfError(v, statusList) - return + pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() - ################################################################################## + ld = [] + ld.append((pvd[i]._etsDate).year) + ld.append((pvd[i]._etsDate).mon) + ld.append((pvd[i]._etsDate).day) + ld.append((pvd[i]._etsDate).hour) + ld.append((pvd[i]._etsDate).min) + ld.append((pvd[i]._etsDate).sec) + ld.append((pvd[i]._etsDate).nsec) + p1.tsDate = ld - ################################################################################## - def getAsyn(self, handleList): - ################################################################################## - cdef str _METHOD_="getAsyn" - - if isinstance(handleList, (str,int,long)): - handleListB=[] - handleListB.append(handleList) - handleList=[] - handleList=handleListB + pvdList.append(p1) - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be a 'list' of if handles or if PVs")) + # free(pvd) - cdef vector[unsigned int] v - cdef vector[int] vStatus - v.reserve (len(handleList)) - vStatus.reserve(len(handleList)) + return pvdList, status - #do next step to avoid: - #warning: comparison between signed and unsigned integer expressions - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + ################################################################################## + # END: def getPVList(self, handlePV, dt): + ################################################################################## - #Need to copy to a vector since - #Coercion from Python not allowed without the GIL - with nogil: - status=self._c_cafe.getV(v, vStatus) - - if (status!=ICAFE_NORMAL): - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("Error/Warning from def getAsyn: ") - self._c_cafe.printStatusMessage(status) + ################################################################################## - return status, vStatus + def printStatusIfError(self, handleList, statusList): + ################################################################################## + cdef str _METHOD = "printStatusIfError" + if isinstance(handleList, (str, int, long)): + handleListB = [] + handleListB.append(handleList) + handleList = [] + handleList = handleListB - ################################################################################## - #END: def getAsyn(self, handleList): - ################################################################################## + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "First input argument should be a 'list' of of type if handles or if PVs")) + if isinstance(statusList, (int, long)): + statusListB = [] + statusListB.append(statusList) + statusList = [] + statusList = statusListB + if not isinstance(statusList, (list)): + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "Second input argument should be of of type ")) - ################################################################################## - def waitForGetEvent(self,handlePV): - ################################################################################## - cdef str _METHOD_="waitForGetEvent(handlePV)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument, should be if handle, else if PV")) - with nogil: - status=self._c_cafe.waitForGetEvent(handle) - return status - ################################################################################## - #END: def waitForGetEvent(self, handlePV) - ################################################################################## + if not isinstance(statusList[0], (int, long, float)): + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "Second input argument should be a of of type ")) + cdef vector[unsigned int] v + # do next step to avoid: + # warning: comparison between signed and unsigned integer expressions + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) - ################################################################################## - def waitForBundledEvents(self, handleList): - ################################################################################## - cdef str _METHOD_="waitForBundledEvents(self, handleList)" - - if isinstance(handleList, (str,int,long)): - handleListB=[] - handleListB.append(handleList) - handleList=[] - handleList=handleListB + self._c_cafe.printStatusIfError(v, statusList) + return - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + ################################################################################## + + ################################################################################## + def getAsyn(self, handleList): + ################################################################################## + cdef str _METHOD = "getAsyn" + + if isinstance(handleList, (str, int, long)): + handleListB = [] + handleListB.append(handleList) + #handleList = [] + handleList = handleListB + + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "First input argument should be a 'list' of of type if handles or if PVs")) + + cdef vector[unsigned int] v + cdef vector[int] vStatus + v.reserve(len(handleList)) + vStatus.reserve(len(handleList)) + + # do next step to avoid: + # warning: comparison between signed and unsigned integer expressions + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) + + # Need to copy to a vector since + # Coercion from Python not allowed without the GIL + with nogil: + status = self._c_cafe.getV(v, vStatus) + + if (status != ICAFE_NORMAL): + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error/Warning from def getAsyn: ") + self._c_cafe.printStatusMessage(status) + + return status, vStatus + + ################################################################################## + # END: def getAsyn(self, handleList): + ################################################################################## + + ################################################################################## + @verify_handlepv + def waitForGetEvent(self, handlePV): + + cdef unsigned int handle = handlePV + with nogil: + status = self._c_cafe.waitForGetEvent(handle) + return status + ################################################################################## + # END: def waitForGetEvent(self, handlePV) + ################################################################################## + + ################################################################################## + def waitForBundledEvents(self, handleList): + cdef str _METHOD = "waitForBundledEvents(self, handleList)" + + if isinstance(handleList, (str, int, long)): + handleListB = [] + handleListB.append(handleList) + #handleList = [] + handleList = handleListB + + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ First input argument, should be of handles or PVs") - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ -First input argument, should be a 'list' of if handles or if PVs") + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") - cdef vector[unsigned int] v - cdef vector[int] vRB + cdef vector[unsigned int] v + cdef vector[int] vRB - v.reserve (len(handleList)) - vRB.reserve(len(handleList)) - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + v.reserve(len(handleList)) + vRB.reserve(len(handleList)) + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) + # Wait for bundle + with nogil: + status = self._c_cafe.waitForBundledEvents(v, vRB) + if (status != ICAFE_NORMAL): + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in def waitForBundledEvents: ") + self._c_cafe.printStatusMessage(status) + return status + return status, vRB + ################################################################################## + # END: def waitForBundledEvents(self, handleList): + ################################################################################## - #Wait for bundle - with nogil: - status=self._c_cafe.waitForBundledEvents(v, vRB) - if (status!=ICAFE_NORMAL): - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("Error in def waitForBundledEvents: ") - self._c_cafe.printStatusMessage(status) - return status - return status, vRB - ################################################################################## - #END: def waitForBundledEvents(self, handleList): - ################################################################################## + ################################################################################## + def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): + cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" - ################################################################################## - def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): - ################################################################################## - cdef str _METHOD_="getScalarArray(handleList, str dt, bint cacheFlag)" + # cdef float [::1] mvFloat #C-contiguous - #cdef float [::1] mvFloat #C-contiguous - - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ First input argument, should be of handles or PVs") - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ -First input argument, should be a 'list' of if handles or if PVs") + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") - nelemPrevious= [] + nelemPrevious = [] - for i in range(0, len(handleList)): - nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) - - - #pack into numpy - cdef vector[unsigned int] v - cdef vector[int] vStatus - - v.reserve (len(handleList)) - vStatus.reserve(len(handleList)) + for i in range(0, len(handleList)): + nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + # pack into numpy + cdef vector[unsigned int] v + cdef vector[int] vStatus - cdef vector[int] vRB - status=ICAFE_NORMAL - - if (cacheFlag == False): - #Need to copy to a vector since - #Coercion from Python not allowed without the GIL - with nogil: - status=self._c_cafe.getV(v, vStatus) + v.reserve(len(handleList)) + vStatus.reserve(len(handleList)) - #Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK - #as this may mean we have a double handle instance. - #This is not a problem as such but if this is the case let's - #remove the error if the first getAsyn call for the handle in question was OK - #Functionality not yet moved to CAFE:: - #Required for when dt='native' - if (status != ICAFE_NORMAL): - for i in range(0,len(vStatus)): - if (vStatus[i]==ICAFE_WAITING_FOR_PREV_CALLBACK): - #getHandle - for j in range(0,(i-1)): - if(v[j]==v[i]): - if (vStatus[j]==ICAFE_NORMAL): - vStatus[i]=vStatus[j] - - #ca_poll() Not required as above will flush! + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) - #Wait for bundle - - with nogil: - statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) - if (statusBundle!=ICAFE_NORMAL): - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("Error in def getScalarArray: ") - self._c_cafe.printStatusMessage(statusBundle) + cdef vector[int] vRB + status = ICAFE_NORMAL - cdef unsigned int dtcheck=CAFE_NOT_REQUESTED #native type not yet know - dtcheck=getMatchedDataType(dt, dtcheck) - - #print ("dt=", dt, "dtcheck=", dtcheck) - - if dtcheck in [CAFE_STRING]: - - self.vStr.clear() - self.vStr.reserve(len(handleList)) + if (cacheFlag == False): + # Need to copy to a vector since + # Coercion from Python not allowed without the GIL + with nogil: + status = self._c_cafe.getV(v, vStatus) - with nogil: - status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + # Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK + # as this may mean we have a double handle instance. + # This is not a problem as such but if this is the case let's + # remove the error if the first getAsyn call for the handle in question was OK + # Functionality not yet moved to CAFE:: + # Required for when dt='native' + if (status != ICAFE_NORMAL): + for i in range(0, len(vStatus)): + if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + # getHandle + for j in range(0, (i-1)): + if(v[j] == v[i]): + if (vStatus[j] == ICAFE_NORMAL): + vStatus[i] = vStatus[j] - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + # ca_poll() Not required as above will flush! - ##localList=[] - ##statusList=[] + # Wait for bundle - #for i in range(0, len(self.vStr)): - #localList.append( self.vStr[i]) - return self.vStr, status, vStatus + with nogil: + statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + if (statusBundle != ICAFE_NORMAL): + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in def getScalarArray: ") + self._c_cafe.printStatusMessage(statusBundle) - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - - self.vInt.clear() - self.vInt.reserve(len(handleList)) + cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + dtcheck = getMatchedDataType(dt, dtcheck) - with nogil: - status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + #print ("dt=", dt, "dtcheck=", dtcheck) - #for i in range(0, len(vStatus)): - #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + if dtcheck in [CAFE_STRING]: - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + self.vStr.clear() + self.vStr.reserve(len(handleList)) - ##localList=[] - ##statusList=[] + with nogil: + status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) - #for i in range(0, len(self.vInt)): - return self.vInt, status, vStatus - - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - - self.vFloat.clear() - self.vFloat.reserve(len(handleList)) + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) - with nogil: - status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + # localList=[] + # statusList=[] - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + # for i in range(0, len(self.vStr)): + # localList.append( self.vStr[i]) + return self.vStr, status, vStatus - #for i in range(0, len(vStatus)): - # print ("status/// " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) - #print ("overall status", status) - - ##localList=[] - ##statusList=[] - #Method A to return memory view - #mvFloat = np.empty(len(handleList), dtype=np.float32) - #for ij in range(0, len(handleList)): - # mvFloat[ij]=self.vFloat[ij] - #return mvFloat, status, vStatus + elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + + self.vInt.clear() + self.vInt.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + + # for i in range(0, len(vStatus)): + #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) + + # localList=[] + # statusList=[] + + # for i in range(0, len(self.vInt)): + return self.vInt, status, vStatus + + elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + + self.vFloat.clear() + self.vFloat.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) + + # for i in range(0, len(vStatus)): + # print ("status/// " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + #print ("overall status", status) + + # localList=[] + # statusList=[] + # Method A to return memory view + #mvFloat = np.empty(len(handleList), dtype=np.float32) + # for ij in range(0, len(handleList)): + # mvFloat[ij]=self.vFloat[ij] + # return mvFloat, status, vStatus + + # for i in range(0, len(self.vFloat)): + return self.vFloat, status, vStatus + + # Native - #for i in range(0, len(self.vFloat)): - return self.vFloat, status, vStatus - - #Native - - -#cdef unsigned int nelemTotal=0 +# cdef unsigned int nelemTotal=0 # for i in range(0, len(handleList)): # nelemTotal+=self.hh.getNelemNative(handleList[i]) - - #cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) #16 is size of boost_shared_ptr (size 40) - #Create temporary group from handleList - #Does group exist? - cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) #16 is size of boost_shared_ptr (size 40) + + # Create temporary group from handleList + # Does group exist? + cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) -#for i in range (0, len(handleList)): +# for i in range (0, len(handleList)): # print pvd[i].getPVName(), pvd[i].getAsString(), " [",i,"]" # print "" - #print ("-----------------------------------------------------------------") + #print ("-----------------------------------------------------------------") - #cdef PVDataHolder * pvd = \ - #malloc( 100000000 + \ - # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) - #print "size_pvd=", sizeof(PVDataHolder) - #print "sizeoverall", len(handleList) * sizeof(PVDataHolder)*10000 - - #Required to allocate memory for shared pointer - for i in range(0, len(handleList)): - pvd[i].setNelem(1) + # cdef PVDataHolder * pvd = \ + # malloc( 100000000 + \ + # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + # print "size_pvd=", sizeof(PVDataHolder) + # print "sizeoverall", len(handleList) * sizeof(PVDataHolder)*10000 - - statusNoWait=self._c_cafe.getCachePVArrayNoWait(v, pvd) + # Required to allocate memory for shared pointer + for i in range(0, v.size()): #len(handleList)): + pvd[i].setNelem(1) - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) - statusList=[] - statusFlag=True - statusLocal=ICAFE_NORMAL - if (cacheFlag==True): - - #if status !=ICAFE_NORMAL: - # if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - # self._c_cafe.printStatusMessage(status) - #status=ICAFE_NORMAL - for i in range(0, len(handleList)): - statusList.append(pvd[i].getStatus()) - if pvd[i].getStatus() != ICAFE_NORMAL: - print ("Error in Element ", i, " from ", len(handleList), " in PyCafe def getScalarArray") - print ("Handle= ", handleList[i], " PV=", self.hh.getPVFromHandle(handleList[i])) - print ("with error status=", pvd[i].getStatus()) - self._c_cafe.printStatusMessage(pvd[i].getStatus()) - if statusFlag: - statusLocal =pvd[i].getStatus() - statusFlag=False - - - # - #else: - # statusList.append(status) - - - #Wht not as a memoryView? - - cdef unsigned int dtn - - localList=[] - - for i in range(0, len(handleList)): - - dtn = pvd[i].getDataType(); - dtcheck = getMatchedDataType(dt, dtn) - - #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) - #print (pvd[i].getAsString()) - #print (pvd[i].getAsDouble()) - - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) - if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName()))==1: - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) + statusList = [] + statusFlag = True + statusLocal = ICAFE_NORMAL + if (cacheFlag): - elif dtcheck==CAFE_CHAR: - localList.append( pvd[i].getAsLong()) # pvd[i].getAsChar() - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_HIGH: - print ("def getScalarArray:") - print ("Entering 0 for element", i, "as channel is not connected!") - - #print (" vstatus = ", vStatus[i] , " pvd[i].status ", pvd[i].getStatus() ) - - #free(pvd) - if (cacheFlag==True): - return localList, statusLocal, statusList - - return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) - - ################################################################################## - #END: def getScalarArray(self, handleList, dt, cacheFlag): - ################################################################################## + # if status !=ICAFE_NORMAL: + # if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + # self._c_cafe.printStatusMessage(status) + # status=ICAFE_NORMAL + for i in range(0, v.size()): #len(handleList)): + statusList.append(pvd[i].getStatus()) + if pvd[i].getStatus() != ICAFE_NORMAL: + print("Error in Element ", i, " from ", len( + handleList), " in PyCafe def getScalarArray") + print("Handle= ", handleList[i], " PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvd[i].getStatus()) + self._c_cafe.printStatusMessage(pvd[i].getStatus()) + if statusFlag: + statusLocal = pvd[i].getStatus() + statusFlag = False + + # + # else: + # statusList.append(status) + + # Wht not as a memoryView? + + cdef unsigned int dtn + + localList = [] + + for i in range(0, v.size()): #len(handleList)): + + dtn = pvd[i].getDataType() + dtcheck = getMatchedDataType(dt, dtn) + + #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + #print (pvd[i].getAsString()) + #print (pvd[i].getAsDouble()) + + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + + if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) + + elif dtcheck == CAFE_CHAR: + # pvd[i].getAsChar() + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(0) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + print("def getScalarArray:") + print("Entering 0 for element", i, + "as channel is not connected!") + + #print (" vstatus = ", vStatus[i] , " pvd[i].status ", pvd[i].getStatus() ) + + # free(pvd) + if cacheFlag: + return localList, statusLocal, statusList + + # use vstatus instead of statusList (as cache is NoWait) + return localList, status, vStatus + + ################################################################################## + # END: def getScalarArray(self, handleList, dt, cacheFlag): + ################################################################################## + + + ################################################################################## + def getStrScalarList(self, handleList): + ################################################################################## + return self.getScalarList(handleList, dt='str') + ################################################################################## + def getIntScalarList(self, handleList): + ################################################################################## + return self.getScalarList(handleList, dt='int') + ################################################################################## + def getFloatScalarList(self, handleList): + ################################################################################## + return self.getScalarList(handleList, dt='float') + ################################################################################## + def getScalarList(self, handleList, dt: str = 'native', + cacheFlag: bool = False, dictFlag: bool = False): + ################################################################################## + cdef str _METHOD = "getScalarList(handleList, str dt, bint cacheFlag)" + # cdef float [::1] mvFloat #C-contiguous - - - - - - - - ################################################################################## - def getStrScalarList(self, handleList): - ################################################################################## - return self.getScalarList(handleList, dt='str') - - ################################################################################## - def getIntScalarList(self, handleList): - ################################################################################## - return self.getScalarList(handleList, dt='int') - - ################################################################################## - def getFloatScalarList(self, handleList): - ################################################################################## - return self.getScalarList(handleList, dt='float') - - - ################################################################################## - def getScalarList(self, handleList, str dt='native', bint cacheFlag=False): - ################################################################################## - cdef str _METHOD_="getScalarList(handleList, str dt, bint cacheFlag)" - - #cdef float [::1] mvFloat #C-contiguous - - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ First input argument, should be of handles or PVs") - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ -First input argument, should be a 'list' of if handles or if PVs") + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") - nelemPrevious= [] + 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.getNelemToRetrieveFromCache(handleList[i]) - #print "cache", c, "[",i,"]" - - #pack into vectors - cdef vector[unsigned int] v - cdef vector[int] vStatus - - v.reserve (len(handleList)) - vStatus.reserve(len(handleList)) + for i in range(0, len(handleList)): + nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + # 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,"]" - cdef vector[int] vRB - status=ICAFE_NORMAL - - if (cacheFlag == False): - #Need to copy to a vector since - #Coercion from Python not allowed without the GIL - with nogil: - status=self._c_cafe.getV(v, vStatus) + # pack into vectors + cdef vector[unsigned int] v + cdef vector[int] vStatus - #for i in range(0, len(vStatus)): - # print (vStatus[i]) - #print("====") - #Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK - #as this may mean we have a double handle instance. - #This is not a problem as such but if this is the case let's - #remove the error if the first getAsyn call for the handle in question was OK - #Functionality not yet moved to CAFE:: - #Required for when dt='native' - if (status != ICAFE_NORMAL): - for i in range(0,len(vStatus)): - if (vStatus[i]==ICAFE_WAITING_FOR_PREV_CALLBACK): - #getHandle - for j in range(0,(i-1)): - if(v[j]==v[i]): - if (vStatus[j]==ICAFE_NORMAL): - vStatus[i]=vStatus[j] - - #ca_poll() Not required as above will flush! - #Wait for bundle - - with nogil: - statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) - - if (statusBundle!=ICAFE_NORMAL): - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("Error in def getScalarList: ") - self._c_cafe.printStatusMessage(statusBundle) + v.reserve(len(handleList)) + vStatus.reserve(len(handleList)) - cdef unsigned int dtcheck=CAFE_NOT_REQUESTED #native type not yet know - dtcheck=getMatchedDataType(dt, dtcheck) - - #print ("dt=", dt, "dtcheck=", dtcheck) - - if dtcheck in [CAFE_STRING]: - - self.vStr.clear() - self.vStr.reserve(len(handleList)) + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) - with nogil: - status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + cdef vector[int] vRB + status = ICAFE_NORMAL - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + if (cacheFlag == False): + # Need to copy to a vector since + # Coercion from Python not allowed without the GIL + with nogil: + status = self._c_cafe.getV(v, vStatus) - ##localList=[] - ##statusList=[] + #print("getScalarList") + #for i in range(0, len(vStatus)): + # print (vStatus[i]) + # print("====") + # Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK + # as this may mean we have a double handle instance. + # This is not a problem as such but if this is the case let's + # remove the error if the first getAsyn call for the handle in question was OK + # Functionality not yet moved to CAFE:: + # Required for when dt='native' + if (status != ICAFE_NORMAL): + for i in range(0, len(vStatus)): + if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + # getHandle + for j in range(0, (i-1)): + if(v[j] == v[i]): + if (vStatus[j] == ICAFE_NORMAL): + vStatus[i] = vStatus[j] - #for i in range(0, len(self.vStr)): - #localList.append( self.vStr[i]) - return self.vStr, status, vStatus + # ca_poll() Not required as above will flush! + # Wait for bundle - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - - self.vInt.clear() - self.vInt.reserve(len(handleList)) + with nogil: + statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) - with nogil: - status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + if (statusBundle != ICAFE_NORMAL): + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in def getScalarList: ") + self._c_cafe.printStatusMessage(statusBundle) - #for i in range(0, len(vStatus)): - #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + dtcheck = getMatchedDataType(dt, dtcheck) - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + #print ("dt=", dt, "dtcheck=", dtcheck) - ##localList=[] - ##statusList=[] + if dtcheck in [CAFE_STRING]: - #for i in range(0, len(self.vInt)): - return self.vInt, status, vStatus - - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - - self.vFloat.clear() - self.vFloat.reserve(len(handleList)) + self.vStr.clear() + self.vStr.reserve(len(handleList)) - with nogil: - status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + with nogil: + status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) - #for i in range(0, len(vStatus)): - # print ("status/// " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) - #print ("overall status", status) - - ##localList=[] - ##statusList=[] - #Method A to return memory view - #mvFloat = np.empty(len(handleList), dtype=np.float32) - #for ij in range(0, len(handleList)): - # mvFloat[ij]=self.vFloat[ij] - #return mvFloat, status, vStatus + # localList=[] + # statusList=[] + + # for i in range(0, len(self.vStr)): + # localList.append( self.vStr[i]) + return self.vStr, status, vStatus + + elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + + self.vInt.clear() + self.vInt.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + + # for i in range(0, len(vStatus)): + #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) + + # localList=[] + # statusList=[] + + # for i in range(0, len(self.vInt)): + return self.vInt, status, vStatus + + elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + + self.vFloat.clear() + self.vFloat.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) + + #for i in range(0, len(vStatus)): + # print ("status/// " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + #print ("overall status", status) + + # localList=[] + # statusList=[] + # Method A to return memory view + #mvFloat = np.empty(len(handleList), dtype=np.float32) + # for ij in range(0, len(handleList)): + # mvFloat[ij]=self.vFloat[ij] + # return mvFloat, status, vStatus + + # for i in range(0, len(self.vFloat)): + return self.vFloat, status, vStatus + + # Native - #for i in range(0, len(self.vFloat)): - return self.vFloat, status, vStatus - - #Native - - -#cdef unsigned int nelemTotal=0 +# cdef unsigned int nelemTotal=0 # for i in range(0, len(handleList)): # nelemTotal+=self.hh.getNelemNative(handleList[i]) - - #cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) #16 is size of boost_shared_ptr (size 40) - #Create temporary group from handleList - #Does group exist? - cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) #16 is size of boost_shared_ptr (size 40) + + cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) - #for i in range (0, len(handleList)): - # print pvd[i].getPVName(), pvd[i].getAsString(), " [",i,"]" - # print "" + #for i in range (0, len(handleList)): + # print (pvd[i].getPVName(), pvd[i].getAsString(), " [",i,"]", pvd[i].getStatus()) + - #print ("-----------------------------------------------------------------") + #print ("-----------------------------------------------------------------") - #cdef PVDataHolder * pvd = \ - #malloc( 100000000 + \ - # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) - #print "size_pvd=", sizeof(PVDataHolder) - #print "sizeoverall", len(handleList) * sizeof(PVDataHolder)*10000 - - #Required to allocate memory for shared pointer - for i in range(0, len(handleList)): - pvd[i].setNelem(1) + # cdef PVDataHolder * pvd = \ + # malloc( 100000000 + \ + # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + # print "size_pvd=", sizeof(PVDataHolder) + # print "sizeoverall", len(handleList) * sizeof(PVDataHolder)*10000 - statusNoWait=self._c_cafe.getCachePVArrayNoWait(v, pvd) - - + # Required to allocate memory for shared pointer + for i in range(0, v.size()): #len(handleList)): + pvd[i].setNelem(1) + + statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) - for i in range(0, len(handleList)): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + for i in range(0, len(handleList)): + self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) - statusList=[] - statusFlag=True - statusLocal=ICAFE_NORMAL - - #if cacheFlag==True: - if True: #For all cases Added Oct 2018 - #if status !=ICAFE_NORMAL: - # if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - # self._c_cafe.printStatusMessage(status) - #status=ICAFE_NORMAL - for i in range(0, len(handleList)): - statusList.append(pvd[i].getStatus()) - if pvd[i].getStatus() != ICAFE_NORMAL: - print ("Error in Element ", i, " from ", len(handleList), " in PyCafe def getScalarList") - print ("Handle= ", handleList[i], " PV=", self.hh.getPVFromHandle(handleList[i])) - print ("with error status=", pvd[i].getStatus()) - self._c_cafe.printStatusMessage(pvd[i].getStatus()) - if statusFlag: - statusLocal =pvd[i].getStatus() - statusFlag=False - - # - #else: - # statusList.append(status) - - - #Wht not as a memoryView? - - cdef unsigned int dtn - - localList=[] - - for i in range(0, len(handleList)): - - dtn = pvd[i].getDataType(); - dtcheck = getMatchedDataType(dt, dtn) - - #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) - #print (pvd[i].getAsString()) - #print (pvd[i].getAsDouble()) - - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native + statusList = [] + statusFlag = True + statusLocal = ICAFE_NORMAL + - if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName()))==1: - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) + #self._c_cafe.printStatusMessage(statusNoWait) - elif dtcheck==CAFE_CHAR: - localList.append( pvd[i].getAsLong()) # pvd[i].getAsChar() - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_HIGH: - print ("def getScalarList:") - print ("Entering 0 for element", i, "as channel is not connected!") - - #print (" vstatus = ", vStatus[i] , " pvd[i].status ", pvd[i].getStatus() ) - - #free(pvd) - if (cacheFlag==True): - return localList, statusLocal, statusList - - return localList, statusNoWait, vStatus # use vstatus instead of statusList (as cache is NoWait) - #return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) - - ################################################################################## - #END: def getScalarList(self, handleList, dt): - ################################################################################## + # if cacheFlag==True: + if True: # For all cases Added Oct 2018 + # if status !=ICAFE_NORMAL: + # if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + # self._c_cafe.printStatusMessage(status) + # status=ICAFE_NORMAL + for i in range(0, v.size()): #len(handleList)): + statusList.append(pvd[i].getStatus()) + if pvd[i].getStatus() != ICAFE_NORMAL: + print("Error in Element ", i, " from ", len( + handleList), " in PyCafe def getScalarList") + print("Handle= ", handleList[i], " PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvd[i].getStatus()) + self._c_cafe.printStatusMessage(pvd[i].getStatus()) + if statusFlag: + statusLocal = pvd[i].getStatus() + statusFlag = False + # + # else: + # statusList.append(status) - ### # int alarmStatus=None, int alarmSev=None): - ################################################################################## - def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): - ################################################################################## - cdef str _METHOD_="getCompoundList(handleList, str dt='native')" - - if isinstance(handleList, (str)): - handleList=self.getHandlesFromWithinGroup(handleList) - else: - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + # Wht not as a memoryView? + + cdef unsigned int dtn + + localList = [] + + for i in range(0, v.size()): #len(handleList)): + + dtn = pvd[i].getDataType() + dtcheck = getMatchedDataType(dt, dtn) + + #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + #print (pvd[i].getAsString()) + #print (pvd[i].getAsDouble()) + + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + + if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) + + elif dtcheck == CAFE_CHAR: + # pvd[i].getAsChar() + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(0) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + print("def getScalarList:") + print("Entering 0 for element", i, + "as channel is not connected!") + + #print (" vstatus = ", vStatus[i] , " pvd[i].status ", pvd[i].getStatus() ) + + # free(pvd) + if (cacheFlag == True): + return localList, statusLocal, statusList + + # use vstatus instead of statusList (as cache is NoWait) + return localList, statusNoWait, vStatus + # return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) + + ################################################################################## + # END: def getScalarList(self, handleList, dt): + ################################################################################## + + + def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, + scalarOnly: bool = False): + cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + + pvList = None + handleList = pvhandleList + + if isinstance(handleList, (str)): + handleList = self.getHandlesFromWithinGroup(handleList) + if not handleList: + raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + "First input argument should be " + + "of handles or PVs\nelse for " + + "CAFE 'group' name")) + else: + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ First input argument, should be of handles or PVs") - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ -First input argument, should be a 'list' of if handles or if PVs") + if isinstance(handleList[0], (str)): + pvList = handleList + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") - #pack into vectors - cdef vector[unsigned int] v - cdef vector[int] vStatus + if scalarOnly: + value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + else: + value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) - cdef vector[int] vRB + pvdict = OrderedDict() + for i in range(0, len(handleList)): + _val = value[i] + if status[i] != ICAFE_NORMAL: + _val = None + pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val - v.reserve (len(handleList)) - vStatus.reserve(len(handleList)) + return pvdict - cdef bint flagCompound=False + # int alarmStatus=None, int alarmSev=None): + ################################################################################## + def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): + ################################################################################## + cdef str _METHOD = "getCompoundList(handleList, str dt='native')" - cdef unsigned int nelemLocal=1 + if isinstance(handleList, (str)): + handleList = self.getHandlesFromWithinGroup(handleList) + if not handleList: + raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + "First input argument should be " + + "of handles or PVs\nelse for " + + "CAFE 'group' name")) + else: + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ +First input argument, should be of handles or PVs") - for i in range(0, len(handleList)): - v.push_back(handleList[i]) #do this copy to avoid compiler warning messages - - if (nelemLocal==1): - nelemLocal=self.hh.getNelemNative(handleList[i]) - if nelemLocal > 1: - flagCompound=True + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") + # pack into vectors + cdef vector[unsigned int] v + cdef vector[int] vStatus - if (cacheFlag == False): + cdef vector[int] vRB - #Need to copy to a vector since - #Coercion from Python not allowed without the GIL - with nogil: - status=self._c_cafe.getV(v, vStatus) + v.reserve(len(handleList)) + vStatus.reserve(len(handleList)) - #ca_poll() Not required as above will flush! + cdef bint flagCompound = False - #Wait for bundle - - with nogil: - statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) - if (statusBundle!=ICAFE_NORMAL): - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("Error in def getCompoundList: ") - self._c_cafe.printStatusMessage(statusBundle) + cdef unsigned int nelemLocal = 1 - cdef unsigned int dtcheck=CAFE_NOT_REQUESTED #native type not yet know - dtcheck=getMatchedDataType(dt, dtcheck) + for i in range(0, len(handleList)): + # do this copy to avoid compiler warning messages + v.push_back(handleList[i]) - #Use Scalar - if flagCompound == False: + if (nelemLocal == 1): + nelemLocal = self.hh.getNelemNative(handleList[i]) + if nelemLocal > 1: + flagCompound = True - if dtcheck in [CAFE_STRING]: + status = ICAFE_NORMAL - self.vStr.clear() - self.vStr.reserve(len(handleList)) + if not cacheFlag: - with nogil: - status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + # Need to copy to a vector since + # Coercion from Python not allowed without the GIL + with nogil: + status = self._c_cafe.getV(v, vStatus) + #print("getCompound", status, vStatus) + # ca_poll() Not required as above will flush! + + # Wait for bundle + + with nogil: + statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + + if (statusBundle != ICAFE_NORMAL): + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in def getCompoundList: ") + self._c_cafe.printStatusMessage(statusBundle) + + cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + dtcheck = getMatchedDataType(dt, dtcheck) + + # Use Scalar + if not flagCompound: + + if dtcheck in [CAFE_STRING]: + + self.vStr.clear() + self.vStr.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + + return self.vStr, status, vStatus + + elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + + self.vInt.clear() + self.vInt.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + #print("getCompound", status, vStatus) + return self.vInt, status, vStatus + + elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + + self.vFloat.clear() + self.vFloat.reserve(len(handleList)) + + with nogil: + status = self._c_cafe.getCacheVDouble( + v, self.vFloat, vStatus) + + return self.vFloat, status, vStatus + + # continue Can be a compound or native + # Native + # Create temporary group from handleList + # Does group exist? + + cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + + # Required to allocate memory for shared pointer + for i in range(0, v.size()): #len(handleList)): + pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + + statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + + statusList = [] + statusFlag = True + statusLocal = ICAFE_NORMAL + + if cacheFlag: + for i in range(0, v.size()): #len(handleList)): + statusList.append(pvd[i].getStatus()) + if pvd[i].getStatus() != ICAFE_NORMAL: + print("Error in Element ", i, " from ", len( + handleList), " in PyCafe def getCompundList") + print("Handle= ", handleList[i], " PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvd[i].getStatus()) + self._c_cafe.printStatusMessage(pvd[i].getStatus()) + if statusFlag: + statusLocal = pvd[i].getStatus() + statusFlag = False + + cdef unsigned int dtn + + localList = [] + + for i in range(0, v.size()): #len(handleList)): + + dtn = pvd[i].getDataType() + dtcheck = getMatchedDataType(dt, dtn) + + if pvd[i].getNelem() == 1: + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + if self._c_cafe.isEnum(handleList[i]) == 1: + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) + + elif dtcheck == CAFE_CHAR: + localList.append(< unsigned char > pvd[i].getAsChar()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(0) # no data + else: + localListInner = [] + if dtcheck == CAFE_STRING: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsString(j)) + elif dtcheck == CAFE_SHORT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_FLOAT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + elif dtcheck == CAFE_ENUM: + + for j in range(0, pvd[i].getNelem()): + # if enum, string taken as native + if self._c_cafe.isEnum(handleList[i]) == 1: + localListInner.append(pvd[i].getAsString(j)) + else: + localListInner.append(pvd[i].getAsLong(j)) + + elif dtcheck == CAFE_CHAR: + for j in range(0, pvd[i].getNelem()): + # pvd[i].getAsChar(j)) + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_LONG: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_DOUBLE: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + else: + for j in range(0, pvd[i].getNelem()): + localListInner.append(0) # no data + localList.append(localListInner) + + # free(pvd) + if cacheFlag: + return localList, statusLocal, statusList + # use vstatus instead of statusList (as cache is NoWait) + return localList, status, vStatus + + ################################################################################## + # END: def getCompoundList(self, handleList, dt): + ################################################################################## + + ################################################################################## + + def getCompoundPVGroup(self, ghandleName, str dt='native'): + ################################################################################## + cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + + raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ +First input argument, should be of type if group handle, else if group name") + + handleList = [] + handleList = self.getHandlesFromWithinGroup(ghandle) + + localList = [] + statusList = [] + + cdef vector[unsigned int] hV - #localList=[] - #statusList=[] + for i in range(0, len(handleList)): + hV.push_back(handleList[i]) + + self.hh.setCafeDbrTypeV(hV, DBR_TIME) + + localList, status, statusList = self.getCompoundList(handleList, dt) + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + cdef PVDataHolder * pvd + pvd = pvg.getPVData() + + cdef pvdata p1 + + localListToStruct = [] + + cdef int groupStatus = ICAFE_NORMAL + + for i in range(0, pvg.getNPV()): + p1 = pvdata() + + # pvd[i].setDouble(localList[i]) + p1 = PVDataHolderToStruct(pvd[i], dt) + + if not isinstance(localList[i], (list)): + ll = [] + ll.append(localList[i]) + p1.value = ll + else: + p1.value = localList[i] # put into List! + + p1.status = statusList[i] + + if groupStatus == ICAFE_NORMAL: + groupStatus = statusList[i] + + aStatSev = [] + aStatSev = self.getAlarmStatusSeverity(handleList[i]) + p1.alarmStatus = aStatSev[0] + p1.alarmSeverity = aStatSev[1] + + p1.ts = self.getTimeStamp(handleList[i]) + p1.tsDate = self.getTimeStampAsDate(handleList[i]) + + localListToStruct.append(p1) + + cpdef pvgroup pg + + pg = pvgroup() + + pg.pvdata = localListToStruct + # pg.pvdata[0].showMax(10) + + pg.npv = pvg.getNPV() + pg.name = pvg.getNameAsString() + pg.groupStatus = groupStatus # pvg.getStatusGroup() + pg.groupHandle = pvg.getGroupHandle() + + pg.showMax(1) - #for i in range(0, len(self.vStr)): - #localList.append( self.vStr[i]) - return self.vStr, status, vStatus + return pg - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - - self.vInt.clear() - self.vInt.reserve(len(handleList)) - - with nogil: - status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) - - #localList=[] - #statusList=[] - - return self.vInt, status, vStatus - - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - - self.vFloat.clear() - self.vFloat.reserve(len(handleList)) - - with nogil: - status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) - - #localList=[] - #statusList=[] - - return self.vFloat, status, vStatus - - - #continue Can be a compound or native - #Native - #Create temporary group from handleList - #Does group exist? - cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) - - - #Required to allocate memory for shared pointer - for i in range(0, len(handleList)): - pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) - - statusNoWait=self._c_cafe.getCachePVArrayNoWait(v, pvd) - - statusList=[] - statusFlag=True - statusLocal=ICAFE_NORMAL - - if (cacheFlag==True): - for i in range(0, len(handleList)): - statusList.append(pvd[i].getStatus()) - if pvd[i].getStatus() != ICAFE_NORMAL: - print ("Error in Element ", i, " from ", len(handleList), " in PyCafe def getCompundList") - print ("Handle= ", handleList[i], " PV=", self.hh.getPVFromHandle(handleList[i])) - print ("with error status=", pvd[i].getStatus()) - self._c_cafe.printStatusMessage(pvd[i].getStatus()) - if statusFlag: - statusLocal =pvd[i].getStatus() - statusFlag=False - - cdef unsigned int dtn - - localList=[] - - for i in range(0, len(handleList)): - - dtn = pvd[i].getDataType(); - dtcheck = getMatchedDataType(dt, dtn) - - if pvd[i].getNelem() == 1: - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - if self._c_cafe.isEnum(handleList[i])==1: - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) - - elif dtcheck==CAFE_CHAR: - localList.append( pvd[i].getAsChar()) - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) #no data - else: - localListInner=[] - if dtcheck==CAFE_STRING: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsString(j)) - elif dtcheck==CAFE_SHORT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_FLOAT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - elif dtcheck==CAFE_ENUM: - - for j in range(0, pvd[i].getNelem()): - #if enum, string taken as native - if self._c_cafe.isEnum(handleList[i])==1: - localListInner.append(pvd[i].getAsString(j)) - else: - localListInner.append(pvd[i].getAsLong(j)) - - elif dtcheck==CAFE_CHAR: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) # pvd[i].getAsChar(j)) - elif dtcheck==CAFE_LONG: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_DOUBLE: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - else: - for j in range(0, pvd[i].getNelem()): - localListInner.append(0) #no data - localList.append(localListInner) - - - #free(pvd) - if (cacheFlag==True): - return localList, statusLocal, statusList - return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) - - ################################################################################## - #END: def getCompoundList(self, handleList, dt): - ################################################################################## - - - - ################################################################################## - def getCompoundPVGroup(self, ghandleName, str dt='native'): - ################################################################################## - cdef str _METHOD_="getCompoundPVGroup(ghandleName, str dt='native')" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - - raise Exception ("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ -First input argument, should be if group handle, else if group name") - - handleList=[] - handleList=self.getHandlesFromWithinGroup(ghandle) - - localList=[] - statusList=[] - - cdef vector[unsigned int] hV - - for i in range(0, len(handleList)): - hV.push_back(handleList[i]) - - self.hh.setCafeDbrTypeV(hV, DBR_TIME) - - localList, status, statusList=self.getCompoundList(handleList, dt) - - cdef PVGroup pvg - - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) - - cdef PVDataHolder * pvd - pvd=pvg.getPVData() - - cdef pvdata p1 - - localListToStruct=[] - - cdef int groupStatus=ICAFE_NORMAL - - for i in range(0, pvg.getNPV()): - p1 = pvdata() - - #pvd[i].setDouble(localList[i]) - p1=PVDataHolderToStruct(pvd[i], dt) - - if not isinstance(localList[i],(list)): - ll=[] - ll.append(localList[i]) - p1.value=ll - else: - p1.value=localList[i] #put into List! - - p1.status=statusList[i] - - if groupStatus == ICAFE_NORMAL: - groupStatus=statusList[i] - - aStatSev=[] - aStatSev=self.getAlarmStatusSeverity(handleList[i]) - p1.alarmStatus=aStatSev[0] - p1.alarmSeverity=aStatSev[1] - - p1.ts=self.getTimeStamp(handleList[i]) - p1.tsDate=self.getTimeStampAsDate(handleList[i]) - - #p1.showMax(10) - localListToStruct.append(p1) - - #for j in range (0, len(localListToStruct)): - #localListToStruct[j].showMax(10) - - - - cpdef pvgroup pg - - pg = pvgroup() - - pg.pvdata=localListToStruct - #pg.pvdata[0].showMax(10) - - pg.npv=pvg.getNPV() - pg.name=pvg.getNameAsString() - pg.groupStatus=groupStatus #pvg.getStatusGroup() - pg.groupHandle=pvg.getGroupHandle() - - #pg.showMax(1) - - return pg - - ################################################################################## - #END: def getCompoundPVGroup(self, handleList, dt): - ################################################################################## - - - - ################################################################################## - def getStrCache(self, handlePV): - return self.getCache(handlePV,'str') - ################################################################################## - - ################################################################################## - def getIntCache(self, handlePV): - return self.getCache(handlePV,'int') - ################################################################################## - - ################################################################################## - def getFloatCache(self, handlePV): - return self.getCache(handlePV,'float') - ################################################################################## - - ################################################################################## - def getCache(self, handlePV, str dt='native'): - cdef str _METHOD_="getCache(handlePV, str dt='native')" - - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def getCache. \n\ -First input argument, should be if handle, else if PV") - - cdef long dtr=0 - status=self.hh.getDataTypeNative(handle, dtr) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - raise Exception("EXCEPTION RAISED in PyCafe def getCache. Status = %d" %status) - return None - - elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: - if self._c_cafe.isChannelConnected(handle) is False: - self._c_cafe.getChannelInfo(handle,self.channelInfo) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,self.channelInfo.getCafeConnectionState() ) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ - _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) - raise Exception(_cyCafeException) - return [None] - - #Likely to be superfluous - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) - raise Exception(_cyCafeException) - return [None] - - - cdef unsigned int dtcheck = dtr - dtcheck=getMatchedDataType(dt, dtr) - - if dtcheck in [CAFE_STRING]: - status=self._c_cafe.getCacheString(handle, self.valStr) - if status==ICAFE_NORMAL: - return self.valStr - - elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: - status=self._c_cafe.getCacheLong(handle, self.valInt) - if status==ICAFE_NORMAL: - return self.valInt - - elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: - status=self._c_cafe.getCacheDouble(handle, self.valFloat) - if status==ICAFE_NORMAL: - return self.valFloat - - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - if self._c_cafe.isEnum(handle): - status=self._c_cafe.getCacheString(handle, self.valStr) - if status==ICAFE_NORMAL: - return self.valStr - else: - status=self._c_cafe.getCacheLong(handle, self.valInt) - if status ==ICAFE_NORMAL: - return self.valInt - - else: - status=self.hh.getStatus(handle) - if status == ICAFE_NORMAL: - print ("This line in PyCafe def getCache should never appear!") - print ("Datatype unknown, returning value 0") - return 0 - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - - - ################################################################################## - - - - ################################################################################## - def getStrArrayCache(self, handlePV, str art='memoryview'): - return self.getArrayCache(handlePV, dt='str', art=art) - ################################################################################## - - ################################################################################## - def getIntArrayCache(self, handlePV, str art='memoryview'): - return self.getArrayCache(handlePV, dt='int', art=art) - ################################################################################## - - ################################################################################## - def getFloatArrayCache(self, handlePV, str art='memoryview'): - return self.getArrayCache(handlePV, dt='float', art=art) - ################################################################################## - - - ################################################################################## - def getArrayCache(self, handlePV, str dt='native', str art='memoryview'): - ################################################################################## - #Typed Memoryviews from K.W. Smith - #Cython has a C-level type the typed memoryview, that conceptually overlaps - #with the Python memoryiew and expands on it. A typed memory view is used to - #view (share) data from a buffer-producing object. - #A typed memoryview has a memory-view like interface and is easier to use than - #workingwith C-lvevel buffers directly. And because a typed memoryview is designed - #to work with the buffer protocol it supports any buffer-producing object efficiently - #allowing sharing of data buffers without copying - - cdef str _METHOD_="getArrayCache" - - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception("{} {} {}".format(self.exString, _METHOD_, \ - "First input argument should be if handle, else if PV")) - - cdef: - short * i16val - int * ival - double * dval - float * fval - dbr_string_t * sval - cnp.int16_t [::1] mvShort #C-contiguous - int [::1] mvInt #C-contiguous - double [::1] mvDouble #C-contiguous - float [::1] mvFloat #C-contiguous - #str [:,::1] mvStr - cnp.ndarray arr - long dtr=0 - int status - unsigned int i - unsigned int ij - - - status=self.hh.getDataTypeNative(handle, dtr) - - if status != ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return [None] - - - - elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: - if self._c_cafe.isChannelConnected(handle) is False: - self._c_cafe.getChannelInfo(handle,self.channelInfo) - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,self.channelInfo.getCafeConnectionState() ) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ - _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) - raise Exception(_cyCafeException) - return [None] - - #Likely to be superfluous - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) - raise Exception(_cyCafeException) - return [None] - - - cdef unsigned int nelemToRetrieveFromCache=self.hh.getNelemToRetrieveFromCache(handle) - - cdef unsigned int dtcheck = dtr - dtcheck=getMatchedDataType(dt, dtr) - - - #The elemnt type of a typed memoryview may be a numeric scalar type (int, float) - #It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct - - if dtcheck in [CAFE_STRING, CAFE_ENUM]: - sval = malloc( nelemToRetrieveFromCache * sizeof(dbr_string_t)) - - status=self._c_cafe.getCacheDbrStringArray(handle, sval) - - locallist=[] - - if status==ICAFE_NORMAL: - - for i in range(0,nelemToRetrieveFromCache): - locallist.append(sval[i]) - - free(sval) - return locallist - - if status==ICAFE_NORMAL: - - if art in ['numpy','ndarray','numpy.ndarray']: - mvStr = np.empty(nelemToRetrieveFromCache, dtype=(np.str_,40)) - for i in range(0, nelemToRetrieveFromCache): - mvStr[i]=str(sval[i]) - free(sval) - - return mvStr - - elif art in ['memoryview','mv','memoryviewslice']: - mvStr = np.empty(nelemToRetrieveFromCache, dtype=(np.str_,40), order='C') - - for ij in range(0, nelemToRetrieveFromCache): - mvStr[ij]=str(sval[ij]) - free(sval) - - return mvStr - - elif art in ['array','array.array']: - print ("PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") - #RETURNING LIST - DOES NOT SUPPORT array of strings; - - arrayArray=[] - for ij in range(0, nelemToRetrieveFromCache): - arrayArray.append(str(sval[ij])) - free(sval) - return arrayArray - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_char_p*nelemToRetrieveFromCache)() #c_wchar_p is unicode! - for ij in range(0, nelemToRetrieveFromCache): - ctypesArray[ij]=(sval[ij]).encode('utf-8') - free(sval) - return ctypesArray - - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvStr = np.empty(nelemToRetrieveFromCache, dtype=(np.str_,40), order='C') - for ij in range(0, nelemToRetrieveFromCache): - mvStr[ij]=sval[ij] - free(sval) - - return mvStr - - elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: - - i16val = malloc( nelemToRetrieveFromCache * sizeof(np.int16)) - - status=self._c_cafe.getCacheShortArray(handle, i16val) - - 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']: - - mvShortNP = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') - - for ij in range(0, nelemToRetrieveFromCache): - mvShortNP[ij]=i16val[ij] - #arr=np.asarray(mvShort) - - free(i16val) - - return mvShortNP #arr - - elif art in ['memoryview','mv','memoryviewslice']: - mvShort = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') - - for ij in range(0, nelemToRetrieveFromCache): - mvShort[ij]=i16val[ij] - free(i16val) - - return mvShort - - elif art in ['array','array.array']: - arrayArray=array.array('h') - for ij in range(0, nelemToRetrieveFromCache): - arrayArray.append(i16val[ij]) - free(i16val) - return arrayArray - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_int16*nelemToRetrieveFromCache)() - for ij in range(0, nelemToRetrieveFromCache): - ctypesArray[ij]=i16val[ij] - free(i16val) - return ctypesArray - - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvShort = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') - for ij in range(0, nelemToRetrieveFromCache): - mvShort[ij]=i16val[ij] - free(i16val) - - return mvShort - - - elif dtcheck in [CAFE_LONG]: - - ival = malloc( nelemToRetrieveFromCache * sizeof(np.int32)) - - status=self._c_cafe.getCacheLongArray(handle, ival) - - if status==ICAFE_NORMAL: - - if art in ['numpy','ndarray','numpy.ndarray']: - - mvIntNP = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') - for ij in range(0, nelemToRetrieveFromCache): - mvIntNP[ij]=ival[ij] - free(ival) - return mvIntNP #arr - - elif art in ['memoryview','mv','memoryviewslice']: - mvInt = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') - for ij in range(0, nelemToRetrieveFromCache): - mvInt[ij]=ival[ij] - free(ival) - return mvInt - - elif art in ['array','array.array']: - arrayArray=array.array('h') - for ij in range(0, nelemToRetrieveFromCache): - arrayArray.append(ival[ij]) - free(ival) - return arrayArray - - elif art in ['ctypes', 'ctype']: - ctypesArray=(ctypes.c_int32*nelemToRetrieveFromCache)() - for ij in range(0, nelemToRetrieveFromCache): - ctypesArray[ij]=ival[ij] - free(ival) - return ctypesArray - - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvInt = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') - for ij in range(0, nelemToRetrieveFromCache): - mvInt[ij]=ival[ij] - free(ival) - return mvInt - - - elif dtcheck in [CAFE_FLOAT]: - - fval = malloc( nelemToRetrieveFromCache * sizeof(float)) - - status=self._c_cafe.getCacheFloatArray(handle, fval) - - if status==ICAFE_NORMAL: - - if art in ['numpy','ndarray','numpy.ndarray']: - - mvFloatNP = np.empty(nelemToRetrieveFromCache, dtype=np.float32) - for ij in range(0, nelemToRetrieveFromCache): - mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) - - free(fval) - - return mvFloatNP #arr - - elif art in ['memoryview','mv','memoryviewslice']: - - - #Method A to return memory view - mvFloat = np.empty(nelemToRetrieveFromCache, dtype=np.float32) - for ij in range(0, nelemToRetrieveFromCache): - mvFloat[ij]=fval[ij] - - free(fval) - return mvFloat - - - #Method B to return memory view - ''' + ################################################################################## + # END: def getCompoundPVGroup(self, handleList, dt): + ################################################################################## + + ################################################################################## + + def getStrCache(self, handlePV): + return self.getCache(handlePV, 'str') + ################################################################################## + + ################################################################################## + def getIntCache(self, handlePV): + return self.getCache(handlePV, 'int') + ################################################################################## + + ################################################################################## + def getFloatCache(self, handlePV): + return self.getCache(handlePV, 'float') + ################################################################################## + + ################################################################################## + + def getCache(self, handlePV, str dt='native'): + cdef str _METHOD = "getCache(handlePV, str dt='native')" + + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ + First input argument, should be of type if handle, else if PV") + + cdef long dtr = 0 + status = self.hh.getDataTypeNative(handle, dtr) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + raise Exception( + "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + return None + + elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + if self._c_cafe.isChannelConnected(handle) is False: + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus( + handle, self.channelInfo.getCafeConnectionState()) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=self.channelInfo.getCafeConnectionState(), + _error_text=self.cs.code( + self.channelInfo.getCafeConnectionState()), + _error_info=self.cs.info( + self.channelInfo.getCafeConnectionState())) + raise _cafeException + return None + + # Likely to be superfluous + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=ICAFE_TYPENOTCONN, + _error_text=self.cs.code(ICAFE_TYPENOTCONN), + _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + raise _cafeException + return None + + cdef unsigned int dtcheck = dtr + dtcheck = getMatchedDataType(dt, dtr) + + if dtcheck in [CAFE_STRING]: + status = self._c_cafe.getCacheString(handle, self.valStr) + if status == ICAFE_NORMAL: + return self.valStr + + elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + status = self._c_cafe.getCacheLong(handle, self.valInt) + if status == ICAFE_NORMAL: + return self.valInt + + elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + status = self._c_cafe.getCacheDouble(handle, self.valFloat) + if status == ICAFE_NORMAL: + return self.valFloat + + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + if self._c_cafe.isEnum(handle): + status = self._c_cafe.getCacheString(handle, self.valStr) + if status == ICAFE_NORMAL: + return self.valStr + else: + status = self._c_cafe.getCacheLong(handle, self.valInt) + if status == ICAFE_NORMAL: + return self.valInt + + else: + status = self.hh.getStatus(handle) + if status == ICAFE_NORMAL: + print("This line in PyCafe def getCache should never appear!") + print("Datatype unknown, returning value 0") + return 0 + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + ################################################################################## + + ################################################################################## + + def getStrArrayCache(self, handlePV, str art='numpy'): + return self.getArrayCache(handlePV, dt='str', art=art) + ################################################################################## + + ################################################################################## + def getIntArrayCache(self, handlePV, str art='numpy'): + return self.getArrayCache(handlePV, dt='int', art=art) + ################################################################################## + + ################################################################################## + def getFloatArrayCache(self, handlePV, str art='numpy'): + return self.getArrayCache(handlePV, dt='float', art=art) + ################################################################################## + + ################################################################################## + def getArrayCache(self, handlePV, str dt='native', str art='numpy'): + ################################################################################## + # Typed Memoryviews from K.W. Smith + # Cython has a C-level type the typed memoryview, that conceptually overlaps + # with the Python memoryiew and expands on it. A typed memory view is used to + # view (share) data from a buffer-producing object. + # A typed memoryview has a memory-view like interface and is easier to use than + # workingwith C-lvevel buffers directly. And because a typed memoryview is designed + # to work with the buffer protocol it supports any buffer-producing object efficiently + # allowing sharing of data buffers without copying + + cdef str _METHOD = "getArrayCache" + + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} {}".format(self._exception_text, _METHOD, + "First input argument should be of type if handle, else if PV")) + + cdef: + short * i16val + int * ival + double * dval + float * fval + dbr_string_t * sval + cnp.int16_t[::1] mvShort # C-contiguous + int[::1] mvInt # C-contiguous + double[::1] mvDouble # C-contiguous + float[::1] mvFloat # C-contiguous + # str [:,::1] mvStr + cnp.ndarray arr + long dtr = 0 + int status + unsigned int i + unsigned int ij + + status = self.hh.getDataTypeNative(handle, dtr) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + return [None] + + elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + if self._c_cafe.isChannelConnected(handle) is False: + self._c_cafe.getChannelInfo(handle, self.channelInfo) + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus( + handle, self.channelInfo.getCafeConnectionState()) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=self.channelInfo.getCafeConnectionState(), + _error_text=self.cs.code( + self.channelInfo.getCafeConnectionState()), + _error_info=self.cs.info( + self.channelInfo.getCafeConnectionState())) + raise _cafeException + return [None] + + # Likely to be superfluous + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=ICAFE_TYPENOTCONN, + _error_text=self.cs.code(ICAFE_TYPENOTCONN), + _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + raise _cafeException + return [None] + + cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) + + cdef unsigned int dtcheck = dtr + dtcheck = getMatchedDataType(dt, dtr) + + # The element type of a typed memoryview may be a numeric scalar type (int, float) + # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + + if dtcheck in [CAFE_STRING, CAFE_ENUM]: + sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + + status = self._c_cafe.getCacheDbrStringArray(handle, sval) + + locallist = [] + + if status == ICAFE_NORMAL: + + for i in range(0, nelemToRetrieveFromCache): + locallist.append(sval[i]) + + free(sval) + return locallist + + if status == ICAFE_NORMAL: + + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + mvStr = np.empty(nelemToRetrieveFromCache, + dtype=(np.str_, 40)) + for i in range(0, nelemToRetrieveFromCache): + mvStr[i] = str(sval[i]) + free(sval) + + return mvStr + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + mvStr = np.empty(nelemToRetrieveFromCache, + dtype=(np.str_, 40), order='C') + + for ij in range(0, nelemToRetrieveFromCache): + mvStr[ij] = str(sval[ij]) + free(sval) + + return mvStr + + elif art in ['array', 'array.array']: + print( + "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + # RETURNING LIST - DOES NOT SUPPORT array of strings; + + arrayArray = [] + for ij in range(0, nelemToRetrieveFromCache): + arrayArray.append(str(sval[ij])) + free(sval) + return arrayArray + + elif art in ['ctypes', 'ctype']: + # c_wchar_p is unicode! + ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() + for ij in range(0, nelemToRetrieveFromCache): + ctypesArray[ij] = (sval[ij]).encode('utf-8') + free(sval) + return ctypesArray + + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvStr = np.empty(nelemToRetrieveFromCache, + dtype=(np.str_, 40), order='C') + for ij in range(0, nelemToRetrieveFromCache): + mvStr[ij] = sval[ij] + free(sval) + + return mvStr + + elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + + i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + + status = self._c_cafe.getCacheShortArray(handle, i16val) + + 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']: + + mvShortNP = np.empty( + nelemToRetrieveFromCache, dtype=np.int16, order='C') + + for ij in range(0, nelemToRetrieveFromCache): + mvShortNP[ij] = i16val[ij] + # arr=np.asarray(mvShort) + + free(i16val) + + return mvShortNP # arr + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + mvShort = np.empty( + nelemToRetrieveFromCache, dtype=np.int16, order='C') + + for ij in range(0, nelemToRetrieveFromCache): + mvShort[ij] = i16val[ij] + free(i16val) + + return mvShort + + elif art in ['array', 'array.array']: + arrayArray = array.array('h') + for ij in range(0, nelemToRetrieveFromCache): + arrayArray.append( < short > i16val[ij]) + free(i16val) + return arrayArray + + elif art in ['ctypes', 'ctype']: + ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + for ij in range(0, nelemToRetrieveFromCache): + ctypesArray[ij] = i16val[ij] + free(i16val) + return ctypesArray + + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvShort = np.empty( + nelemToRetrieveFromCache, dtype=np.int16, order='C') + for ij in range(0, nelemToRetrieveFromCache): + mvShort[ij] = i16val[ij] + free(i16val) + + return mvShort + + elif dtcheck in [CAFE_LONG]: + + ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) + + status = self._c_cafe.getCacheLongArray(handle, ival) + + if status == ICAFE_NORMAL: + + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + + mvIntNP = np.empty( + nelemToRetrieveFromCache, dtype=np.int32, order='C') + for ij in range(0, nelemToRetrieveFromCache): + mvIntNP[ij] = ival[ij] + free(ival) + return mvIntNP # arr + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + mvInt = np.empty(nelemToRetrieveFromCache, + dtype=np.int32, order='C') + for ij in range(0, nelemToRetrieveFromCache): + mvInt[ij] = ival[ij] + free(ival) + return mvInt + + elif art in ['array', 'array.array']: + arrayArray = array.array('h') + for ij in range(0, nelemToRetrieveFromCache): + arrayArray.append( < int > ival[ij]) + free(ival) + return arrayArray + + elif art in ['ctypes', 'ctype']: + ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + for ij in range(0, nelemToRetrieveFromCache): + ctypesArray[ij] = ival[ij] + free(ival) + return ctypesArray + + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvInt = np.empty(nelemToRetrieveFromCache, + dtype=np.int32, order='C') + for ij in range(0, nelemToRetrieveFromCache): + mvInt[ij] = ival[ij] + free(ival) + return mvInt + + elif dtcheck in [CAFE_FLOAT]: + + fval = malloc(nelemToRetrieveFromCache * sizeof(float)) + + status = self._c_cafe.getCacheFloatArray(handle, fval) + + if status == ICAFE_NORMAL: + + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + + mvFloatNP = np.empty( + nelemToRetrieveFromCache, dtype=np.float32) + for ij in range(0, nelemToRetrieveFromCache): + mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + + free(fval) + + return mvFloatNP # arr + + elif art in ['memoryview', 'mv', 'memoryviewslice']: + + # Method A to return memory view + mvFloat = np.empty( + nelemToRetrieveFromCache, dtype=np.float32) + for ij in range(0, nelemToRetrieveFromCache): + mvFloat[ij] = fval[ij] + + free(fval) + return mvFloat + + # Method B to return memory view + ''' mvDoubleArray=cvarray(shape=(nelemToRetrieveFromCache,), itemsize=sizeof(double), format="d") cyarr_view=mvDoubleArray for i in range(0, nelemToRetrieveFromCache): @@ -4107,808 +4826,864 @@ First input argument, should be if handle, else if PV" return cyarr_view ''' + elif art in ['array', 'array.array']: + arrayArray = array.array('f') + for ij in range(0, nelemToRetrieveFromCache): + arrayArray.append(fval[ij]) + free(fval) + return arrayArray - elif art in ['array','array.array']: - arrayArray=array.array('f') - for ij in range(0, nelemToRetrieveFromCache): - arrayArray.append(fval[ij]) - free(fval) - return arrayArray + elif art in ['ctypes', "ctype"]: + ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + for ij in range(0, nelemToRetrieveFromCache): + ctypesArray[ij] = fval[ij] + free(fval) + return ctypesArray - elif art in ['ctypes', "ctype"]: - ctypesArray=(ctypes.c_float*nelemToRetrieveFromCache)() - for ij in range(0, nelemToRetrieveFromCache): - ctypesArray[ij]=fval[ij] - free(fval) - return ctypesArray + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvFloat = np.empty( + nelemToRetrieveFromCache, dtype=np.float32) + for ij in range(0, nelemToRetrieveFromCache): + mvFloat[ij] = fval[ij] + free(fval) + return mvFloat - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvFloat = np.empty(nelemToRetrieveFromCache, dtype=np.float32) - for ij in range(0, nelemToRetrieveFromCache): - mvFloat[ij]=fval[ij] - free(fval) - return mvFloat - + elif dtcheck in [CAFE_DOUBLE]: - - elif dtcheck in [CAFE_DOUBLE]: + dval = malloc(nelemToRetrieveFromCache * sizeof(double)) - dval = malloc( nelemToRetrieveFromCache * sizeof(double)) - - status=self._c_cafe.getDoubleArray(handle, dval) + status = self._c_cafe.getDoubleArray(handle, dval) - if status==ICAFE_NORMAL: - - if art in ['numpy','ndarray','numpy.ndarray']: + if status == ICAFE_NORMAL: - - mvDoubleNP = np.empty(nelemToRetrieveFromCache, dtype=np.float64) - for ij in range(0, nelemToRetrieveFromCache): - mvDoubleNP[ij]=dval[ij] - - free(dval) - return mvDoubleNP #arr + if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: - elif art in ['memoryview','mv','memoryviewslice']: + mvDoubleNP = np.empty( + nelemToRetrieveFromCache, dtype=np.float64) + for ij in range(0, nelemToRetrieveFromCache): + mvDoubleNP[ij] = dval[ij] - #Method A to return memory view - mvDouble = np.empty(nelemToRetrieveFromCache, dtype=np.float64) - for ij in range(0, nelemToRetrieveFromCache): - mvDouble[ij]=dval[ij] - free(dval) - return mvDouble + free(dval) + return mvDoubleNP # arr - elif art in ['array','array.array']: - arrayArray=array.array('d') - for ij in range(0, nelemToRetrieveFromCache): - arrayArray.append(dval[ij]) - free(dval) - return arrayArray + elif art in ['memoryview', 'mv', 'memoryviewslice']: - elif art in ['ctypes', "ctype"]: - ctypesArray=(ctypes.c_double*nelemToRetrieveFromCache)() - for ij in range(0, nelemToRetrieveFromCache): - ctypesArray[ij]=dval[ij] - free(dval) - return ctypesArray + # Method A to return memory view + mvDouble = np.empty( + nelemToRetrieveFromCache, dtype=np.float64) + for ij in range(0, nelemToRetrieveFromCache): + mvDouble[ij] = dval[ij] + free(dval) + return mvDouble - else: - print("Unknow array type in user request for art='",art,"'. Possible types are:") - print("memoryview, numpy, array, ctypes") - print("Returning memoryview") - mvDouble = np.empty(nelemToRetrieveFromCache, dtype=np.float64) - for ij in range(0, nelemToRetrieveFromCache): - mvDouble[ij]=dval[ij] - free(dval) - return mvDouble + elif art in ['array', 'array.array']: + arrayArray = array.array('d') + for ij in range(0, nelemToRetrieveFromCache): + arrayArray.append(dval[ij]) + free(dval) + return arrayArray - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - return [None] - - ################################################################################## - #END: def getArrayCache(self, handlePV, dt): - ################################################################################## - - - - ################################################################################## - def getPVStrCache(self, handlePV): - return self.getPVCache(handlePV,'str') - ################################################################################## - - ################################################################################## - def getPVIntCache(self, handlePV): - return self.getPVCache(handlePV,'int') - ################################################################################## - - ################################################################################## - def getPVFloatCache(self, handlePV): - return self.getPVCache(handlePV,'float') - ################################################################################## - - ################################################################################## - def getPVCache(self, handlePV, str dt='native'): - ################################################################################## - - cdef str _METHOD_="getPVCache(handlePV, str dt='native'" - - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ - First input argument, should be if handle, else if PV") - - cdef PVDataHolder pvd - - pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) + elif art in ['ctypes', "ctype"]: + ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + for ij in range(0, nelemToRetrieveFromCache): + ctypesArray[ij] = dval[ij] + free(dval) + return ctypesArray - status=self._c_cafe.getCache(handle, pvd) + else: + print("Unknow array type in user request for art='", + art, "'. Possible types are:") + print("memoryview, numpy, array, ctypes") + print("Returning memoryview") + mvDouble = np.empty( + nelemToRetrieveFromCache, dtype=np.float64) + for ij in range(0, nelemToRetrieveFromCache): + mvDouble[ij] = dval[ij] + free(dval) + return mvDouble - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - pvd_valnone=PVDataHolderToStruct(pvd, dt) - pvd_valnone.value[0]=None - return pvd_valnone + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, + _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + return [None] - return PVDataHolderToStruct(pvd, dt) + ################################################################################## + # END: def getArrayCache(self, handlePV, dt): + ################################################################################## + ################################################################################## - ################################################################################## - #END def getPVCache(self, handlePV): - ################################################################################## - - - ################################################################################## - def getCtrl(self, handlePV, str dt='native'): - ################################################################################## - - cdef str _METHOD_="getCtrl(handlePV, str dt='native')" - - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ -First input argument, should be if handle, else if PV") - - - cdef PVCtrlHolder pvc - - pvc.setNelem(self.hh.getNelemClientCtrl(handle)) #do this dynamically - - cdef int status - with nogil: - status=self._c_cafe.getCtrl(handle, pvc) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - pvc_valnone=PVCtrlHolderToStruct(pvc, dt) - pvc_valnone.value[0]=None - return pvc_valnone - return PVCtrlHolderToStruct(pvc, dt) - - ################################################################################## - #END: def getCtrl(self, handlePV, dt='native'): - ################################################################################## - - + def getPVStrCache(self, handlePV): + return self.getPVCache(handlePV, 'str') + ################################################################################## - ################################################################################## - def getCtrlCache(self, handlePV, str dt='native'): - ################################################################################## - cdef str _METHOD_="getCtrlCache(handlePV, str dt='native')" - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ -First input argument, should be if handle, else if PV") - - cdef PVCtrlHolder pvc - - pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) - - status=self._c_cafe.getCtrlCache(handle, pvc) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - pvc_valnone=PVCtrlHolderToStruct(pvc, dt) - pvc_valnone.value[0]=None - return pvc_valnone - - return PVCtrlHolderToStruct(pvc, dt) - - ################################################################################## - #END: def getCtrlCache(self, handlePV, dt='native'): - ################################################################################## - - - - ################################################################################## - def groupMonitorStop(self, ghandleName): - ################################################################################## - cdef str _METHOD_="groupMonitorStop(ghandleName)" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) - - cdef PVGroup pvg + ################################################################################## + def getPVIntCache(self, handlePV): + return self.getPVCache(handlePV, 'int') + ################################################################################## - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) - - cdef vector[int] vStatus - vStatus.reserve(pvg.getNPV()) - - with nogil: - status=self._c_cafe.groupMonitorStop(ghandle, vStatus) + ################################################################################## + def getPVFloatCache(self, handlePV): + return self.getPVCache(handlePV, 'float') + ################################################################################## - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) + ################################################################################## + def getPVCache(self, handlePV, str dt='native'): + ################################################################################## - return status, vStatus - - - ################################################################################## - #END: def groupMonitorStop(self, ghandleName): - ################################################################################## - - def getMonitorPolicyVector(self, handlePV, _monid): - - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV, force=True) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ -First input argument, should be if handle, else if PV") + cdef str _METHOD = "getPVCache(handlePV, str dt='native'" - - cdef vector[MonitorPolicy] mpV - - self.hh.getMonitorPolicyVector(handle, mpV) - - - cdef monitorpolicy mp - - mp = monitorpolicy() - - cdef unsigned int i - - - - for i in range (0, mpV.size()): - - if mpV[i].getMonitorID()== _monid: - - - mp.monid=mpV[i].getMonitorID() - - mp.nelem=mpV[i].getNelem() - - mp.dataType=mpV[i].getDataType() - mp.userArgs=mpV[i].getUserArgs() - mp.dbrDataType=mpV[i].getDbrDataType() - mp.cafeDbrType=mpV[i].getCafeDbrType() - mp.mask=mpV[i].getMask() - mp.maskHasDBE_PROPERTY=mpV[i].maskHasDBE_PROPERTY() - mp.maskHasDBE_VALUE=mpV[i].maskHasDBE_VALUE() - mp.maskHasDBE_LOG=mpV[i].maskHasDBE_LOG() - mp.maskHasDBE_ALARM=mpV[i].maskHasDBE_ALARM() - break - - return mp - - - ################################################################################## - def groupMonitorStart(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM): - ########################################################################################## - cdef str _METHOD_="groupMonitorStart(ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + cdef unsigned int handle = 0 - - global monDictGlobal - - if dbr: - if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: - print ("***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) - print ("dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") - print ("Assuming DBR_TIME") - dbr=DBR_TIME - - global py_cb - - cdef vector[MonitorPolicy] mpV - cdef unsigned int mpid - - cdef PVGroup pvg + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ + First input argument, should be of type if handle, else if PV") - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) + cdef PVDataHolder pvd - cdef MonitorPolicy * mp - mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) - - for i in range(0, pvg.getNPV()): - - mp[i].setMask(mask) - mp[i].setCafeDbrType(dbr) - - mpid=mp[i].getMonitorID() - - if cb: - sig=inspect.signature(cb) - a=inspect.getargspec(cb) - - - #print ('============') - #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)) - #a=inspect.getargspec(cb) - #print ('a',a) - #print ('l',len(a[0])) - #print ('============') - - monDictGlobal[mpid]=cb + pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) - - if(len(sig.parameters)==1): - #if (len(a[0])==1): - mp[i].setUserArgs( mpid) - mp[i].setPyHandler() - else: - #print("setPyHandlerData") - py_cb=cb - mp[i].setPyHandlerData() - #print("setPyHandlerData//") - mpV.push_back(mp[i]) - - - cdef vector[int] vStatus - vStatus.reserve(pvg.getNPV()) - - with nogil: - status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + status = self._c_cafe.getCache(handle, pvd) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException - return status, vStatus - - ################################################################################## - + pvd_valnone = PVDataHolderToStruct(pvd, dt) + # pvd_valnone.value[0]=None + return pvd_valnone - ################################################################################## - def groupMonitorStartWithCBList(self, ghandleName, list cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM): - ########################################################################################## - cdef str _METHOD_="groupMonitorStartWithCBList(ghandleName, list cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + return PVDataHolderToStruct(pvd, dt) - - global monDictGlobal - - if dbr: - if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: - print ("***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) - print ("dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") - print ("Assuming DBR_TIME") - dbr=DBR_TIME - - if not isinstance(cb,(list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + ################################################################################## + # END def getPVCache(self, handlePV): + ################################################################################## + + ################################################################################## + def getCtrl(self, handlePV, str dt='native'): + ################################################################################## + + cdef str _METHOD = "getCtrl(handlePV, str dt='native')" + + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ +First input argument, should be of type if handle, else if PV") + + cdef PVCtrlHolder pvc + + pvc.setNelem(self.hh.getNelemClientCtrl(handle)) # do this dynamically + + cdef int status + with nogil: + status = self._c_cafe.getCtrl(handle, pvc) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + pvc_valnone.value[0] = None + return pvc_valnone + return PVCtrlHolderToStruct(pvc, dt) + + ################################################################################## + # END: def getCtrl(self, handlePV, dt='native'): + ################################################################################## + + ################################################################################## + + def getCtrlCache(self, handlePV, str dt='native'): + ################################################################################## + cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ +First input argument, should be of type if handle, else if PV") + + cdef PVCtrlHolder pvc + + pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) + + + status = self._c_cafe.getCtrlCache(handle, pvc) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, + _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + pvc_valnone.value[0] = None + return pvc_valnone + + return PVCtrlHolderToStruct(pvc, dt) + + ################################################################################## + # END: def getCtrlCache(self, handlePV, dt='native'): + ################################################################################## + + ################################################################################## + + def groupMonitorStop(self, ghandleName): + ################################################################################## + cdef str _METHOD = "groupMonitorStop(ghandleName)" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info= ("First input argument, should be of type " + "if group handle, else if group name")) + raise _cafeException + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + cdef vector[int] vStatus + vStatus.reserve(pvg.getNPV()) + + with nogil: + status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + return status, vStatus + + ################################################################################## + # END: def groupMonitorStop(self, ghandleName): + ################################################################################## + + def getMonitorPolicyVector(self, handlePV, _monid): + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV, force=True) + else: + raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ +First input argument, should be of type if handle, else if PV") + + cdef vector[MonitorPolicy] mpV + + self.hh.getMonitorPolicyVector(handle, mpV) + + cdef monitorpolicy mp + + mp = monitorpolicy() + + cdef unsigned int i + + for i in range(0, mpV.size()): + + if mpV[i].getMonitorID() == _monid: + + mp.monid = mpV[i].getMonitorID() + + mp.nelem = mpV[i].getNelem() + + mp.dataType = mpV[i].getDataType() + mp.userArgs = mpV[i].getUserArgs() + mp.dbrDataType = mpV[i].getDbrDataType() + mp.cafeDbrType = mpV[i].getCafeDbrType() + mp.mask = mpV[i].getMask() + mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + break + + return mp + + def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, + unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + unsigned short notify_milliseconds=0): + return self.groupMonitorStart(ghandleName, cb, dbr, mask, notify_milliseconds) + + ################################################################################## + def groupMonitorStart(self, ghandleName, object cb=None, + DBR_TYPE dbr=DBR_TIME, + unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + unsigned short notify_milliseconds=0): + ################################################################################## + cdef str _METHOD = "groupMonitorStart(ghandleName, cb, dbr, mask)" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + global monDictGlobal + global handleMonDictGlobal + + if dbr: + if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + print( + "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + print( + "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + print("Assuming DBR_TIME") + dbr = DBR_TIME + # Legacy + #global py_cb + + cdef vector[MonitorPolicy] mpV + cdef unsigned long mpid + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + cdef MonitorPolicy * mp + mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + + handleList = [] + handleList = self.getHandlesFromWithinGroup(ghandle) + + for i in range(0, pvg.getNPV()): + + mp[i].setMask(mask) + mp[i].setCafeDbrType(dbr) + mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + mpid = mp[i].getMonitorID() + + if cb: + sig = inspect.signature(cb) + # a=inspect.getargspec(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) + + mp[i].setUserArgs( < void*> mpid) + + if len(sig.parameters) == 1: + monDictGlobal[mpid] = cb + mp[i].setPyHandler() + + elif len(sig.parameters) == 2: + mp[i].setPyCyHandler( cb) + + elif len(sig.parameters) == 3: + handleMonDictGlobal[cb] = handleList[i] + mp[i].setPyCyHandlerData( cb) + + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="The signature of the monitor callback function is not supported. \ + Supported fns are: \ + 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + raise _cafeException + + mpV.push_back(mp[i]) + + cdef vector[int] vStatus + vStatus.reserve(pvg.getNPV()) + + with nogil: + status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + return status, vStatus + + ################################################################################## + + ############################################################################ + + def groupMonitorStartWithCBList(self, + ghandleName, list cb=None, + DBR_TYPE dbr=DBR_TIME, + unsigned int mask=\ + DBE_VALUE | DBE_LOG | DBE_ALARM, + unsigned short notify_milliseconds=0): + ############################################################################ + cdef str _METHOD = ("groupMonitorStartWithCBList(ghandleName, cb," + + + "dbr, mask, notify_milliseconds)") + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + global monDictGlobal + global handleMonDictGlobal + + if dbr: + if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + print( + "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + print( + "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + print("Assuming DBR_TIME") + dbr = DBR_TIME + + if not isinstance(cb, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ Input cb should be of type and give the list of cb objects") - - global py_cb - - cdef vector[MonitorPolicy] mpV - cdef unsigned int mpid - - cdef PVGroup pvg - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) + # April 2020 Legacy + #global py_cb - if (len(cb) != pvg.getNPV() ): - print("No of group members is ", pvg.getNPV(), " while list of callback objects is", len(cb)) - raise Exception ("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + cdef vector[MonitorPolicy] mpV + cdef unsigned long mpid + # cdef void *ptr_mpid + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + if (len(cb) != pvg.getNPV()): + print("No of group members is ", pvg.getNPV(), + " while list of callback objects is", len(cb)) + raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ No of group members doe not match the length of callback object list") - - cdef MonitorPolicy * mp - mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) - - for i in range(0, pvg.getNPV()): - - mp[i].setMask(mask) - mp[i].setCafeDbrType(dbr) - - mpid=mp[i].getMonitorID() - - if cb[i]: - sig=inspect.signature(cb[i]) - #a=inspect.getargspec(cb[i]) - - #print ('============') - #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)) - #a=inspect.getargspec(cb[i]) - #print ('a',a) - #print ('l',len(a[0])) - #print ('============') - monDictGlobal[mpid]=cb[i] - if(len(sig.parameters)==1): - #if (len(a[0])==1): - mp[i].setUserArgs( mpid) - mp[i].setPyHandler() - else: - py_cb=cb[i] - mp[i].setPyHandlerData() - - mpV.push_back(mp[i]) - - cdef vector[int] vStatus - vStatus.reserve(pvg.getNPV()) - - with nogil: - status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) + cdef MonitorPolicy * mp + mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) - return status, vStatus - - ################################################################################## - - def getGroupStr(self, ghandleName): - return self.getGroup(ghandleName, 'str') - - def getGroupInt(self, ghandleName): - return self.getGroup(ghandleName, 'int') - - def getGroupFloat(self, ghandleName): - return self.getGroup(ghandleName, 'float') - - ################################################################################## - def getGroup(self, ghandleName, str dt='native'): - cdef str _METHOD_="getGroup(ghandleName, str dt='native')" - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + handleList = [] + handleList = self.getHandlesFromWithinGroup(ghandle) - cdef PVGroup pvg + for i in range(0, pvg.getNPV()): - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) + mp[i].setMask(mask) + mp[i].setCafeDbrType(dbr) + mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) - cdef PVDataHolder * pvd - pvd=pvg.getPVData(); - for i in range (0, pvg.getNPV()): - pvd[i].setHasAlarm(False) - pvd[i].setHasTS(False) - #pvd[i].setRule(False) - - pvg.setPVData(pvd) - ##pvd=pvg.getPVData(); - #print "get rule 0p", pvd[0].getRule() - #print "get rule 1p", pvd[1].getRule() - #print "get rule 2p", pvd[2].getRule() - ## - - with nogil: - status=self._c_cafe.groupGet(ghandle, pvg) + mpid = mp[i].getMonitorID() + # pyobj = mpid + # ptr_mpid = &pyobj - if status == ECA_TIMEOUT : - print ("======================================================") - self._c_cafe.printStatusMessage(status) - print ("TIMEOUT in getGroup; switching to getCompoundList") - print ("======================================================") - return self.getCompoundList(pvg.getNameAsString(), dt) + # For setUserArgs pass the address of the variable. + if cb[i]: + sig = inspect.signature(cb[i]) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) + 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) # ( ptr_mpid)[0]) - #do not raise exception - #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) - #pvg.showMaxMax(5,10) - - pvd=pvg.getPVData() - - localList=[] - statusList=[] - cdef unsigned int dtn, dtcheck - - for i in range(0, pvg.getNPV()): - dtn = pvd[i].getDataType(); - - dtcheck=getMatchedDataType(dt, dtn) - - statusList.append(pvd[i].getStatus()) + mp[i].setUserArgs( < void * > mpid) # ( ptr_mpid)[0]) - if pvd[i].getNelem() == 1: - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native + if len(sig.parameters) == 1: + monDictGlobal[mpid] = cb[i] + mp[i].setPyHandler() + + elif len(sig.parameters) == 2: + mp[i].setPyCyHandler( cb[i]) + + elif len(sig.parameters) == 3: + handleMonDictGlobal[cb[i]] = handleList[i] + mp[i].setPyCyHandlerData( cb[i]) - if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="The signature of the monitor callback function is not supported. \ + Supported fns are: \ + 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + raise _cafeException - elif dtcheck==CAFE_CHAR: - localList.append( pvd[i].getAsChar()) - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) #no data - else: - localListInner=[] - if dtcheck==CAFE_STRING: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsString(j)) - elif dtcheck==CAFE_SHORT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_FLOAT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - elif dtcheck==CAFE_ENUM: + mpV.push_back(mp[i]) - for j in range(0, pvd[i].getNelem()): - #if enum, string taken as native - if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: - localListInner.append(pvd[i].getAsString(j)) - else: - localListInner.append(pvd[i].getAsLong(j)) + cdef vector[int] vStatus + vStatus.reserve(pvg.getNPV()) - elif dtcheck==CAFE_CHAR: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) # pvd[i].getAsChar(j)) - elif dtcheck==CAFE_LONG: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_DOUBLE: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - else: - for j in range(0, pvd[i].getNelem()): - localListInner.append(0) #no data - localList.append(localListInner) + with nogil: + status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) - return localList, status, statusList + return status, vStatus - ################################################################################## - #END: def getGroup(self, ghandleName, dt='native'): - ################################################################################## + ################################################################################## + def getHandleFromPVWithinGroup(self, str pv, ghandleName): + cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + return self.hh.getHandleFromPVWithinGroup(pv, ghandle) + ################################################################################## + def getGroupStr(self, ghandleName): + return self.getGroup(ghandleName, 'str') - ################################################################################## - def getGroupCache(self, ghandleName, str dt='native'): - cdef str _METHOD_="getGroupCache(self, ghandleName, str dt='native')" - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + def getGroupInt(self, ghandleName): + return self.getGroup(ghandleName, 'int') + def getGroupFloat(self, ghandleName): + return self.getGroup(ghandleName, 'float') - cdef PVGroup pvg + ################################################################################## + def getGroup(self, ghandleName, str dt='native'): + cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) + cdef PVGroup pvg - cdef PVDataHolder * pvd - - with nogil: - status=self._c_cafe.groupGetCache(ghandle, pvg) + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) + cdef PVDataHolder * pvd + pvd = pvg.getPVData() + for i in range(0, pvg.getNPV()): + pvd[i].setHasAlarm(False) + pvd[i].setHasTS(False) + # pvd[i].setRule(False) - #do not raise exception - #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) - - pvd=pvg.getPVData() - - localList=[] - statusList=[] - cdef unsigned int dtn, dtcheck - - for i in range(0, pvg.getNPV()): - dtn = pvd[i].getDataType(); - - dtcheck=getMatchedDataType(dt, dtn) - - statusList.append(pvd[i].getStatus()) + pvg.setPVData(pvd) + # pvd=pvg.getPVData(); + # print "get rule 0p", pvd[0].getRule() + # print "get rule 1p", pvd[1].getRule() + # print "get rule 2p", pvd[2].getRule() + ## - if pvd[i].getNelem() == 1: - if dtcheck==CAFE_STRING: - localList.append(pvd[i].getAsString()) - elif dtcheck==CAFE_SHORT: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_FLOAT: - localList.append(pvd[i].getAsDouble()) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - - if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: - localList.append(pvd[i].getAsString()) - else: - localList.append(pvd[i].getAsLong()) + with nogil: + status = self._c_cafe.groupGet(ghandle, pvg) - elif dtcheck==CAFE_CHAR: - localList.append( pvd[i].getAsChar()) - elif dtcheck==CAFE_LONG: - localList.append(pvd[i].getAsLong()) - elif dtcheck==CAFE_DOUBLE: - localList.append(pvd[i].getAsDouble()) - else: - localList.append(0) #no data - else: - localListInner=[] - if dtcheck==CAFE_STRING: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsString(j)) - elif dtcheck==CAFE_SHORT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_FLOAT: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - elif dtcheck==CAFE_ENUM: + if status == ECA_TIMEOUT: + print("======================================================") + self._c_cafe.printStatusMessage(status) + print("TIMEOUT in getGroup; switching to getCompoundList") + print("======================================================") + return self.getCompoundList(pvg.getNameAsString(), dt) - for j in range(0, pvd[i].getNelem()): - #if enum, string taken as native - if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: - localListInner.append(pvd[i].getAsString(j)) - else: - localListInner.append(pvd[i].getAsLong(j)) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) - elif dtcheck==CAFE_CHAR: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) # pvd[i].getAsChar(j)) - elif dtcheck==CAFE_LONG: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsLong(j)) - elif dtcheck==CAFE_DOUBLE: - for j in range(0, pvd[i].getNelem()): - localListInner.append(pvd[i].getAsDouble(j)) - else: - for j in range(0, pvd[i].getNelem()): - localListInner.append(0) #no data - localList.append(localListInner) + # do not raise exception + #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) + # pvg.showMaxMax(5,10) + pvd = pvg.getPVData() - return localList, status, statusList + localList = [] + statusList = [] + cdef unsigned int dtn, dtcheck - ################################################################################## - #END: def getGroup(self, ghandleName, dt='native'): - ################################################################################## + for i in range(0, pvg.getNPV()): + dtn = pvd[i].getDataType() + dtcheck = getMatchedDataType(dt, dtn) + + statusList.append(pvd[i].getStatus()) - ################################################################################## + if pvd[i].getNelem() == 1: + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native - def getPVGroupStr(self, ghandleName): - return self.getPVGroup(ghandleName, dt='str') + if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) - def getPVGroupInt(self, ghandleName): - return self.getPVGroup(ghandleName, dt='int') + elif dtcheck == CAFE_CHAR: + localList.append(< unsigned char > pvd[i].getAsChar()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(None) # no data + else: + localListInner = [] + if dtcheck == CAFE_STRING: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsString(j)) + elif dtcheck == CAFE_SHORT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_FLOAT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + elif dtcheck == CAFE_ENUM: - def getPVGroupFloat(self, ghandleName): - return self.getPVGroup(ghandleName, dt='float') + for j in range(0, pvd[i].getNelem()): + # if enum, string taken as native + if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + localListInner.append(pvd[i].getAsString(j)) + else: + localListInner.append(pvd[i].getAsLong(j)) - ################################################################################## - def getPVGroup(self, ghandleName, str dt='native'): - cdef str _METHOD_="getPVGroup(ghandleName, str dt='native')" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - #elif isinstance(ghandleName, (pvgroup)) == 1: - # print ("We have a PV Group ", type(ghandleName) ) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + elif dtcheck == CAFE_CHAR: + for j in range(0, pvd[i].getNelem()): + # pvd[i].getAsChar(j)) + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_LONG: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_DOUBLE: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + else: + for j in range(0, pvd[i].getNelem()): + localListInner.append(None) # no data + localList.append(localListInner) - cdef PVGroup pvg - cdef PVDataHolder * pvd - cdef int status + return localList, status, statusList - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) - - pvd=pvg.getPVData() - - ''' + ################################################################################## + # END: def getGroup(self, ghandleName, dt='native'): + ################################################################################## + + ################################################################################## + + def getGroupCache(self, ghandleName, str dt='native'): + cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + cdef PVDataHolder * pvd + + with nogil: + status = self._c_cafe.groupGetCache(ghandle, pvg) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + # do not raise exception + #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) + + pvd = pvg.getPVData() + + localList = [] + statusList = [] + cdef unsigned int dtn, dtcheck + + for i in range(0, pvg.getNPV()): + dtn = pvd[i].getDataType() + + dtcheck = getMatchedDataType(dt, dtn) + + statusList.append(pvd[i].getStatus()) + + if pvd[i].getNelem() == 1: + if dtcheck == CAFE_STRING: + localList.append(pvd[i].getAsString()) + elif dtcheck == CAFE_SHORT: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_FLOAT: + localList.append(pvd[i].getAsDouble()) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + + if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + localList.append(pvd[i].getAsString()) + else: + localList.append(pvd[i].getAsLong()) + + elif dtcheck == CAFE_CHAR: + localList.append(< unsigned char > pvd[i].getAsChar()) + elif dtcheck == CAFE_LONG: + localList.append(pvd[i].getAsLong()) + elif dtcheck == CAFE_DOUBLE: + localList.append(pvd[i].getAsDouble()) + else: + localList.append(None) # no data + else: + localListInner = [] + if dtcheck == CAFE_STRING: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsString(j)) + elif dtcheck == CAFE_SHORT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_FLOAT: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + elif dtcheck == CAFE_ENUM: + + for j in range(0, pvd[i].getNelem()): + # if enum, string taken as native + if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + localListInner.append(pvd[i].getAsString(j)) + else: + localListInner.append(pvd[i].getAsLong(j)) + + elif dtcheck == CAFE_CHAR: + for j in range(0, pvd[i].getNelem()): + # pvd[i].getAsChar(j)) + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_LONG: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsLong(j)) + elif dtcheck == CAFE_DOUBLE: + for j in range(0, pvd[i].getNelem()): + localListInner.append(pvd[i].getAsDouble(j)) + else: + for j in range(0, pvd[i].getNelem()): + localListInner.append(None) # no data + localList.append(localListInner) + + return localList, status, statusList + + ################################################################################## + # END: def getGroup(self, ghandleName, dt='native'): + ################################################################################## + + ################################################################################## + + def getPVGroupStr(self, ghandleName): + return self.getPVGroup(ghandleName, dt='str') + + def getPVGroupInt(self, ghandleName): + return self.getPVGroup(ghandleName, dt='int') + + def getPVGroupFloat(self, ghandleName): + return self.getPVGroup(ghandleName, dt='float') + + ################################################################################## + def getPVGroup(self, ghandleName, str dt='native'): + cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + # elif isinstance(ghandleName, (pvgroup)) == 1: + # print ("We have a PV Group ", type(ghandleName) ) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + cdef PVGroup pvg + cdef PVDataHolder * pvd + cdef int status + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + + pvd = pvg.getPVData() + + ''' for i in range (0, pvg.getNPV()): pvd[i].setHasAlarm(True) pvd[i].setHasTS(True) @@ -4916,637 +5691,698 @@ No of group members doe not match the length of callback object list") pvg.setPVData(pvd) ''' - - - with nogil: - status=self._c_cafe.groupGet(ghandle, pvg) - - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print("Error in PyCafe def getPVGroup. Status = %d" %status) - self._c_cafe.printStatusMessage(status) - #do not raise exception - #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + + with nogil: + status = self._c_cafe.groupGet(ghandle, pvg) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in PyCafe def getPVGroup. Status = %d" % status) + self._c_cafe.printStatusMessage(status) + # do not raise exception + #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + + if status == ECA_TIMEOUT: + print("======================================================") + print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + print("======================================================") + return self.getCompoundPVGroup(ghandle, dt) + + pvd = pvg.getPVData() + + localList = [] + + for i in range(0, pvg.getNPV()): + #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 + + pg = pvgroup() + + pg.pvdata = localList + + pg.npv = pvg.getNPV() + pg.name = pvg.getNameAsString() + pg.groupStatus = pvg.getStatusGroup() + pg.groupHandle = pvg.getGroupHandle() + + # pg.showMax(1) + + return pg # localList, status + ################################################################################## + # END: def getPVGroup(self, ghandleName, str dt='native') + ################################################################################## + + ################################################################################## + + def getPVGroupCache(self, ghandleName, str dt='native'): + cdef str _METHOD = "getPVGroupCache" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + # elif isinstance(ghandleName, (pvgroup)) == 1: + # print ("We have a PV Group ", type(ghandleName) ) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + cdef PVGroup pvg + cdef PVDataHolder * pvd + cdef int status + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + print("==============" ) + print(_METHOD) + pvg.showMax(1) + + pvd = pvg.getPVData() + + status = self._c_cafe.groupGetCache(ghandle, pvg) + pvg.showMax(1) + print("==============" ) + print(status, pvg.getStatusGroup()) + print("==============" ) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + self._c_cafe.printStatusMessage(status) + # do not raise exception + #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + + pvd = pvg.getPVData() + + localList = [] + + for i in range(0, pvg.getNPV()): + #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 + + pg = pvgroup() + + pg.pvdata = localList + + pg.npv = pvg.getNPV() + pg.name = pvg.getNameAsString() + pg.groupStatus = pvg.getStatusGroup() + pg.groupHandle = pvg.getGroupHandle() + + return pg + ################################################################################## + # END: def getPVGroup(self, ghandleName, str dt='native') + ################################################################################## + + ################################################################################## + + def PVGroupValuesToList(self, pvgroup pg): + glist = [] + for i in range(0, pg.npv): + if len(pg.pvdata[i].value) == 1: + glist.append(pg.pvdata[i].value[0]) + else: + iL = [] + for j in range(0, len(pg.pvdata[i].value)): + iL.append(pg.pvdata[i].value[j]) + glist.append(iL) + return glist + ################################################################################## + + ################################################################################## + + def groupMemberList(self, str gname): + cdef str _METHOD = "groupMemberList(self, str gname)" + cdef vector[string] pvlist + status = self._c_cafe.groupMemberList(gname, pvlist) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + return pvlist + + ################################################################################## + + def grouping(self, char * gname, list _pvlist): + cdef str _METHOD = "grouping(char * gname, list _pvlist)" + + cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + cdef unsigned int ghandle = 0 + cdef char * _gname = gname + + try: + IF PY_EXT_C: + with nogil: + status = self._c_cafe.groupOpen(_gname, ghandle) + ELSE: + #Gil acquired and released within conduit.h + #with nogil: + status = self._c_cafe.groupOpen(_gname, ghandle) + except: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=ghandle, + _pv_name=_gname, + _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + _error_info=self.cs.info(ECA_ALLOCMEM)) + raise _cafeException + + if status != ICAFE_NORMAL: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=ghandle, + _pv_name=_gname, + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + + # cdef PVGroup pvg + #self._c_cafe.groupAttach(ghandle, pvg); + + cdef: + list localList + list statusList + + cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + + if wtfsb == FLUSH_NOW: + + localList, status, statusList = self.getGroup(ghandle) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + print("") + print("Error in def grouping for group named", _gname) + self._c_cafe.printStatusMessage(status) + print("Analysing statusList[]...") + for i in range(0, len(statusList)): + if statusList[i] != ICAFE_NORMAL: + print("PV", _pvlist[i], + "[", i, "]", " has error: ") + self._c_cafe.printStatusMessage(statusList[i]) + print("") + return ghandle - if status == ECA_TIMEOUT: - print ("======================================================") - print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") - print ("======================================================") - return self.getCompoundPVGroup(ghandle,dt) - - pvd=pvg.getPVData() - - localList=[] + ################################################################################## + def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): + cdef str _METHOD = "groupDefineFromCollection" + cdef list _attribute_list + if isinstance(attrib, str): + _attribute_list = [attrib] + elif isinstance(attrib, list): + _attribute_list = attrib + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info=("Third input argument, should be of type " + "else of ")) + raise _cafeException + + status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + return status + ################################################################################## - for i in range(0, pvg.getNPV()): - #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 - - pg = pvgroup() - - pg.pvdata=localList - - pg.npv=pvg.getNPV() - pg.name=pvg.getNameAsString() - pg.groupStatus=pvg.getStatusGroup() - pg.groupHandle=pvg.getGroupHandle() - - #pg.showMax(1) - + ################################################################################## + def groupDefine(self, char * gname, list _pvlist): + status = self._c_cafe.groupDefine(gname, _pvlist) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + return status + ################################################################################## - return pg #localList, status - ################################################################################## - #END: def getPVGroup(self, ghandleName, str dt='native') - ################################################################################## + ################################################################################## + def defineGroup(self, char * gname, list _pvlist): + status = self._c_cafe.groupDefine(gname, _pvlist) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + return status + ################################################################################## + + ################################################################################## + def groupOpen(self, char * gname): + cdef str _METHOD = "groupOpen(char * gname)" + + if not isinstance(gname, (str)) : + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument should be for group name") + raise _cafeException + + cdef unsigned int ghandle = 0 + cdef char * _gname = gname + + try: + IF PY_EXT_C: + with nogil: + status = self._c_cafe.groupOpen(_gname, ghandle) + ELSE: + #gil acquired and released in conduit.h at import + #with nogil: + status = self._c_cafe.groupOpen(_gname, ghandle) + + except: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + raise _cafeException + + if status != ICAFE_NORMAL: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + raise _cafeException + + return ghandle + ################################################################################## + + ################################################################################## + + def groupClose(self, gHandleName, bint keepGroupName=False): + cdef str _METHOD = "groupClose(gHandleName)" + + cdef unsigned int gHandle = 0 + cdef str _gname = None + status = ICAFE_NORMAL + + if isinstance(gHandleName, (int, long)): + gHandle = gHandleName + elif isinstance(gHandleName, (str)): + _gname = gHandleName + gHandle = self.checkForGroupHandle(gHandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if group handle, else if group name") + raise _cafeException + + if gHandle == 0: + status = ECAFE_INVALID_GROUP_HANDLE + + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + raise _cafeException + + + with nogil: + status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) + #self.ca_pend_io(1.0) + + if status != ICAFE_NORMAL: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + raise _cafeException + + return status + ################################################################################## - - ################################################################################## - def getPVGroupCache(self, ghandleName, str dt='native'): - cdef str _METHOD_="getPVGroupCache" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - #elif isinstance(ghandleName, (pvgroup)) == 1: - # print ("We have a PV Group ", type(ghandleName) ) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) + def isGroup(self, const char * gName): + return self._c_cafe.isGroup(gName) - cdef PVGroup pvg - cdef PVDataHolder * pvd - cdef int status - + def isCollection(self, const char * cName): + return self._c_cafe.isCollection(cName) - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) - print ("==============" ) - print (_METHOD_) - pvg.showMax(1) - - pvd=pvg.getPVData() - - status=self._c_cafe.groupGetCache(ghandle, pvg) - pvg.showMax(1) - print ("==============" ) - print(status, pvg.getStatusGroup() ) - print ("==============" ) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print("Error in PyCafe def getPVGroupCache. Status = %d" %status) - self._c_cafe.printStatusMessage(status) - #do not raise exception - #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + def getNoMonitors(self, handlePV): + cdef str _METHOD = "getNoMonitors(handlePV)" - - pvd=pvg.getPVData() - - localList=[] + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if handle, else if PV") + raise _cafeException + return self.hh.getNmonitor(handle) + ################################################################################## - for i in range(0, pvg.getNPV()): - #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 - - pg = pvgroup() - - pg.pvdata=localList - - pg.npv=pvg.getNPV() - pg.name=pvg.getNameAsString() - pg.groupStatus= pvg.getStatusGroup() - pg.groupHandle=pvg.getGroupHandle() - - return pg - ################################################################################## - #END: def getPVGroup(self, ghandleName, str dt='native') - ################################################################################## + ################################################################################## + def getMonitorIDs(self, handlePV): + cdef str _METHOD = "getMonitorIDs(handlePV)" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if handle, else if PV") + raise _cafeException + + return self.hh.getMonitorIDs(handle) + ############################################################################ + + ############################################################################ + def monitor( + self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + unsigned short notify_milliseconds=0): + + return self.monitorStart(handlePV, cb, dbr, mask, notify_milliseconds) + + ############################################################################ + def monitorStart( + self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + unsigned short notify_milliseconds=0): + + _METHOD = "monitorStart(handlePV, object cb=None, \ + DBR_TYPE dbr=DBR_TIME, \ + unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" + + pv = None + cdef int status = ICAFE_NORMAL + + # cdef pCallback my_callback + # my_callback=callbackHandlerMonitor + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + pv = handlePV + handle = self.checkForHandle(handlePV) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if handle, \ + else if PV") + raise _cafeException + + # Does channel Exist? + if not self._c_cafe.isValid(handle): + status = ECAFE_INVALID_HANDLE + if self._enable_exceptions: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + _error_code=status, _error_text=self.cs.code(status), + _error_info=self.cs.info(status)) + raise _cafeException + return status + + cdef MonitorPolicy mp + cdef unsigned long mpid = mp.getMonitorID() + + # For setUserArgs pass the address of the variable. + + mp.setMask(mask) + mp.setNotifyDeltaMilliSeconds(notify_milliseconds) + + #print ("dbr=", dbr) + self._c_cafe.getChannelInfo(handle, self.channelInfo) + #print ("nativeDataType=", self.channelInfo.getDataType()) + + if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + # set Native Datatype first + mp.setDataType(self.channelInfo.getDataType()) + mp.setCafeDbrType(dbr) + #print ("def monitorStart ", mp.getCafeDbrType()) + #print ("def monitorStart ", mp.getDbrDataType()) + else: + print("***Warning*** from monitorStart for handle=", handlePV) + print("dbr base type should be one of \ + DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + print("Assuming DBR_TIME") + mp.setDataType(self.channelInfo.getDataType()) + mp.setCafeDbrType(DBR_TIME) + + global monDictGlobal + global handleMonDictGlobal + global py_cb + global hmd + + py_cb = cb + if cb is not None: + #Cement to a global dictionary + hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object + #print(hmd) + sig = inspect.signature(cb) + ''' + print('SIGNATURE//3//:') + print(str(sig)) + for param in sig.parameters.values(): + print('Parameter:', param, type(param)) + print('len1', len(sig.parameters.values())) + print('len2', len(sig.parameters)) + + print('monitorid', mpid) + ''' + + # The corresponding setPyHandler has to be set!! + + mp.setUserArgs(< void * > mpid) + + + if len(sig.parameters) == 1: + ###monDictGlobal[mpid] = cb + + mp.setPyHandler() + # print (mp.getUserArgs()) + + elif len(sig.parameters) == 2: + mp.setPyCyHandler( cb) + #mp.setPyHandler() + #mp.setCyCallback( cb) + + elif len(sig.parameters) == 3: + #py_cb=cb + #self.hh.addWidget(handle, cb) + + mp.setPyCyHandlerData( ( py_cb)) + #handleMonDictGlobal[cb] = handle + + #mp.setPyHandlerData() + #mp.setCyCallback( cb) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info="The signature of the monitor callback function \ + given by the user is not supported. Valid fns are: \ + 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + raise _cafeException + + with nogil: + status = self._c_cafe.monitorStart(handle, mp) + + # Need this to allow a fraction of a second for the callback fn to be called + # if setPyHandler is used + cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + if wtfsb == FLUSH_NOW: + # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + time.sleep(0.01) + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + + return mpid + ############################################################################ + + ############################################################################ + + def monitorStop(self, handlePV, mpid=None): + cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if handle, \ + else if PV") + raise _cafeException + + cdef int status + cdef unsigned int mpidUI + + global monDictGlobal + #global handleMonDictGlobal + global hmd + if mpid: + if isinstance(mpid, (int, long)): + mpidUI = mpid + with nogil: + status = self._c_cafe.monitorStopWithID(handle, mpidUI) + time.sleep(0.01) + + if (status == ICAFE_NORMAL): + #pass + #print (monDictGlobal) + # DELETE ENTRY ONLY IF IT EXISTS! + # if monDictGlobal.has_key(mpidUI): + # Sep 2020 - try without del for testing! + if mpidUI in monDictGlobal.keys(): + del monDictGlobal[mpidUI] + + else: + raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ + monitorPolicy ID (mpid) should be of type ") + else: + with nogil: + status = self._c_cafe.monitorStop(handle) + time.sleep(0.01) + + _ncount = 0 + for key, value in hmd.items(): + if value == handle: + _ncount += 1 + + for i in range (0, _ncount): + try: + l = list(hmd.keys())[list(hmd.values()).index(handle)] + #print (l) + if l is not None: + del hmd[l] + except ValueError: + print("List does not contain handle {0}".format(handle)) + #{k:v for k,v in hmd.items() if v != handle} + ##for a, v in hmd.items(): + ##print(a, v) + ##print ("DEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLETE") + # Find handle with monitor ID and STOP thst one monitor! + + if (status == ICAFE_NORMAL): + + # print "size", self.hh.getNmonitor(handle) + mpidUIV = self.hh.getMonitorIDs(handle) + # print "size", mpidUIV.size() + + for i in range(0, mpidUIV.size()): + + # if monDictGlobal.has_key(mpidUIV[i]): + if mpidUIV[i] in monDictGlobal.keys(): + del monDictGlobal[mpidUIV[i]] + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + + return status + # 3 + + ############################################################################ + def monitorStopAll(self): + + cdef str _METHOD = "monitorStopAll()" + + global monDictGlobal + global handleMonDictGlobal + + cdef int status + with nogil: + status = self._c_cafe.monitorStopAll() + + # give plenty of time for monitors to stop! + time.sleep(0.2) + + monDictGlobal.clear() + handleMonDictGlobal.clear() + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + .format(status)) + + return status + ############################################################################## + + ############################################################################## + + def set(self, handlePV, valSet): + cdef str _METHOD = "set(handlePV, valSet)" + + cdef unsigned int handle = 0 + + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info="First input argument, should be of type if handle, \ + else if PV") + raise _cafeException + # CHECK FOR ALL DATA TYPES! + cdef unsigned short valType = CAFE_STRING + cdef int status = ICAFE_NORMAL + cdef float valSetF + cdef double valSetD + cdef int valSetI + cdef long long valSetLL + cdef short valSetShort + cdef unsigned short valSetUShort + cdef unsigned char valSetChar + cdef string valSetS + cdef vector[double] vecD + cdef vector[float] vecF + cdef vector[short] vecShort + cdef vector[unsigned short] vecUShort + cdef vector[dbr_char_t] vecChar + cdef vector[dbr_long_t] vecI + cdef vector[string] vecS + cdef unsigned int nLA = 0 - - - - ################################################################################## - def PVGroupValuesToList(self, pvgroup pg): - glist=[] - for i in range(0,pg.npv): - if len(pg.pvdata[i].value)==1: - glist.append(pg.pvdata[i].value[0]) - else: - iL=[] - for j in range(0, len(pg.pvdata[i].value)): - iL.append(pg.pvdata[i].value[j]) - glist.append(iL) - return glist - ################################################################################## - - - ################################################################################## - def groupMemberList(self, str gname): - cdef str _METHOD_="groupMemberList(self, str gname)" - cdef vector[string] pvlist - status=self._c_cafe.groupMemberList(gname, pvlist) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - -#for i in range(0, len(pvlist)): -# memberList.append(pvlist[i]) - return pvlist - - - ################################################################################## - - def grouping(self, char * gname, list _pvlist): - cdef str _METHOD_="grouping(char * gname, list _pvlist)" - - cdef int status - status=self._c_cafe.groupDefine(gname, _pvlist) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - - cdef unsigned int ghandle=0 - cdef char * _gname=gname - - #try: - # self._c_cafe.groupOpen(_gname, ghandle) - #except: - # raise Exception("EXCEPTION RAISED in PyCafe def grouping. ERROR OPENING PVGROUP= %s" %_gname) - - - try: - status=self._c_cafe.groupOpen(_gname, ghandle) - except: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ - _ec=ECA_ALLOCMEM, _et=self.cs.code(ECA_ALLOCMEM), _ei=self.cs.info(ECA_ALLOCMEM)) - raise Exception(_cyCafeException) - - if status != ICAFE_NORMAL: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - #cdef PVGroup pvg - #self._c_cafe.groupAttach(ghandle, pvg); - - cdef: - list localList - list statusList - - - if self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer()==FLUSH_NOW: - - localList,status,statusList= self.getGroup(ghandle) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - print ("") - print ("Error in def grouping for group named", _gname) - self._c_cafe.printStatusMessage(status) - print ("Analysing statusList[]...") - for i in range(0, len(statusList)): - if statusList[i] !=ICAFE_NORMAL: - print ("PV", _pvlist[i], "[",i,"]", " has error: ") - self._c_cafe.printStatusMessage(statusList[i]) - print ("") - return ghandle - - ################################################################################## - def defineGroup(self, char * gname, list _pvlist): - #cdef vector[const char *] pvlist - #for i in range(0, len(_pvlist)): - # pvlist.push_back(_pvlist[i]) - status=self._c_cafe.groupDefine(gname, _pvlist) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - return status - ################################################################################## - - ################################################################################## - def groupOpen(self, char * gname): - cdef str _METHOD_="groupOpen(char * gname)" - - if isinstance(gname, (str)) == 0: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument should be for group name") - raise Exception(_cyCafeException) - - cdef unsigned int ghandle=0 - cdef char * _gname=gname - - try: - status=self._c_cafe.groupOpen(_gname, ghandle) - except: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ - _ec=ECA_ALLOCMEM, _et=self.cs.code(ECA_ALLOCMEM), _ei=self.cs.info(ECA_ALLOCMEM)) - raise Exception(_cyCafeException) - - if status != ICAFE_NORMAL: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return ghandle - ################################################################################## - - - ################################################################################## - def groupClose(self, gHandleName): - cdef str _METHOD_="groupClose(gHandleName)" - - cdef unsigned int gHandle=0 - cdef str _gname=None - status=ICAFE_NORMAL - - if isinstance(gHandleName, (int,long)): - gHandle=gHandleName - elif isinstance(gHandleName, (str)): - _gname=gHandleName - gHandle=self.checkForGroupHandle(gHandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if group handle, else if group name") - raise Exception(_cyCafeException) - - if gHandle == 0: - status=ECAFE_INVALID_GROUP_HANDLE - - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=gHandle, _pv=_gname, \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - - status=self._c_cafe.groupClose(gHandle) - - - if status != ICAFE_NORMAL: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=gHandle, _pv=_gname, \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return status - ################################################################################## - - def getNoMonitors(self, handlePV): - cdef str _METHOD_="getNoMonitors(handlePV)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - return self.hh.getNmonitor(handle) - ################################################################################## - - ################################################################################## - def getMonitorIDs(self, handlePV): - cdef str _METHOD_="getMonitorIDs(handlePV)" - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - return self.hh.getMonitorIDs(handle); - ################################################################################## - - ########################################################################################## - def monitorStart(self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM): - cdef str _METHOD_="monitorStart(handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" - - pv=None - cdef int status=ICAFE_NORMAL - - #cdef pCallback my_callback - #my_callback=callbackHandlerMonitor - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - pv=handlePV - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - #py_cb_handle phase out; us fn in dictionary! - #global py_cb_handle - global py_cb - - #if cb: - # py_cb=cb - - #Does channel Exist? - if self._c_cafe.isValid(handle) == 0: - status=ECAFE_INVALID_HANDLE - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=pv, \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - return status; - - - cdef MonitorPolicy mp - cdef unsigned int mpid=mp.getMonitorID() - - mp.setMask(mask) - - - #print ("dbr=", dbr) - self._c_cafe.getChannelInfo(handle,self.channelInfo) - #print ("nativeDataType=", self.channelInfo.getDataType()) - - - if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: - #set Native Datatype first - mp.setDataType(self.channelInfo.getDataType()); - mp.setCafeDbrType(dbr) - #print ("def monitorStart ", mp.getCafeDbrType()) - #print ("def monitorStart ", mp.getDbrDataType()) - else: - print ("***Warning*** from monitorStart for handle=",handlePV) - print ("dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") - print ("Assuming DBR_TIME") - mp.setDataType(self.channelInfo.getDataType()); - mp.setCafeDbrType(DBR_TIME) - - #if cb: - # - # print "py_cb_handle", len(a[0]) - - global monDictGlobal - #print ("MONITOR START (self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask) ") - #print (monDictGlobal) - - if cb: - sig=inspect.signature(cb) - ''' - 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)) - a=inspect.getargspec(cb) - print ('a',a) - print ('l',len(a[0])) - ''' - if (len(sig.parameters)==1): - #if(len(a[0])==1): - ##py_cb_handle=cb - #self.monidList.append(mpid) - #self.moncbList.append(cb) - ##self.monDict[mpid]=cb - - monDictGlobal[mpid]=cb - #print (monDictGlobal) - #print self.monidList - #print self.moncbList - #print self.monDict - # - #print "mpid = ", mpid - mp.setUserArgs( mpid) - mp.setPyHandler() - #print (mp.getUserArgs()) - else: - py_cb=cb - mp.setUserArgs( mpid) - mp.setPyHandlerData() - #else: - # mp.setHandler(callbackHandlerMonitor_wrapper) - - - with nogil: - status=self._c_cafe.monitorStart(handle,mp) - - - #Need this to allow a fraction of a second for the callback fn to be called - #if setPyHandler is used - if (self.getMonitorWhenToFlushSendBuffer == FLUSH_NOW): - time.sleep(0.01); - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - #do not raise an exception - #raise Exception("EXCEPTION RAISED in PyCafe def monitorStart. Status = %d" %status) - - return mpid - ################################################################################## - - - ################################################################################## - def monitorStop(self, handlePV, mpid=None): - cdef str _METHOD_="monitorStop(handlePV, mpid=None)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)) == 1: - handle=handlePV - elif isinstance(handlePV, (str)) == 1: - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - cdef int status - cdef unsigned int mpidUI - - global monDictGlobal - - if mpid: - if isinstance(mpid, (int,long)): - mpidUI=mpid - with nogil: - status=self._c_cafe.monitorStopWithID(handle, mpidUI) - time.sleep(0.01) - - if (status==ICAFE_NORMAL): - #index=self.monidList.index(mpidUI) - #self.monidList.remove(mpidUI) - #self.moncbList.remove(self.moncbList[index]) - #del self.monDict[mpidUI] - - #print (monDictGlobal) - #DELETE ENTRY ONLY IF IT EXISTS! - if monDictGlobal.has_key(mpidUI): - del monDictGlobal[mpidUI] - - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def monitorStop. \n\ -monitorPolicy ID (mpid) should be ") - else: - with nogil: - status=self._c_cafe.monitorStop(handle) - time.sleep(0.01) - - if (status==ICAFE_NORMAL): - - #print "size", self.hh.getNmonitor(handle) - mpidUIV=self.hh.getMonitorIDs(handle) - #print "size", mpidUIV.size() - - for i in range(0, mpidUIV.size()): - #index=self.monidList.index(mpidUIV[i]) - #self.monidList.remove(mpidUIV[i]) - #self.moncbList.remove(self.moncbList[index]) - #del self.monDict[mpidUIV[i]] - if monDictGlobal.has_key(mpidUIV[i]): - del monDictGlobal[mpidUIV[i]] - #monDictGlobal.remove(mpidUIV[i]) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - #do not raise an exception - #raise Exception("EXCEPTION RAISED in PyCafe def monitorStop. Status = %d" %status) - - return status - ################################################################################## - - - ################################################################################## - def monitorStopAll(self): - - cdef str _METHOD_="monitorStopAll()" - - global monDictGlobal - - cdef int status - with nogil: - status=self._c_cafe.monitorStopAll() - - #give plenty of time for monitors to stop! - - #print ("-----------------------------------------------------------------") - #print self.monidList - #print self.moncbList - #print self.monDict - #print (monDictGlobal) - #print ("------------------------------------------------------------------") - #del self.monidList[:] - #del self.moncbList[:] - #self.monDict.clear() - time.sleep(0.5) - monDictGlobal.clear() - - #print self.monDict - #print monDictGlobal - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def monitorStopAll. Status = %d" %status) - - return status - ################################################################################## - - - ################################################################################## - def set(self, handlePV, valSet): - cdef str _METHOD_="set(handlePV, valSet)" - - cdef unsigned int handle=0 - - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - - #CHECK FOR ALL DATA TYPES! - - cdef unsigned short valType=CAFE_STRING - cdef int status=ICAFE_NORMAL - cdef float valSetF - cdef double valSetD - cdef int valSetI - cdef long long valSetLL - cdef short valSetShort - cdef unsigned short valSetUShort - cdef unsigned char valSetChar - cdef string valSetS - cdef vector[double] vecD - cdef vector[float] vecF - cdef vector[short] vecShort - cdef vector[unsigned short] vecUShort - cdef vector[dbr_char_t] vecChar - cdef vector[dbr_long_t] vecI - cdef vector[string] vecS - - cdef unsigned int nLA=0 - - cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) - cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) - cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) - cdef tuple ctypesUShort = (ctypes.c_uint16,ctypes.c_ushort) - cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, \ - ctypes.c_long, ctypes.c_size_t) - cdef tuple ctypesLongLong=(ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, \ - ctypes.c_ulong,ctypes.c_ulonglong, ctypes.c_longdouble, \ - ctypes.c_longlong, ctypes.c_ssize_t, \ - ctypes.c_void_p, ctypes.c_voidp) + cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + ctypes.c_long, ctypes.c_size_t) + cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + ctypes.c_longlong, ctypes.c_ssize_t, + ctypes.c_void_p, ctypes.c_voidp) # ctypes.c_char, ctypes.c_float, ctypes.c_double are separate + cdef tuple dtypesString = (np.str_, np.unicode_) + cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + cdef tuple dtypesUShort = (np.uint16, np.ushort) + cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + np.ulonglong, np.longlong, np.intp, np.uintp) - cdef tuple dtypesString = (np.str_, np.unicode_) - cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) - cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) - cdef tuple dtypesUShort = (np.uint16,np.ushort) - cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) - cdef tuple dtypesLongLong= (np.uint, np.uintc, np.uint32, np.int64, np.uint64, \ - np.ulonglong, np.longlong, np.intp, np.uintp) + cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + cdef tuple dtypesDouble = (np.double, np.float_, np.float64) - cdef tuple dtypesFloat = (np.single, np.float16, np.float32) - cdef tuple dtypesDouble = (np.double, np.float_, np.float64) - + # List: Major[0] Minor[1] Patch[2] 'final'[3] 0 [4] + # print "type= // ", type(valSet) - #List: Major[0] Minor[1] Patch[2] 'final'[3] 0 [4] - #print "type= // ", type(valSet) - - cdef bint isGoodType=False - cdef bint isBytesType=False + cdef bint isGoodType = False + cdef bint isBytesType = False # print('set method', type(valSet)) - + # print("is instance array.array", isinstance(valSet, array.array)) # print("is instance np.ndarray", isinstance(valSet, np.ndarray)) # print("is instance memoryview", isinstance(valSet, memoryview)) @@ -5558,985 +6394,1301 @@ monitorPolicy ID (mpid) should be ") # print("is instance ctypes Array ", isinstance(valSet, ctypes.Array )) # print("is instance bytes ", isinstance(valSet, bytes )) # print("is instance bytearrays ", isinstance(valSet, bytearray )) - # ctypes.c_buffer is of class function - # crtpes.c_buffer(b'abc') is of rtype ctypes.Array (!)) -#print("is instance ctypes buffer ", isinstance(valSet, ctypes.c_buffer )) # no such type! + # ctypes.c_buffer is of class function + # crtpes.c_buffer(b'abc') is of rtype ctypes.Array (!)) +# print("is instance ctypes buffer ", isinstance(valSet, ctypes.c_buffer )) # no such type! # dir(ctypes) # print(type(valSet)) # print (valSet.__class__) - cdef str classType = (valSet.__class__).__name__ - cdef str substringmv = "_memoryviewslice" - - - #print ("python Version", self.pythonVersion[0]) - - #Cython does not know about PyCafe._memoryviewslice - #if (isinstance(valSet,PyCafe._memoryviewslice)): - # print('OK for memoryview') - - if ( (self.pythonVersion[0] > 2 ) or (self.pythonVersion[0] == 2 and self.pythonVersion[1]>6) ) : - - if isinstance(valSet,(list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): - isGoodType=True - else: - if isinstance(valSet,(list, array.array, np.ndarray, ctypes.Array)): - isGoodType=True - - if (isGoodType==False): - if (substringmv in classType): - isGoodType=True - - #This is to cater for ctypes.c_buffer which is an instance of ctypes.Array - #where the element of the array is of type bytes - there need to match to cafe.setString - if isinstance(valSet,ctypes.Array): - if isinstance(valSet[0],bytes): - isGoodType=False - isBytesType=True + cdef str classType = (valSet.__class__).__name__ + cdef str substringmv = "_memoryviewslice" - #where the element of the array is of type bytes - there need to match to cafe.setSrting - - #if isinstance(valSet,np.ndarray): - #print ("np.ndarray is true") - #print (type(valSet[0])) - #if isinstance(valSet[0],bytes): - #isGoodType=False - #isBytesType=True + - #print("isGoodType ", isGoodType) - #print("isBytesType ", isBytesType) + # Cython does not know about PyCafe._memoryviewslice + # if (isinstance(valSet,PyCafe._memoryviewslice)): + # print('OK for memoryview') - if isGoodType: - - #print('set method', type(valSet[0])) - - nLA=len(valSet) - - #Just check on first element if array.array etc.. - if not isinstance(valSet, (list)): - #if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): - nLA=1 + if _python_version > (2,6): + #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): - for i in range(0, nLA): - if isinstance(valSet[i],(str, bytes)): - valType=CAFE_STRING - break - elif isinstance(valSet[i],dtypesString): - valType=CAFE_STRING - break - elif isinstance(valSet[i],(float)): - valType=CAFE_DOUBLE - elif isinstance(valSet[i],(dtypesDouble)): - valType=CAFE_DOUBLE - elif isinstance(valSet[i],(dtypesFloat)): - valType=CAFE_FLOAT - elif isinstance(valSet[i],(long, int)): - valType=CAFE_LONG - elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): - valType=CAFE_LONG - elif isinstance(valSet[i], dtypesShort): - valType=CAFE_SHORT - elif isinstance(valSet[i], dtypesUShort): - valType=CAFE_USHORT - else: - - print("PyCafe.pyx: We do not cater for type ", type(valSet[i]), " and thus assume a string" ) - valType=CAFE_STRING - break + if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): + isGoodType = True + else: + if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): + isGoodType = True - # valSet to vector since - # coercion from Python not allowed without the GIL - if valType==CAFE_DOUBLE: + if (isGoodType == False): + if (substringmv in classType): + isGoodType = True - vecD.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecD.push_back(valSet[i]) - with nogil: - status=self._c_cafe.setVDouble(handle, vecD) - - elif valType==CAFE_FLOAT: - - vecF.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecF.push_back(valSet[i]) - with nogil: - status=self._c_cafe.setVFloat(handle, vecF) - - elif valType==CAFE_LONG: + # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + # where the element of the array is of type bytes - there need to match to cafe.setString + if isinstance(valSet, ctypes.Array): + if isinstance(valSet[0], bytes): + isGoodType = False + isBytesType = True - vecI.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecI.push_back(valSet[i]) + # where the element of the array is of type bytes - there need to match to cafe.setSrting - with nogil: - status=self._c_cafe.setVLong(handle, vecI) - - elif valType==CAFE_SHORT: + # if isinstance(valSet,np.ndarray): + #print ("np.ndarray is true") + #print (type(valSet[0])) + # if isinstance(valSet[0],bytes): + # isGoodType=False + # isBytesType=True - vecShort.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecShort.push_back(valSet[i]) + #print("isGoodType ", isGoodType) + #print("isBytesType ", isBytesType) - with nogil: - status=self._c_cafe.setVShort(handle, vecShort) + self._c_cafe.getChannelInfo(handle, self.channelInfo) + class_name = str(self.channelInfo.getClassNameAsString()) + data_type = self.channelInfo.getDataType() + + if class_name in ['waveform'] and data_type in [DBR_CHAR]: + if isinstance(valSet, (str, bytes)): + isGoodType = True + elif isinstance(valSet, list): + if len(valSet) == 1: + if isinstance(valSet[0], (str, bytes)): + isGoodType = True + valSet = valSet[0] - elif valType==CAFE_USHORT: + if isGoodType: - vecUShort.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecUShort.push_back(valSet[i]) + #print('set method', type(valSet[0])) - with nogil: - status=self._c_cafe.setVUShort(handle, vecUShort) - - elif valType==CAFE_CHAR: + nLA = len(valSet) - vecChar.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecChar.push_back(valSet[i]) + # Just check on first element if array.array etc.. + if not isinstance(valSet, (list)): + # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + nLA = 1 - with nogil: - status=self._c_cafe.setVChar(handle, vecChar) - - elif valType==CAFE_STRING: - vecS.reserve(len(valSet)) - for i in range(0, len(valSet)): - vecS.push_back(str(valSet[i])) - with nogil: - status=self._c_cafe.setVString(handle, vecS) - - elif isBytesType: - #print("isBytesType") - valSetS=valSet.value - with nogil: - status=self._c_cafe.setString(handle, valSetS) - elif isinstance(valSet, (ctypes.c_char)): - #print("is ctypes.c_char") - #print(valSet.value) - #print(valSet.value.decode()) - valSetS=valSet.value.decode() - with nogil: - status=self._c_cafe.setString(handle, valSetS) - elif isinstance(valSet, (ctypes.c_float)): - valSetF=valSet.value - with nogil: - status=self._c_cafe.setFloat(handle, valSetF) - elif isinstance(valSet, (ctypes.c_double)): - valSetD=valSet.value - with nogil: - status=self._c_cafe.setDouble(handle, valSetD) - elif isinstance(valSet, ctypesInt): - #print("ctypesInt") - valSetI= valSet.value - with nogil: - status=self._c_cafe.setLong(handle, valSetI) - elif isinstance(valSet, ctypesLongLong): - #print("ctypesLongLong") - valSetLL=valSet.value - with nogil: - status=self._c_cafe.setLong(handle, valSetLL) - elif isinstance(valSet, ctypesShort): - #print("ctypesShort") - valSetShort=valSet.value - with nogil: - status=self._c_cafe.setShort(handle, valSetShort) - elif isinstance(valSet, ctypesUShort): - #print("ctypesUShort") - valSetUShort=valSet.value - with nogil: - status=self._c_cafe.setUShort(handle, valSetUShort) - elif isinstance(valSet, (ctypesString) ): - #print("ctypesString") - valSetS=valSet.value - with nogil: - status=self._c_cafe.setString(handle, valSetS) - elif isinstance(valSet, ctypesUChar): - #print("ctypesUChar") - valSetUChar=valSet.value - with nogil: - status=self._c_cafe.setChar(handle, valSetUChar) - elif isinstance(valSet, (float)): -#print("float type") - valSetD= valSet - with nogil: - status=self._c_cafe.setDouble(handle, valSetD) - elif isinstance(valSet, (int, long)): - #print("int/long type") - valSetI= valSet - with nogil: - status=self._c_cafe.setLong(handle, valSetI) - elif isinstance(valSet, (str)): -# print("str type") - valSetS=valSet - with nogil: - status=self._c_cafe.setString(handle, valSetS) - elif isinstance(valSet, (bytes,bytearray)): - #print("bytes,bytearray") - valSetS=valSet.decode('utf8') - with nogil: - status=self._c_cafe.setString(handle, valSetS) - elif isinstance(valSet, (unicode)): - #print("unicode") - valSetS=valSet - with nogil: - status=self._c_cafe.setString(handle, valSetS) - else: - print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") - print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ -or not) should be of , or ") - type(valSet) - - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - if handle == 0: - self._c_cafe.printStatusMessage(status) - else: - self._c_cafe.printStatus(handle, status) - if self.haveExceptions: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ - _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) - raise Exception(_cyCafeException) - - return status - ################################################################################## - #END def set(self, handlePV, valSet): - ################################################################################## - + for i in range(0, nLA): + + if isinstance(valSet[i], (str, bytes)): + valType = CAFE_STRING + break + elif isinstance(valSet[i], dtypesString): + valType = CAFE_STRING + break + elif isinstance(valSet[i], (float)): + valType = CAFE_DOUBLE + elif isinstance(valSet[i], (dtypesDouble)): + valType = CAFE_DOUBLE + elif isinstance(valSet[i], (dtypesFloat)): + valType = CAFE_FLOAT + elif isinstance(valSet[i], (long, int)): + valType = CAFE_LONG + elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + valType = CAFE_LONG + elif isinstance(valSet[i], dtypesShort): + valType = CAFE_SHORT + elif isinstance(valSet[i], dtypesUShort): + valType = CAFE_USHORT + else: + + print("PyCafe.pyx: We do not cater for type ", + type(valSet[i]), " and thus assume a string") + valType = CAFE_STRING + break + + #print(valSet, len(valSet), valType) + + # valSet to vector since + # coercion from Python not allowed without the GIL + if valType == CAFE_DOUBLE: + + vecD.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecD.push_back(valSet[i]) + with nogil: + status = self._c_cafe.setVDouble(handle, vecD) + + elif valType == CAFE_FLOAT: + + vecF.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecF.push_back(valSet[i]) + with nogil: + status = self._c_cafe.setVFloat(handle, vecF) + + elif valType == CAFE_LONG: + + vecI.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecI.push_back(valSet[i]) + + with nogil: + status = self._c_cafe.setVLong(handle, vecI) + + elif valType == CAFE_SHORT: + + vecShort.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecShort.push_back(valSet[i]) + + with nogil: + status = self._c_cafe.setVShort(handle, vecShort) + + elif valType == CAFE_USHORT: + + vecUShort.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecUShort.push_back(valSet[i]) + + with nogil: + status = self._c_cafe.setVUShort(handle, vecUShort) + + elif valType == CAFE_CHAR: + + vecChar.reserve(len(valSet)) + for i in range(0, len(valSet)): + vecChar.push_back(valSet[i]) + + with nogil: + status = self._c_cafe.setVChar(handle, vecChar) + + elif valType == CAFE_STRING: + + vecS.reserve(len(valSet)) + for i in range(0, len(valSet)): + if isinstance(valSet[i], str): + #valSet[i] = (valSet[i]).encode('utf_8') + temp = (valSet[i]).encode('latin-1') + else: + temp = valSet[i] + vecS.push_back( temp) + with nogil: + status = self._c_cafe.setVString(handle, vecS) + + elif isBytesType: + #print("isBytesType") + valSetS = valSet.value + with nogil: + status = self._c_cafe.setString(handle, valSetS) + elif isinstance(valSet, (ctypes.c_char)): + #print("is ctypes.c_char") + # print(valSet.value) + # print(valSet.value.decode()) + valSetS = valSet.value.decode() + with nogil: + status = self._c_cafe.setString(handle, valSetS) + elif isinstance(valSet, (ctypes.c_float)): + valSetF = valSet.value + with nogil: + status = self._c_cafe.setFloat(handle, valSetF) + elif isinstance(valSet, (ctypes.c_double)): + valSetD = valSet.value + with nogil: + status = self._c_cafe.setDouble(handle, valSetD) + elif isinstance(valSet, ctypesInt): + # print("ctypesInt") + valSetI = valSet.value + with nogil: + status = self._c_cafe.setLong(handle, valSetI) + elif isinstance(valSet, ctypesLongLong): + # print("ctypesLongLong") + valSetLL = valSet.value + with nogil: + status = self._c_cafe.setLong(handle, valSetLL) + elif isinstance(valSet, ctypesShort): + #print("ctypesShort") + valSetShort = valSet.value + with nogil: + status = self._c_cafe.setShort(handle, valSetShort) + elif isinstance(valSet, ctypesUShort): + #print("ctypesUShort") + valSetUShort = valSet.value + with nogil: + status = self._c_cafe.setUShort(handle, valSetUShort) + elif isinstance(valSet, (ctypesString)): + #print("ctypesString") + valSetS = valSet.value + with nogil: + status = self._c_cafe.setString(handle, valSetS) + elif isinstance(valSet, ctypesUChar): + #print("ctypesUChar") + valSetUChar = valSet.value + with nogil: + status = self._c_cafe.setChar(handle, valSetUChar) + elif isinstance(valSet, (float)): + #print("float type") + valSetD = valSet + with nogil: + status = self._c_cafe.setDouble(handle, valSetD) + elif isinstance(valSet, (int, long)): + #print("int/long type") + valSetI = valSet + with nogil: + status = self._c_cafe.setLong(handle, valSetI) + elif isinstance(valSet, (str)): + #print("str type", valSet) + + valSetS = valSet + with nogil: + status = self._c_cafe.setString(handle, valSetS) + elif isinstance(valSet, (bytes, bytearray)): + #print("bytes,bytearray") + valSetS = valSet.decode('utf8') + with nogil: + status = self._c_cafe.setString(handle, valSetS) + elif isinstance(valSet, (unicode)): + #print("unicode") + valSetS = valSet + with nogil: + status = self._c_cafe.setString(handle, valSetS) + else: + print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ +or not) should be of of type , or ") + type(valSet) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + if handle == 0: + self._c_cafe.printStatusMessage(status) + else: + self._c_cafe.printStatus(handle, status) + if self._enable_exceptions: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + raise _cafeException + + return status + ############################################################################ + # END def set(self, handlePV, valSet): + ############################################################################ + + ############################################################################ + + def setScalarList(self, list handleList, list valList): + cdef str _METHOD = "setScalarList" - ################################################################################## - def setScalarList(self, handleList, list valList): - cdef str _METHOD_="setScalarList(handleList, list valList)" - - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ -First input argument, should be of handles or PVs") - - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ -First input argument, should be a 'list' of if handles or if PVs") - - if len(handleList) != len(valList): - raise Exception ("EXCEPTION RAISED IN PyCafe def setScalarList. \ -Length of handle list ", len(handleList), " does not match the length of data list ", len(valList)) + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + First input argument, should be a 'list' of of type \ + if handles or if PVs") - nelemPrevious = [] + if len(handleList) != len(valList): + raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + Length of handle list ", len(handleList), " does not match \ + the length of data list ", len(valList)) - #Better with PVDataHolder - cdef unsigned int nelemTotal=0 - for i in range(0, len(handleList)): - #nelemTotal+=self.hh.getNelemNative(handleList[i]) - nelemPrevious.append(self.hh.getNelemClient(handleList[i])) + nelemPrevious = [] - #cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) + # Better with PVDataHolder + cdef unsigned int nelemTotal = 0 + for i in range(0, len(handleList)): + # nelemTotal+=self.hh.getNelemNative(handleList[i]) + nelemPrevious.append(self.hh.getNelemClient(handleList[i])) + # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) - #do this to avoid compiler warning messages - cdef vector[unsigned int] v - for i in range(0, len(handleList)): - v.push_back(handleList[i]) + # do this to avoid compiler warning messages + cdef vector[unsigned int] v + for i in range(0, len(handleList)): + v.push_back(handleList[i]) - #Create temporary group from handleList - #Does group exist? - cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + # Create temporary group from handleList + # Does group exist? + cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) - #cdef PVDataHolder * pvd = malloc( 100000000 + \ - # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + # cdef PVDataHolder * pvd = malloc( 100000000 + \ + # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + for i in range(0, v.size()): #len(handleList)): + # pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + #pvd[i]= PVDataHolder(1); + pvd[i].setNelem(1) - for i in range(0, len(handleList)): - #pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) - #pvd[i]= PVDataHolder(1); - pvd[i].setNelem(1) + #cdef unsigned short valType = CAFE_STRING - cdef unsigned short valType=CAFE_STRING - - for i in range(0, len(handleList)): - if isinstance(valList[i],(str)): - pvd[i].setString(valList[i]) - elif isinstance(valList[i],(float)): - pvd[i].setDouble(valList[i]) - elif isinstance(valList[i],(long, int)): - pvd[i].setInt(valList[i]) - else: - print ("This line in PyCafe def setScalarList should never appear!") - - cdef int status=ICAFE_NORMAL - with nogil: - status=self._c_cafe.setPVArray(v, pvd) + for i in range(0, v.size()): #len(handleList)): + if isinstance(valList[i], (str)): + pvd[i].setString(valList[i]) + elif isinstance(valList[i], (float)): + pvd[i].setDouble(valList[i]) + elif isinstance(valList[i], (long, int)): + pvd[i].setInt(valList[i]) + else: + print("This line in PyCafe def setScalarList should never appear!") - for i in range(0, len(handleList)): - if (nelemPrevious[i] != 1): - self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + cdef int status = ICAFE_NORMAL + with nogil: + status = self._c_cafe.setPVArray(v, pvd) - #return status for individual channels - statusList=[] - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - - for i in range(0, len(handleList)): - if (pvd[i].getStatus() != ICAFE_NORMAL): - print ("Handle=", handleList[i], "PV=", self.hh.getPVFromHandle(handleList[i]) ) - print ("with error status=", pvd[i].getStatus()) - self._c_cafe.printStatusMessage(pvd[i].getStatus()) - print ("") - statusList.append(pvd[i].getStatus()) + for i in range(0, len(handleList)): + if (nelemPrevious[i] != 1): + self._c_cafe.setNelemToPrevious( + handleList[i], nelemPrevious[i]) - #free(pvd) + # return status for individual channels + statusList = [] - return status, statusList - - ################################################################################## + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + for i in range(0, len(handleList)): + if (pvd[i].getStatus() != ICAFE_NORMAL): + print("Handle=", handleList[i], "PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvd[i].getStatus()) + self._c_cafe.printStatusMessage(pvd[i].getStatus()) + print("") + statusList.append(pvd[i].getStatus()) + # free(pvd) + return status, statusList - ################################################################################## - def setCompoundList(self, handleList, list vectorList): - - cdef str _METHOD_="setCompoundList(handleList, list vectorList)" - - if isinstance(handleList, (str)): - handleList=self.getHandlesFromWithinGroup(handleList) - else: - if not isinstance(handleList, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + ################################################################################## + + ################################################################################## + def setCompoundList(self, handleList, list vectorList): + + cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + + if isinstance(handleList, (str)): + handleList = self.getHandlesFromWithinGroup(handleList) + else: + if not isinstance(handleList, (list)): + raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ First input argument, should be of handles or PVs") - if isinstance(handleList[0], (str)): - handleList=self.checkForHandleList(handleList) - elif not isinstance(handleList[0], (int, long)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ -First input argument, should be a 'list' of if handles or if PVs") + if isinstance(handleList[0], (str)): + handleList = self.checkForHandleList(handleList) + elif not isinstance(handleList[0], (int, long)): + raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ +First input argument, should be a 'list' of of type if handles or if PVs") - if len(handleList) != len(vectorList): - raise Exception ("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + if len(handleList) != len(vectorList): + raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + # do this to avoid compiler warning messages + cdef vector[unsigned int] v + cdef int i - #do this to avoid compiler warning messages - cdef vector[unsigned int] v - cdef int i - - for i in range(0, len(handleList)): - v.push_back(handleList[i]) + for i in range(0, len(handleList)): + v.push_back(handleList[i]) - #Create temporary group from handleList - #Does group exist? - cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) + # Create temporary group from handleList + # Does group exist? + cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) + + for i in range(0, len(vectorList)): + + # if not list + if isinstance(vectorList[i], (str)): + pvdata[i].setString(vectorList[i]) + + elif isinstance(vectorList[i], (float)): + pvdata[i].setDouble(vectorList[i]) + + elif isinstance(vectorList[i], (long, int)): + pvdata[i].setInt(vectorList[i]) + + elif isinstance(vectorList[i], (list)): + + # if list + valType = CAFE_INVALID_DATATYPE + pvdata[i].setNelem(len(vectorList[i])) + # for k in range(0, len(vectorList[i])): + # Just check on first element + for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + if isinstance(vectorList[i][k], (str)): + valType = CAFE_STRING + break + elif isinstance(vectorList[i][k], (float)): + valType = CAFE_DOUBLE + elif isinstance(vectorList[i][k], (long, int)): + if valType != CAFE_DOUBLE: + valType = CAFE_LONG + else: + valType = CAFE_STRING + break + + # check dt of first element + if valType == CAFE_DOUBLE: + pvdata[i].setVDouble(vectorList[i]) + elif valType == CAFE_LONG: + pvdata[i].setVInt(vectorList[i]) + elif valType == CAFE_STRING: + pvdata[i].setVString(vectorList[i]) + + else: + print("This line in PyCafe def setCompoundList should never appear!") + raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ +Unknown data input; should be one of of type , , , ") + + # endForLoop + + cdef int status = ICAFE_NORMAL + with nogil: + status = self._c_cafe.setPVArray(v, pvdata) + + # return status for individual channels + statusList = [] + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + + for i in range(0, len(handleList)): + if (pvdata[i].getStatus() != ICAFE_NORMAL): + print("Handle=", handleList[i], "PV=", + self.hh.getPVFromHandle(handleList[i])) + print("with error status=", pvdata[i].getStatus()) + self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + print("") + #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + statusList.append(pvdata[i].getStatus()) + + return status, statusList + + ################################################################################## + + ################################################################################## + def setGroup(self, ghandleName, list vectorList): + + cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + + cdef unsigned int ghandle = 0 + if isinstance(ghandleName, (int, long)): + ghandle = ghandleName + elif isinstance(ghandleName, (str)): + ghandle = self.checkForGroupHandle(ghandleName) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="First input argument should be of type if group handle, else if group name") + raise _cafeException + + cdef PVGroup pvg + + with nogil: + self._c_cafe.groupAttach(ghandle, pvg) + ### + #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + + cdef PVDataHolder * pvdata = pvg.getPVData() + + for i in range(0, len(vectorList)): + + # if not list + if isinstance(vectorList[i], (str)): + pvdata[i].setString(vectorList[i]) + + elif isinstance(vectorList[i], (float)): + pvdata[i].setDouble(vectorList[i]) + + elif isinstance(vectorList[i], (long, int)): + pvdata[i].setInt(vectorList[i]) + + elif isinstance(vectorList[i], (list)): + + # if list + valType = CAFE_INVALID_DATATYPE + pvdata[i].setNelem(len(vectorList[i])) + # for k in range(0, len(vectorList[i])): + # Just check on first element + for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + if isinstance(vectorList[i][k], (str)): + valType = CAFE_STRING + break + elif isinstance(vectorList[i][k], (float)): + valType = CAFE_DOUBLE + elif isinstance(vectorList[i][k], (long, int)): + if valType != CAFE_DOUBLE: + valType = CAFE_LONG + else: + valType = CAFE_STRING + break + + # check dt of first element + if valType == CAFE_DOUBLE: + pvdata[i].setVDouble(vectorList[i]) + elif valType == CAFE_LONG: + pvdata[i].setVInt(vectorList[i]) + elif valType == CAFE_STRING: + pvdata[i].setVString(vectorList[i]) + + else: + + print("PyCafe def setGroup: Unusual data type for element", + i, " : ", type(vectorList[i])) + raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ +Unknown data input; should be one of of type , , , ") + + # endForLoop + + cdef int status = ICAFE_NORMAL + statusList = [] + pvg.setPVData(pvdata) + + with nogil: + status = self._c_cafe.groupSet(ghandle, pvg) + + cdef PVDataHolder * pvd + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + # do not raise exception + #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) + + pvd = pvg.getPVData() + + for i in range(0, pvg.getNPV()): + statusList.append(pvd[i].getStatus()) + else: + statusList.append(status) + + return status, statusList + + ################################################################################## + # END: def setGroup(self, ghandleName, dt='native') + ################################################################################## + + ################################################################################## + + def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): + cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - for i in range(0, len(vectorList)): - - #if not list - if isinstance(vectorList[i],(str)): - pvdata[i].setString(vectorList[i]) - - elif isinstance(vectorList[i],(float)): - pvdata[i].setDouble(vectorList[i]) - - elif isinstance(vectorList[i],(long, int)): - pvdata[i].setInt(vectorList[i]) - - elif isinstance(vectorList[i], (list)): - - #if list - valType=CAFE_INVALID_DATATYPE - pvdata[i].setNelem(len(vectorList[i])) - #for k in range(0, len(vectorList[i])): - #Just check on first element - for k in range(0,1): # can expand this to all elemnts or reduce to 1 - if isinstance(vectorList[i][k],(str)): - valType=CAFE_STRING - break - elif isinstance(vectorList[i][k],(float)): - valType=CAFE_DOUBLE - elif isinstance(vectorList[i][k],(long, int)): - if valType != CAFE_DOUBLE: - valType=CAFE_LONG - else: - valType=CAFE_STRING - break - - #check dt of first element - if valType==CAFE_DOUBLE: - pvdata[i].setVDouble(vectorList[i]) - elif valType==CAFE_LONG: - pvdata[i].setVInt (vectorList[i]) - elif valType==CAFE_STRING: - pvdata[i].setVString(vectorList[i]) - - else: - print ("This line in PyCafe def setCompoundList should never appear!") - raise Exception ("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ -Unknown data input; should be one of , , , ") - - #endForLoop - - cdef int status=ICAFE_NORMAL - with nogil: - status=self._c_cafe.setPVArray(v, pvdata) - - #return status for individual channels - statusList=[] - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - - for i in range(0, len(handleList)): - if (pvdata[i].getStatus() != ICAFE_NORMAL): - print ("Handle=", handleList[i], "PV=", self.hh.getPVFromHandle(handleList[i]) ) - print ("with error status=", pvdata[i].getStatus()) - self._c_cafe.printStatusMessage(pvdata[i].getStatus()) - print ("") - #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) - statusList.append(pvdata[i].getStatus()) - - return status, statusList - - ################################################################################## - - - - - ################################################################################## - def setGroup(self, ghandleName, list vectorList): - - cdef str _METHOD_="setGroup(self, ghandleName, list vectorList)" - - cdef unsigned int ghandle=0 - if isinstance(ghandleName, (int,long)) == 1: - ghandle=ghandleName - elif isinstance(ghandleName, (str)) == 1: - ghandle=self.checkForGroupHandle(ghandleName) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument should be if group handle, else if group name") - raise Exception(_cyCafeException) - - cdef PVGroup pvg - - with nogil: - self._c_cafe.groupAttach(ghandle, pvg) - ### - #print ("len V", len(vectorList), " npv=", pvg.getNPV()) - - cdef PVDataHolder * pvdata = pvg.getPVData(); - - - for i in range(0, len(vectorList)): - - #if not list - if isinstance(vectorList[i],(str)): - pvdata[i].setString(vectorList[i]) - - elif isinstance(vectorList[i],(float)): - pvdata[i].setDouble(vectorList[i]) - - elif isinstance(vectorList[i],(long, int)): - pvdata[i].setInt(vectorList[i]) - - elif isinstance(vectorList[i], (list)): - - #if list - valType=CAFE_INVALID_DATATYPE - pvdata[i].setNelem(len(vectorList[i])) - #for k in range(0, len(vectorList[i])): - #Just check on first element - for k in range(0,1): # can expand this to all elemnts or reduce to 1 - if isinstance(vectorList[i][k],(str)): - valType=CAFE_STRING - break - elif isinstance(vectorList[i][k],(float)): - valType=CAFE_DOUBLE - elif isinstance(vectorList[i][k],(long, int)): - if valType != CAFE_DOUBLE: - valType=CAFE_LONG - else: - valType=CAFE_STRING - break - - #check dt of first element - if valType==CAFE_DOUBLE: - pvdata[i].setVDouble(vectorList[i]) - elif valType==CAFE_LONG: - pvdata[i].setVInt (vectorList[i]) - elif valType==CAFE_STRING: - pvdata[i].setVString(vectorList[i]) - - else: - - print ("PyCafe def setGroup: Unusual data type for element", i, " : ", type(vectorList[i])) - raise Exception ("EXCEPTION RAISED IN PyCafe def setGroup. \n\ -Unknown data input; should be one of , , , ") - - #endForLoop - - cdef int status=ICAFE_NORMAL - statusList=[] - pvg.setPVData(pvdata) - - - with nogil: - status=self._c_cafe.groupSet(ghandle, pvg) - - cdef PVDataHolder * pvd - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - #do not raise exception - #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) - - pvd=pvg.getPVData() - - for i in range(0, pvg.getNPV()): - statusList.append(pvd[i].getStatus()) - else: - statusList.append(status) - - return status, statusList - - ################################################################################## - #END: def setGroup(self, ghandleName, dt='native') - ################################################################################## - - - - ################################################################################## - def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): - cdef str _METHOD_="setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - - if not isinstance(handlePVSet, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -First input argument, should be of handles or PVs") - - if not isinstance(valSet, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -Second input argument, should be of scalar values") - - if not isinstance(handlePVMatch, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -Third input argument, should be of handles or PVs") - - if (len(handlePVSet) != len(valSet)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + if (len(handlePVSet) != len(valSet)): + raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ Lengths of first (handlePVSet) and second (valSet) input lists must match!") - if (len(handlePVSet) != len(handlePVMatch)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + if (len(handlePVSet) != len(handlePVMatch)): + raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") - - - - if not isinstance(handlePVAction, (list)): - tmp = handlePVAction - handlePVAction = [] - handlePVAction.append(tmp) - - if not isinstance(valAction, (list)): - tmp = valAction - valAction = [] - valAction.append(tmp) - - - cdef vector[unsigned int] handleSet - handleSet.reserve(len(handlePVSet)) - - cdef vector[unsigned int] handleMatch - handleMatch.reserve(len(handlePVMatch)) - - cdef vector[double] valSetV - valSetV.reserve(len(valSet)) - - - cdef vector[unsigned int] handleAction - handleAction.reserve(len(handlePVAction)) - - - cdef vector[string] valActionV - valActionV.reserve(len(valAction)) - - - for i in range(0, len(handlePVSet)): - if isinstance(handlePVSet[i], (int,long)) == 1: - handleSet.push_back(handlePVSet[i]) - elif isinstance(handlePVSet[i], (str)) == 1: - handleSet.push_back(self.checkForHandle(handlePVSet)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="ThandlePVSet list member should be if handle, else if PV") - raise Exception(_cyCafeException) - - for i in range(0, len(handlePVMatch)): - if isinstance(handlePVMatch[i], (int,long)) == 1: - handleMatch.push_back(handlePVMatch[i]) - elif isinstance(handlePVMatch[i], (str)) == 1: - handleMatch.push_back(self.checkForHandle(handlePVMatch)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="handleMatch list member should be if handle, else if PV") - raise Exception(_cyCafeException) - - - for i in range(0, len(handlePVAction)): - if isinstance(handlePVAction[i], (int,long)) == 1: - handleAction.push_back(handlePVAction[i]) - elif isinstance(handlePVAction[i], (str)) == 1: - handleAction.push_back(self.checkForHandle(handlePVAction)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="handlePVAction list member should be if handle, else if PV") - raise Exception(_cyCafeException) - for i in range(0, len(valAction)): - if not isinstance(valAction[i], (str)): - valActionV.push_back(str(valAction[i])) - else: - valActionV.push_back(valAction[i]) - - - for i in range(0, len(valSet)): - valSetV.push_back(valSet[i]) - - cdef int status + if not isinstance(handlePVAction, (list)): + tmp = handlePVAction + handlePVAction = [] + handlePVAction.append(tmp) + + if not isinstance(valAction, (list)): + tmp = valAction + valAction = [] + valAction.append(tmp) + + cdef vector[unsigned int] handleSet + handleSet.reserve(len(handlePVSet)) + + cdef vector[unsigned int] handleMatch + handleMatch.reserve(len(handlePVMatch)) + + cdef vector[double] valSetV + valSetV.reserve(len(valSet)) + + cdef vector[unsigned int] handleAction + handleAction.reserve(len(handlePVAction)) + + cdef vector[string] valActionV + valActionV.reserve(len(valAction)) + + for i in range(0, len(handlePVSet)): + if isinstance(handlePVSet[i], (int, long)): + handleSet.push_back(handlePVSet[i]) + elif isinstance(handlePVSet[i], (str)): + handleSet.push_back(self.checkForHandle(handlePVSet)) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="ThandlePVSet list member should be of type if handle, else if PV") + raise _cafeException + + 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="handleMatch list member should be of type if handle, else if PV") + raise _cafeException + + for i in range(0, len(handlePVAction)): + if isinstance(handlePVAction[i], (int, long)): + handleAction.push_back(handlePVAction[i]) + elif isinstance(handlePVAction[i], (str)): + handleAction.push_back(self.checkForHandle(handlePVAction)) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="handlePVAction list member should be of type if handle, else if PV") + raise _cafeException + + for i in range(0, len(valAction)): + if not isinstance(valAction[i], (str)): + valActionV.push_back(str(valAction[i])) + else: + valActionV.push_back(valAction[i]) + + for i in range(0, len(valSet)): + valSetV.push_back(valSet[i]) + + cdef int status + + with nogil: + status = self._c_cafe.gameSetAndMatch( + handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + + return status + ################################################################################## + + ################################################################################## + + def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - with nogil: - status=self._c_cafe.gameSetAndMatch(handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" %status) - - return status - ################################################################################## - - - - - ################################################################################## - def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): - cdef str _METHOD_="setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - - if not isinstance(handlePVSet, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -First input argument, should be of handles or PVs") - - if not isinstance(valSet, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -Second input argument, should be of scalar values") - - if not isinstance(handlePVMatch, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ -Third input argument, should be of handles or PVs") - - if (len(handlePVSet) != len(valSet)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + if (len(handlePVSet) != len(valSet)): + raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ Lengths of first (handlePVSet) and second (valSet) input lists must match!") - if (len(handlePVSet) != len(handlePVMatch)): - raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + if (len(handlePVSet) != len(handlePVMatch)): + raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") - - - cdef vector[unsigned int] handleSet - handleSet.reserve(len(handlePVSet)) - - cdef vector[unsigned int] handleMatch - handleMatch.reserve(len(handlePVMatch)) - - cdef vector[double] valSetV - valSetV.reserve(len(valSet)) - - for i in range(0, len(handlePVSet)): - if isinstance(handlePVSet[i], (int,long)) == 1: - handleSet.push_back(handlePVSet[i]) - elif isinstance(handlePVSet[i], (str)) == 1: - handleSet.push_back(self.checkForHandle(handlePVSet)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="ThandlePVSet list member should be if handle, else if PV") - raise Exception(_cyCafeException) - - for i in range(0, len(handlePVMatch)): - if isinstance(handlePVMatch[i], (int,long)) == 1: - handleMatch.push_back(handlePVMatch[i]) - elif isinstance(handlePVMatch[i], (str)) == 1: - handleMatch.push_back(self.checkForHandle(handlePVMatch)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="handleMatch list member should be if handle, else if PV") - raise Exception(_cyCafeException) - - for i in range(0, len(valSet)): - valSetV.push_back(valSet[i]) - - cdef int status - with nogil: - status=self._c_cafe.setAndMatchMany(handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + cdef vector[unsigned int] handleSet + handleSet.reserve(len(handlePVSet)) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" %status) - - return status - ################################################################################## + cdef vector[unsigned int] handleMatch + handleMatch.reserve(len(handlePVMatch)) + + cdef vector[double] valSetV + valSetV.reserve(len(valSet)) + + for i in range(0, len(handlePVSet)): + if isinstance(handlePVSet[i], (int, long)): + handleSet.push_back(handlePVSet[i]) + elif isinstance(handlePVSet[i], (str)): + handleSet.push_back(self.checkForHandle(handlePVSet)) + else: + _cafeException = CafeException(_type='CafeError', _source=_METHOD, + _error_info="ThandlePVSet list member should be of type if handle, else if PV") + raise _cafeException + + 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="handleMatch list member should be of type if handle, else 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.setAndMatchMany( + handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + + return status + ############################################################################ + + ############################################################################ + + def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, + double tolerance, double timeout, bint printFlag): + cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," + "handlePVMatch, double tolerance," + "double timeout, bint printFlag)") + + cdef unsigned int handleSet = 0 + if isinstance(handlePVSet, (int, long)): + handleSet = handlePVSet + elif isinstance(handlePVSet, (str)): + handleSet = self.checkForHandle(handlePVSet) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info=("First input argument, should be of type if handle," + + "else if PV")) + raise _cafeException + + cdef unsigned int handleMatch = 0 + if isinstance(handlePVMatch, (int, long)): + handleMatch = handlePVMatch + elif isinstance(handlePVMatch, (str)): + handleMatch = self.checkForHandle(handlePVMatch) + else: + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_info=("Third input argument, should be of type if handle," + + "else if PV")) + raise _cafeException + + cdef int status + + with nogil: + status = self._c_cafe.setAndMatch( + handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + + return status + ################################################################################## + + ################################################################################## + + def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + + cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - ################################################################################## - def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): - cdef str _METHOD_="setAndMatch(handlePVSet, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)" - - cdef unsigned int handleSet=0 - if isinstance(handlePVSet, (int,long)) == 1: - handleSet=handlePVSet - elif isinstance(handlePVSet, (str)) == 1: - handleSet=self.checkForHandle(handlePVSet) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - cdef unsigned int handleMatch=0 - if isinstance(handlePVMatch, (int,long)) == 1: - handleMatch=handlePVMatch - elif isinstance(handlePVMatch, (str)) == 1: - handleMatch=self.checkForHandle(handlePVMatch) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="Third input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - cdef int status - - with nogil: - status=self._c_cafe.setAndMatch(handleSet, valSet, handleMatch, tolerance, timeout, printFlag) - - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" %status) - - return status - ################################################################################## - - - - - ################################################################################## - def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): - cdef str _METHOD_="matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" - - if not isinstance(valSet, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ -Second input argument, should be of scalar values") - - if not isinstance(handlePVMatch, (list)): - raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ -Third input argument, should be of handles or PVs") - - if (len(valSet) != len(handlePVMatch)): - raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ + 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)) - - for i in range(0, len(handlePVMatch)): - if isinstance(handlePVMatch[i], (int,long)) == 1: - handleMatch.push_back(handlePVMatch[i]) - elif isinstance(handlePVMatch[i], (str)) == 1: - handleMatch.push_back(self.checkForHandle(handlePVMatch)) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - - for i in range(0, len(valSet)): - valSetV.push_back(valSet[i]) - - cdef int status - with nogil: - status=self._c_cafe.matchMany( valSetV, handleMatch, tolerance, timeout, printFlag) + cdef vector[unsigned int] handleMatch + handleMatch.reserve(len(handlePVMatch)) - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def matchMany. Status = %d" %status) - - return status - ################################################################################## - - - ################################################################################## - def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): - cdef str _METHOD_="match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)" - - cdef unsigned int handleMatch=0 - if isinstance(handlePVMatch, (int,long)) == 1: - handleMatch=handlePVMatch - elif isinstance(handlePVMatch, (str)) == 1: - handleMatch=self.checkForHandle(handlePVMatch) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - cdef int status + cdef vector[double] valSetV + valSetV.reserve(len(valSet)) - with nogil: - status=self._c_cafe.match(valSet, handleMatch, tolerance, timeout, printFlag) + 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 if handle, else if PV") + raise _cafeException - if status !=ICAFE_NORMAL: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(status) - raise Exception("EXCEPTION RAISED in PyCafe def match. Status = %d" %status) - - return status - ################################################################################## - - - ################################################################################## - def setNelemCtrl(self, handlePV, unsigned int nelem): - cdef str _METHOD_="setNelemCtrl(self, handlePV, unsigned int nelem)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") - - #returns nelem - return self.hh.setNelemCtrl(handle, nelem) - - - - - ################################################################################## - def setNelem(self, handlePV, unsigned int nelem): - cdef str _METHOD_="setNelem(self, handlePV, unsigned int nelem)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") - - #returns nelem - return self.hh.setNelem(handle, nelem) - - ################################################################################## - def setNelemToNative(self, handlePV): - cdef str _METHOD_="setNelemToNative(self, handlePV)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") - - #returns nelem - return self.hh.setNelemToNative(handle) - - ################################################################################## - - def setNelemToRetrieveFromCacheToOne(self, handlePV): - cdef str _METHOD_="setNelemToRetrieveFromCacheToOne(self, handlePV)" - - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ - _ei="First input argument, should be if handle, else if PV") - raise Exception(_cyCafeException) - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") - - #returns previous nelem - return self._c_cafe.setNelemToRetrieveFromCacheToOne(handle) - - ################################################################################## - def setNelemToRetrieveFromCache(self, handlePV, netrfc): - cdef unsigned int handle=0 - if isinstance(handlePV, (int,long)): - handle=handlePV - elif isinstance(handlePV, (str)): - handle=self.checkForHandle(handlePV) - else: - raise Exception ("EXCEPTION RAISED IN PyCafe def set. \n\ -First input argument, should be if handle, else if PV") - - - if handle == 0: - if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: - self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) - raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") - - #returns new nelem - return self._c_cafe.setNelemToRetrieveFromCacheToPrevious(handle, netrfc) - - - ################################################################################## - def terminate(self): - with nogil: - self._c_cafe.terminate() - return - ################################################################################## + for i in range(0, len(valSet)): + valSetV.push_back(valSet[i]) + + cdef int status + + with nogil: + status = self._c_cafe.matchMany( + valSetV, handleMatch, tolerance, timeout, printFlag) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + + return status + ############################################################################ + + ############################################################################ + + def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): + + cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + + cdef unsigned int handleMatch = 0 + + if isinstance(handlePVMatch, (int, long)): + handleMatch = handlePVMatch + elif isinstance(handlePVMatch, (str)): + handleMatch = self.checkForHandle(handlePVMatch) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + cdef int status = ICAFE_NORMAL + + + with nogil: + status = self._c_cafe.match( + valSet, handleMatch, tolerance, timeout, printFlag) + + if status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(status) + raise Exception( + "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + + return status + + return 1 + ############################################################################ + + ############################################################################ + + def setNelemCtrl(self, handlePV, unsigned int nelem): + cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + raise _cafeException + + # returns nelem + return self.hh.setNelemCtrl(handle, nelem) + + ################################################################################## + + def setNelem(self, handlePV, unsigned int nelem): + cdef str _METHOD = "setNelem" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + raise _cafeException + + + # returns nelem + return self.hh.setNelem(handle, nelem) + + ############################################################################ + def setNelemToNative(self, handlePV): + cdef str _METHOD = "setNelemToNative" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + _cafeException = CafeException( + _type='CafeError', _source=_METHOD, + _error_code=ECAFE_INVALID_HANDLE, + _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + raise _cafeException + + # returns nelem + return self.hh.setNelemToNative(handle) + + ############################################################################## + + def setNelemToRetrieveFromCacheToOne(self, handlePV): + cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + raise Exception( + "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + + # returns previous nelem + return self._c_cafe.setNelemToRetrieveFromCacheToOne(handle) + +################################################################################ + def setNelemToRetrieveFromCache(self, handlePV, int netrfc): + cdef str _METHOD="etNelemToRetrieveFromCache" + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type " + "if handle, else if PV"))) + + if handle == 0: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + raise Exception( + "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + + # returns new nelem + return self._c_cafe.setNelemToRetrieveFromCacheToPrevious(handle, netrfc) + +################################################################################ + + def terminate(self): + with nogil: + self._c_cafe.terminate() + return +################################################################################ + + +# if HAVE_BSREAD==1: +################################################################################ + + def prepareSFdbpm(self): + cdef: + vector[string] bpmList + vector[unsigned int] bpmHandles + vector[string] bpmDev + vector[float] bpmPos + + self._c_cafe.prepareDBPM(bpmList, bpmHandles, bpmDev, bpmPos) + + # for i in range(0, self.bpmDev.size()): + #print (bpmPos[i], bpmDev[i] ) + + if not self.dbpmInitialized: + self.dbpm = DBPMKeeper( + bpmList, bpmHandles, bpmDev, bpmPos) + self.dbpmInitialized = True + return + +################################################################################## +# END def prepareSFdbpm(self) +################################################################################## + + def setSFdbpmBS(self, bint bsFlag=True): + return self.dbpm.setBS(bsFlag) + + def resetSFdbpmBS(self): + return self.dbpm.resetBS() + + def closeSFdbpmBS(self): + return self.dbpm.closeBS() + + def readSFdbpmOffsets(self): + return self._c_cafe.readDBPMOffsets(self.dbpm) + + def getSFdbpm(self): + + cdef str _METHOD = "getSFdbpm" + + cdef int status + cdef vector[unsigned int] handleV + with nogil: + status = self._c_cafe.getDBPM(self.dbpm) + + if status >= ICAFE_ERRNO_BASE: + self._c_cafe.printStatusMessage(status) + elif status != ICAFE_NORMAL: + if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + # self._c_cafe.printStatusMessage(status) + + handleV = self.dbpm.getHandle() + # for i in range(0, self.dbpm.getNDBPM()): + # if x[i].getStatus != + #print (self.bpmPos[i], self.bpmDev[i] ) + for i in range(0, self.dbpm.getNPV()): + if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL): + self._c_cafe.printStatus(handleV[i], status) + + return dbpmHolderToStruct(self.dbpm) + +################################################################################## +# END def getSFdbpm(self): +################################################################################## + + + def getSFdbpmOffs_x(self): + return self.dbpm.getOffsetX() + + def getSFdbpmOffs_y(self): + return self.dbpm.getOffsetY() + +################################################################################ + + def setBS(self, list pv=None, modulo=None, offset=None, int timeoutMS=0): + + cdef str _METHOD = "setBS" + cdef int status = ICAFE_NORMAL + cdef unsigned int i + cdef bint pFlag = False + + if isinstance(modulo, numbers.Number): + if int(modulo) <= 0: + raise ValueError("{} {} \n{}".format( + self._exception_text, _METHOD, + "modulo input argument must be positive!")) + elif not TypeError(modulo, dict): + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("modulo input arg, should be of type , " + "else {pv_name : modulo}"))) + + if isinstance(offset, (numbers.Number)): + if int(offset) < 0: + raise ValueError("{} {} \n{}".format( + self._exception_text, _METHOD, + "offset input argument cannot be negative!")) + elif not isinstance(offset, (dict)): + raise TypeError("{} {} \n{}".format( + self._exception_text, _METHOD, + ("offset input arg, should be of type , " + "else {pv_name : offset} "))) + + if self.BSInitialized == True: + print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") + return status + + cdef vector[string] v + + if timeoutMS > 0: + self.bsd.setTimeout(timeoutMS) + + if pv is not None: + # do this to avoid compiler warning messages + for i in range(0, len(pv)): + v.push_back(pv[i]) + self.bsd.init(v) + + if isinstance(modulo, (numbers.Number)): + modulo = dict([(pv[i], int(modulo)) + for i in range(0, len(pv))]) + + if isinstance(offset, (numbers.Number)): + offset = dict([(pv[i], int(offset)) + for i in range(0, len(pv))]) + + if modulo is not None: + for eachKey in modulo: + self.bsd.setBSModulo(eachKey, modulo[eachKey]) + if offset is not None: + for eachKey in offset: + self.bsd.setBSOffset(eachKey, offset[eachKey]) + + # self.initBSwithCA() + with nogil: + self._c_cafe.initBSwithCA(self.bsd) + + with nogil: + self._c_cafe.getBS(self.bsd) + + with nogil: + # status=self._c_cafe.setBS_Step1(self.bsd) + status = self._c_cafe.setBS(self.bsd) + + if status == ICAFE_NORMAL: + self.BSInitialized = True + self.isBSinCAOnly = False + + return status + +################################################################################ + + def initBSwithCA(self): + + # self.openPrepare() + with nogil: + self._c_cafe.initBSwithCA(self.bsd) + + # self.openNowAndWait(0.4) + + +################################################################################ + def setBS2CA(self, list pv=None): + + cdef vector[string] v + if pv is not None: + # do this to avoid compiler warning messages + for i in range(0, len(pv)): + v.push_back(pv[i]) + self.bsd.init(v) + + with nogil: + self._c_cafe.setBS2CAGroup(self.bsd) + self.isBSinCAOnly = True + + + def getBSSlim(self): + if self.BSInitialized == False: + if self.isBSinCAOnly == False: + print(("Message from getBS: BS stream not initialized;" + "cafe.setBS(pvList) has first to be called.")) + return None + + with nogil: + self._c_cafe.getBS(self.bsd) + + + t1= time.time() + PVDataV = self.bsd.getPVDataV() + + pvlist = [None] * self.bsd.getNPV() + #cdef pvdata p1 + + for i in range (0, self.bsd.getNPV()): + #p1 = pvdata() + #p1 = PVDataHolderToStruct(self.bsd.pvdata[i]) + pvlist[i]=PVDataHolderToStruct(PVDataV[i]) + + + bs_slim = {} + + for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()): + bs_slim[handle] = data + + t2= time.time() + print("diff in reading BSDataHolderToStruc", t2 - t1) + + + return bs_slim + +################################################################################ + def getBS(self): + + if self.BSInitialized == False: + if self.isBSinCAOnly == False: + print(("Message from getBS: BS stream not initialized;" + "cafe.setBS(pvList) has first to be called.")) + + return None + # CHECK STATUS!!!! + #print("getBS in cycafe" + #start = time.time() + + with nogil: + self._c_cafe.getBS(self.bsd) + + _bsd = BSDataHolderToStruct(self.bsd) + #_bsd.show() + return _bsd #BSDataHolderToStruct(self.bsd) + + ''' + cdef double _pid = 0 + _handle = self._c_cafe.getHandleFromPV(str('SIN-TIMAST-EVG0:TX-PULSEID')) + _stat = self._c_cafe.getCacheDouble(_handle, _pid) + print("cython/cafe/diff in cython ", self.bsd.getPulse_id(), _pid, _pid - self.bsd.getPulse_id()) + t1= time.time() + print("diff in cython", t1 - start) + #print("pulse_id in cycafe", self.bsd.getPulse_id()) + + BSd = BSDataHolderToStruct(self.bsd) + t2= time.time() + print("diff totol in reading BSDataHolderToStruc", t2 - start) + + return BSd + ''' + +################################################################################ + + def closeBS(self): + with nogil: + self._c_cafe.closeBS(self.bsd) + self.BSInitialized = False + self.isBSinCAOnly = False + + + def getTimeoutMSBS(self): + return self.bsd.getTimeout() + + def setTimeoutMSBS(self, int timeoutMS): + self.bsd.setTimeout(timeoutMS) + + + def reconnectBS(self): + self.bsd.reconnect() + + + def flushBS(self): + self.bsd.reconnect() + + + def monitorPulseID(self): + with nogil: + self._c_cafe.monitorPulseID() + + + def monitorStopPulseID(self): + with nogil: + self._c_cafe.monitorStopPulseID() + + + def setPulseIDBufferSize(self, handlePV, int bufferSize = 10): + cdef str _METHOD = "setPulseIDBufferSize" + + cdef unsigned int handle = 0 + if isinstance(handlePV, (int, long)): + handle = handlePV + elif isinstance(handlePV, (str)): + handle = self.checkForHandle(handlePV) + else: + raise Exception("{} {} \n{}".format( + self._exception_text, _METHOD, + ("First Input argument should be of type if handle " + "else if PV."))) + + self._c_cafe.setPulseIDBufferSize(handle, bufferSize) + + + def setPulseIDBufferSizeAll(self, int bufferSize = 10): + self._c_cafe.setPulseIDBufferSizeAll(bufferSize) + + +################################################################################### + + def setBSInit(self, list pv): + self.bsd.init(pv) + ################################################################################## #END: cdef CAFE################################################################### ################################################################################## - - - - diff --git a/PyCafeDefs.pxi b/PyCafeDefs.pxi index 9aca8f8..3ffd74c 100644 --- a/PyCafeDefs.pxi +++ b/PyCafeDefs.pxi @@ -1,204 +1,23 @@ -def show(): - print ("cafe=PyCafe.CyCafe()") - print ("cyca=PyCafe.CyCa()") - print ("cafe.init()") - print ("cafe.openNoWait()") - print ("=cafe.open()") - print ("cafe.openNowAndWait(timeout)") - print ("cafe.openNow()") - print ("cafe.close(handlePV=)") - print ("cafe.closeChannels()") - print ("cafe.allConnected()") - print ("cafe.isConnected(handlePV=)") - print ("cafe.printDisconnected()") - print ("cafe.printHandles()") - print ("cafe.printHandle(handlePV=)") - - print ("cafe.getStatus(handlePV=)") - print ("cafe.getAlarmStatusSeverity(handlePV=)") - print ("cafe.getTimeStamp(handlePV=)") - print ("cafe.getTimeStampDate(handlePV=)") - print ("cafe.checkForHandle()") - print ("cafe.checkForHandleList()") - print ("cafe.checkForGroupHandle()") - print ("cafe.getPVNameFromHandle(int)") - print ("cafe.getHandleFromPVName(str)") - print ("cafe.getChannelInfo(handlePV=)") - print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX - print ("cafe.getDbrBase(handlePV=)") - - print ("cafe.getNonBlocking(handlePV=)") #followed by getCache - print ("cafe.get(handlePV=)") # return in native type - print ("cafe.get(handlePV=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getInt(handlePV=)") - print ("cafe.getFloathandlePV=)") - print ("cafe.getStr(handlePV=)") - - print ("cafe.getList(handlePV=)") # return List in native type - print ("cafe.getList(handlePV=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getIntList(handlePV=)") - print ("cafe.getFloatList(handlePV=)") - print ("cafe.getStrList(handlePV=)") - - # returns Memoryview in native type, except for when dt='str' which returns a List - # returns np.array if asnumpy=True - print ("cafe.getArray(handlePV=)") - print ("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") - print ("cafe.getIntArray(handlePV=,asnumpy=)") - print ("cafe.getFloatArray(handlePV=,asnumpy=)") - - - print ("cafe.getPV(handlePV=)") # return PVData in native type - print ("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getPVInt(handlePV=)") - print ("cafe.getPVFloat(handlePV=)") - print ("cafe.getPVStr(handlePV=)") - - print ("cafe.getPVList(handleList=)") # return Array of PVData in native type - print ("cafe.getPVList(handleList=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getPVIntList(handleList=)") - print ("cafe.getPVFloatList(handleList=)") - print ("cafe.getPVStrList(handleList=)") - - print ("cafe.getScalarList(handleList=)") # return List in native type - print ("cafe.getScalarList(handleList=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getIntScalarList(handleList=)") - print ("cafe.getFloatScalarList(handleList=)") - print ("cafe.getStrScalarList(handleList=)") - - print ("cafe.getPVCache(handlePV=)") # return PVData in native type - print ("cafe.getPVCache(handlePV=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getPVIntCache(handlePV=)") - print ("cafe.getPVFloatCache(handlePV=)") - print ("cafe.getPVStrCache(handlePV=)") - - - # returns Memoryview in native type, except for when dt='str' which returns a List - # returns np.array if asnumpy=True - print ("cafe.getArrayCache(handlePV=)") - print ("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") - print ("cafe.getIntArrayCache(handlePV=,asnumpy=)") - print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") - - print ("cafe.getCtrl(handlePV=)") - print ("cafe.getCtrl(handlePV=, dt='native' (default) else <'int','float','str'>)") - print ("cafe.getCtrlCache(handlePV=)") - print ("cafe.getCtrlCache(handlePV=, dt='native' (default) else <'int','float','str'>)") +# define threshold +cdef int PYCAFE_PRINT_HIGH = 9 +cdef int PYCAFE_PRINT_MED = 5 +cdef int PYCAFE_PRINT_LOW = 1 +cdef int PYCAFE_PRINT_NONE = 0 - print ("mpid=cafe.monitorStart(handlePV=), cb=None, dbr=None, mask=DBE_VALUE|DBE_LOG|DBE_ALARM)") - print ("cafe.monitorStop(handlePV=, mpID=None)") - print ("cafe.monitorStopAll(handlePV=)") +cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE - print ("cafe.getNoMonitors(handlePV=)") - print ("cafe.set(handlePV=, valSet)") - print ("cafe.setScalarList(handleList=, valList)") - print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ - tolerance= , timeout=, printFlag=)") - #Synchronous groups - print ("ghandle = groupings(char * gname, list _pvlist)") - print ("ghandle = groupopen(char * gname)") - print ("status = groupClose()") - print ("handleList[]=cafe.defineGroup(gname, pvList)") - print ("list[]=cafe.PVGroupValuesToList(pvgroup)") - print ("vectorList,status,statusList = cafe.getGroup(ghandleName, dt='native')") - print ("pvdataList[],status = cafe.getPVGroup(ghandleName, dt='native')") - print ("cafe.setGroup(ghandleName, vectorList)") - - return - -#define threshold -cdef int PYCAFE_PRINT_HIGH=9 -cdef int PYCAFE_PRINT_MED=5 -cdef int PYCAFE_PRINT_LOW=1 - -cdef int PYCAFE_PRINT_LEVEL=PYCAFE_PRINT_MED - -ctypedef shared_ptr[vector [double]] vdouble_ptr -ctypedef shared_ptr[vector [float]] vfloat_ptr - -cdef object py_cb = None -cdef object py_cb_handle = None -cdef object py_cb_ctrl = None +#ctypedef shared_ptr[vector[double]] vdouble_ptr +#ctypedef shared_ptr[vector[float]] vfloat_ptr +IF PY_EXT_C: + include "PyCafeDefs_pub.pxi" +ELSE: + include "PyCafeDefs_api.pxi" ''' -def py_cb(pvdata pv1, unsigned int handle, str pvname): - print ("PV:", pvname, " Handle:", handle - pv1.showMax(10) - return -def py_cb_handle(unsigned int handle): - print (" Handle:", handle - return - -#Add control callback! - -def py_cb_ctrl(pvctrl c1, unsigned int handle, str pvname): - print ("PV:", pvname, " Handle:", handle - c1.showMax(10) - return -''' - -#***********api*************** - -#For when with pvdata -cdef api void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: - - cdef pvdata pv1 = PVDataHolderToStruct(pvd) - - py_cb(pv1, handle, pvname) - - with nogil: - return - -cdef api void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: - cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) - py_cb_ctrl(c1, handle, pvname) - with nogil: - return - -cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: - - py_cb_handle(handle) - - with nogil: - return - -#Default -cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: - - if monDictGlobal.has_key(monid): - cbobjt=monDictGlobal[monid] - cbobjt(handle) - - with nogil: - return - - -cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: - py_cb_handle_get(handle) - with nogil: - return - -cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: - py_cb_handle_put(handle) - with nogil: - return - - -#***********api*************** -''' -cdef object callbackHandlerMonitor = None - - -cdef void callbackHandlerMonitor_wrapper(event_handler_args args) with gil: - handle= args.usr - py_cb_handle(handle) - with nogil: - return -''' #Correct memory management a la KWSmith p.190 cdef class _finalizer: cdef void *_data @@ -212,622 +31,706 @@ cdef void set_base(cnp.ndarray arr, void * carr): fin._data = carr cnp.set_array_base(arr, fin) return +''' cdef class CyCa: - cpdef readonly unsigned int CY_DBE_VALUE - cpdef readonly unsigned int CY_DBE_LOG - cpdef readonly unsigned int CY_DBE_ARCHIVE - cpdef readonly unsigned int CY_DBE_ALARM - cpdef readonly unsigned int CY_DBE_PROPERTY - cpdef readonly unsigned int CY_DBR_PRIMITIVE - cpdef readonly unsigned int CY_DBR_PLAIN - cpdef readonly unsigned int CY_DBR_STS - cpdef readonly unsigned int CY_DBR_TIME - cpdef readonly unsigned int CY_DBR_GR - cpdef readonly unsigned int CY_DBR_CTRL - cpdef readonly unsigned int CY_DBR_PUT - cpdef readonly unsigned int CY_DBR_STSACK - cpdef readonly unsigned int CY_DBR_CLASS - cpdef readonly unsigned int CY_DBR_NONE - cpdef readonly unsigned int CY_DBR_STRING #returns a NULL terminated string - cpdef readonly unsigned int CY_DBR_SHORT #returns an unsigned short - cpdef readonly unsigned int CY_DBR_INT #returns an unsigned short - cpdef readonly unsigned int CY_DBR_FLOAT #returns an IEEE floating point value - cpdef readonly unsigned int CY_DBR_ENUM #returns an unsigned short which is the enum item - cpdef readonly unsigned int CY_DBR_CHAR #returns an unsigned char - cpdef readonly unsigned int CY_DBR_LONG #returns an unsigned long - cpdef readonly unsigned int CY_DBR_DOUBLE #returns a double precision floating point number - cpdef readonly unsigned int CY_DBR_STS_STRING #returns a string status structure (dbr_sts_string) - cpdef readonly unsigned int CY_DBR_STS_SHORT #returns a short status structure (dbr_sts_short) - cpdef readonly unsigned int CY_DBR_STS_INT #returns a short status structure (dbr_sts_int) - cpdef readonly unsigned int CY_DBR_STS_FLOAT #returns a float status structure (dbr_sts_float) - cpdef readonly unsigned int CY_DBR_STS_ENUM #returns an enum status structure (dbr_sts_enum) - cpdef readonly unsigned int CY_DBR_STS_CHAR #returns a char status structure (dbr_sts_char) - cpdef readonly unsigned int CY_DBR_STS_LONG #returns a long status structure (dbr_sts_long) - cpdef readonly unsigned int CY_DBR_STS_DOUBLE #returns a double status structure (dbr_sts_double) - cpdef readonly unsigned int CY_DBR_TIME_STRING #returns a string time structure (dbr_time_string) - cpdef readonly unsigned int CY_DBR_TIME_SHORT #returns a short time structure (dbr_time_short) - cpdef readonly unsigned int CY_DBR_TIME_INT #returns a short time structure (dbr_time_short) - cpdef readonly unsigned int CY_DBR_TIME_FLOAT #returns a float time structure (dbr_time_float) - cpdef readonly unsigned int CY_DBR_TIME_ENUM #returns an enum time structure (dbr_time_enum) - cpdef readonly unsigned int CY_DBR_TIME_CHAR #returns a char time structure (dbr_time_char) - cpdef readonly unsigned int CY_DBR_TIME_LONG #returns a long time structure (dbr_time_long) - cpdef readonly unsigned int CY_DBR_TIME_DOUBLE #returns a double time structure (dbr_time_double) - cpdef readonly unsigned int CY_DBR_GR_STRING #returns a graphic string structure (dbr_gr_string) - cpdef readonly unsigned int CY_DBR_GR_SHORT #returns a graphic short structure (dbr_gr_short) - cpdef readonly unsigned int CY_DBR_GR_INT #returns a graphic short structure (dbr_gr_int) - cpdef readonly unsigned int CY_DBR_GR_FLOAT #returns a graphic float structure (dbr_gr_float) - cpdef readonly unsigned int CY_DBR_GR_ENUM #returns a graphic enum structure (dbr_gr_enum) - cpdef readonly unsigned int CY_DBR_GR_CHAR #returns a graphic char structure (dbr_gr_char) - cpdef readonly unsigned int CY_DBR_GR_LONG #returns a graphic long structure (dbr_gr_long) - cpdef readonly unsigned int CY_DBR_GR_DOUBLE #returns a graphic double structure (dbr_gr_double) - cpdef readonly unsigned int CY_DBR_CTRL_STRING #returns a control string structure (dbr_ctrl_int) - cpdef readonly unsigned int CY_DBR_CTRL_SHORT #returns a control short structure (dbr_ctrl_short) - cpdef readonly unsigned int CY_DBR_CTRL_INT #returns a control short structure (dbr_ctrl_int) - cpdef readonly unsigned int CY_DBR_CTRL_FLOAT #returns a control float structure (dbr_ctrl_float) - cpdef readonly unsigned int CY_DBR_CTRL_ENUM #returns a control enum structure (dbr_ctrl_enum) - cpdef readonly unsigned int CY_DBR_CTRL_CHAR #returns a control char structure (dbr_ctrl_char) - cpdef readonly unsigned int CY_DBR_CTRL_LONG #returns a control long structure (dbr_ctrl_long) - cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE #returns a control double structure (dbr_ctrl_double) + cpdef readonly unsigned int CY_DBE_VALUE + cpdef readonly unsigned int CY_DBE_LOG + cpdef readonly unsigned int CY_DBE_ARCHIVE + cpdef readonly unsigned int CY_DBE_ALARM + cpdef readonly unsigned int CY_DBE_PROPERTY + cpdef readonly unsigned int CY_DBR_PRIMITIVE + cpdef readonly unsigned int CY_DBR_PLAIN + cpdef readonly unsigned int CY_DBR_STS + cpdef readonly unsigned int CY_DBR_TIME + cpdef readonly unsigned int CY_DBR_GR + cpdef readonly unsigned int CY_DBR_CTRL + cpdef readonly unsigned int CY_DBR_PUT + cpdef readonly unsigned int CY_DBR_STSACK + cpdef readonly unsigned int CY_DBR_CLASS + cpdef readonly unsigned int CY_DBR_NONE + cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short + # returns an IEEE floating point value + cpdef readonly unsigned int CY_DBR_FLOAT + # returns an unsigned short which is the enum item + cpdef readonly unsigned int CY_DBR_ENUM + cpdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + # returns a double precision floating point number + cpdef readonly unsigned int CY_DBR_DOUBLE + # returns a string status structure (dbr_sts_string) + cpdef readonly unsigned int CY_DBR_STS_STRING + # returns a short status structure (dbr_sts_short) + cpdef readonly unsigned int CY_DBR_STS_SHORT + # returns a short status structure (dbr_sts_int) + cpdef readonly unsigned int CY_DBR_STS_INT + # returns a float status structure (dbr_sts_float) + cpdef readonly unsigned int CY_DBR_STS_FLOAT + # returns an enum status structure (dbr_sts_enum) + cpdef readonly unsigned int CY_DBR_STS_ENUM + # returns a char status structure (dbr_sts_char) + cpdef readonly unsigned int CY_DBR_STS_CHAR + # returns a long status structure (dbr_sts_long) + cpdef readonly unsigned int CY_DBR_STS_LONG + # returns a double status structure (dbr_sts_double) + cpdef readonly unsigned int CY_DBR_STS_DOUBLE + # returns a string time structure (dbr_time_string) + cpdef readonly unsigned int CY_DBR_TIME_STRING + # returns a short time structure (dbr_time_short) + cpdef readonly unsigned int CY_DBR_TIME_SHORT + # returns a short time structure (dbr_time_short) + cpdef readonly unsigned int CY_DBR_TIME_INT + # returns a float time structure (dbr_time_float) + cpdef readonly unsigned int CY_DBR_TIME_FLOAT + # returns an enum time structure (dbr_time_enum) + cpdef readonly unsigned int CY_DBR_TIME_ENUM + # returns a char time structure (dbr_time_char) + cpdef readonly unsigned int CY_DBR_TIME_CHAR + # returns a long time structure (dbr_time_long) + cpdef readonly unsigned int CY_DBR_TIME_LONG + # returns a double time structure (dbr_time_double) + cpdef readonly unsigned int CY_DBR_TIME_DOUBLE + # returns a graphic string structure (dbr_gr_string) + cpdef readonly unsigned int CY_DBR_GR_STRING + # returns a graphic short structure (dbr_gr_short) + cpdef readonly unsigned int CY_DBR_GR_SHORT + # returns a graphic short structure (dbr_gr_int) + cpdef readonly unsigned int CY_DBR_GR_INT + # returns a graphic float structure (dbr_gr_float) + cpdef readonly unsigned int CY_DBR_GR_FLOAT + # returns a graphic enum structure (dbr_gr_enum) + cpdef readonly unsigned int CY_DBR_GR_ENUM + # returns a graphic char structure (dbr_gr_char) + cpdef readonly unsigned int CY_DBR_GR_CHAR + # returns a graphic long structure (dbr_gr_long) + cpdef readonly unsigned int CY_DBR_GR_LONG + # returns a graphic double structure (dbr_gr_double) + cpdef readonly unsigned int CY_DBR_GR_DOUBLE + # returns a control string structure (dbr_ctrl_int) + cpdef readonly unsigned int CY_DBR_CTRL_STRING + # returns a control short structure (dbr_ctrl_short) + cpdef readonly unsigned int CY_DBR_CTRL_SHORT + # returns a control short structure (dbr_ctrl_int) + cpdef readonly unsigned int CY_DBR_CTRL_INT + # returns a control float structure (dbr_ctrl_float) + cpdef readonly unsigned int CY_DBR_CTRL_FLOAT + # returns a control enum structure (dbr_ctrl_enum) + cpdef readonly unsigned int CY_DBR_CTRL_ENUM + # returns a control char structure (dbr_ctrl_char) + cpdef readonly unsigned int CY_DBR_CTRL_CHAR + # returns a control long structure (dbr_ctrl_long) + cpdef readonly unsigned int CY_DBR_CTRL_LONG + # returns a control double structure (dbr_ctrl_double) + cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE - #cpdef readonly int CY_ECA_TIMEOUT + # cpdef readonly int CY_ECA_TIMEOUT - cpdef readonly int CY_ECA_NORMAL # 1 - cpdef readonly int CY_ECA_ALLOCMEM # 48 - cpdef readonly int CY_ECA_TOLARGE # 72 - cpdef readonly int CY_ECA_TIMEOUT # 80 - cpdef readonly int CY_ECA_BADTYPE # 114 - cpdef readonly int CY_ECA_INTERNAL # 142 - cpdef readonly int CY_ECA_GETFAIL # 152 - cpdef readonly int CY_ECA_PUTFAIL # 160 - cpdef readonly int CY_ECA_BADCOUNT # 176 - cpdef readonly int CY_ECA_BADSTR # 186 - cpdef readonly int CY_ECA_DISCONN # 192 - cpdef readonly int CY_ECA_DBLCHNL # 200 - cpdef readonly int CY_ECA_EVDISALLOW # 210 - cpdef readonly int CY_ECA_BADMONID # 242 - cpdef readonly int CY_ECA_BADMASK # 330 - cpdef readonly int CY_ECA_IODONE # 339 - cpdef readonly int CY_ECA_IOINPROGRESS # 347 - cpdef readonly int CY_ECA_BADSYNCGRP # 354 - cpdef readonly int CY_ECA_PUTCBINPROG # 362 - cpdef readonly int CY_ECA_NORDACCESS # 368 - cpdef readonly int CY_ECA_NOWTACCESS # 376 - cpdef readonly int CY_ECA_ANACHRONISM # 386 - cpdef readonly int CY_ECA_NOSEARCHADDR # 392 - cpdef readonly int CY_ECA_NOCONVERT # 400 - cpdef readonly int CY_ECA_BADCHID # 410 - cpdef readonly int CY_ECA_BADFUNCPTR # 418 - cpdef readonly int CY_ECA_ISATTACHED # 424 - cpdef readonly int CY_ECA_UNAVAILINSERV # 432 - cpdef readonly int CY_ECA_CHANDESTROY # 440 - cpdef readonly int CY_ECA_BADPRIORITY # 450 - cpdef readonly int CY_ECA_NOTTHREADED # 458 - cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 - cpdef readonly int CY_ECA_CONNSEQTMO # 472 - cpdef readonly int CY_ECA_UNRESPTMO # 480 + cpdef readonly int CY_ECA_NORMAL # 1 + cpdef readonly int CY_ECA_ALLOCMEM # 48 + cpdef readonly int CY_ECA_TOLARGE # 72 + cpdef readonly int CY_ECA_TIMEOUT # 80 + cpdef readonly int CY_ECA_BADTYPE # 114 + cpdef readonly int CY_ECA_INTERNAL # 142 + cpdef readonly int CY_ECA_GETFAIL # 152 + cpdef readonly int CY_ECA_PUTFAIL # 160 + cpdef readonly int CY_ECA_BADCOUNT # 176 + cpdef readonly int CY_ECA_BADSTR # 186 + cpdef readonly int CY_ECA_DISCONN # 192 + cpdef readonly int CY_ECA_DBLCHNL # 200 + cpdef readonly int CY_ECA_EVDISALLOW # 210 + cpdef readonly int CY_ECA_BADMONID # 242 + cpdef readonly int CY_ECA_BADMASK # 330 + cpdef readonly int CY_ECA_IODONE # 339 + cpdef readonly int CY_ECA_IOINPROGRESS # 347 + cpdef readonly int CY_ECA_BADSYNCGRP # 354 + cpdef readonly int CY_ECA_PUTCBINPROG # 362 + cpdef readonly int CY_ECA_NORDACCESS # 368 + cpdef readonly int CY_ECA_NOWTACCESS # 376 + cpdef readonly int CY_ECA_ANACHRONISM # 386 + cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + cpdef readonly int CY_ECA_NOCONVERT # 400 + cpdef readonly int CY_ECA_BADCHID # 410 + cpdef readonly int CY_ECA_BADFUNCPTR # 418 + cpdef readonly int CY_ECA_ISATTACHED # 424 + cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + cpdef readonly int CY_ECA_CHANDESTROY # 440 + cpdef readonly int CY_ECA_BADPRIORITY # 450 + cpdef readonly int CY_ECA_NOTTHREADED # 458 + cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + cpdef readonly int CY_ECA_CONNSEQTMO # 472 + cpdef readonly int CY_ECA_UNRESPTMO # 480 + cpdef readonly int ICAFE_CS_NEVER_CONN + cpdef readonly int ICAFE_CS_PREV_CONN + cpdef readonly int ICAFE_CS_CONN + cpdef readonly int ICAFE_CS_CLOSED + cpdef readonly int ICAFE_CS_DISCONN + cpdef readonly int ICAFE_CS_UNKNOWN - cpdef readonly int ICAFE_CS_NEVER_CONN - cpdef readonly int ICAFE_CS_PREV_CONN - cpdef readonly int ICAFE_CS_CONN - cpdef readonly int ICAFE_CS_CLOSED - cpdef readonly int ICAFE_CS_DISCONN - cpdef readonly int ICAFE_CS_UNKNOWN - - cpdef readonly int ICAFE_TYPENOTCONN - cpdef readonly int ICAFE_RULE_FALSE - cpdef readonly int ICAFE_BADCOUNT - cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED - cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK - cpdef readonly int ICAFE_CACHE_EMPTY - cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT - cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN - cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE - cpdef readonly int ICAFE_SET_AND_GET_MISMATCH - - cpdef readonly int ICAFE_CA_OP_GET - cpdef readonly int ICAFE_CA_OP_PUT - cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL - cpdef readonly int ICAFE_CA_OP_ADD_EVENT - cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT - cpdef readonly int ICAFE_CA_OP_OTHER - cpdef readonly int ICAFE_CA_OP_CONN_DOWN - cpdef readonly int ICAFE_CA_OP_CONN_UP - - cpdef readonly int ECAFE_LOAD_COLLECTION - cpdef readonly int ECAFE_LOAD_GROUP - - cpdef readonly int ICAFE_NORMAL - cpdef readonly int ICAFE_SUCCESS - - cpdef readonly int ECAFE_NODATA - cpdef readonly int ECAFE_INVALID_TYPE - cpdef readonly int ECAFE_BADCOUNT - cpdef readonly int ECAFE_BADSTR - cpdef readonly int ECAFE_BADTYPE - cpdef readonly int ECAFE_NO_CONVERT - cpdef readonly int ECAFE_NULLCONTEXT - cpdef readonly int ECAFE_NULLCHID - cpdef readonly int ECAFE_NULLEVID - cpdef readonly int ECAFE_UNKNOWN_COLLECTION - cpdef readonly int ECAFE_EMPTY_COLLECTION - cpdef readonly int ECAFE_COLLECTION_PREV_DEF - cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER - cpdef readonly int ECAFE_RULE_FALSE - cpdef readonly int ECAFE_UNKNOWN_GROUP - cpdef readonly int ECAFE_EMPTY_GROUP - cpdef readonly int ECAFE_GROUP_PREV_DEF - cpdef readonly int ECAFE_INVALID_HANDLE - cpdef readonly int ECAFE_INVALID_GROUP_HANDLE - cpdef readonly int ECAFE_NORDACCESS - cpdef readonly int ECAFE_NOWTACCESS - cpdef readonly int ECAFE_TIMEOUT - cpdef readonly int ECAFE_CANNOT_OPEN_FILE - cpdef readonly int ECAFE_INVALID_SWITCH_CASE - cpdef readonly int ECAFE_PVALIAS_PREV_DEF - cpdef readonly int ECAFE_PVALIAS_INVALID - cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS - cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND - cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS - cpdef readonly int ECAFE_WRONG_CA_CONTEXT - cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE - cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED - cpdef readonly int ECAFE_INVALID_ENUM_INDEX - cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH - cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH - cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH - cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + cpdef readonly int ICAFE_TYPENOTCONN + cpdef readonly int ICAFE_RULE_FALSE + cpdef readonly int ICAFE_BADCOUNT + cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + cpdef readonly int ICAFE_CACHE_EMPTY + cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + cpdef readonly int ICAFE_SET_AND_GET_MISMATCH - cpdef readonly int ECAFE_BPM_DATA_IS_INVALID - - cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS - cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM - cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM - cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + cpdef readonly int ICAFE_CA_OP_GET + cpdef readonly int ICAFE_CA_OP_PUT + cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + cpdef readonly int ICAFE_CA_OP_ADD_EVENT + cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + cpdef readonly int ICAFE_CA_OP_OTHER + cpdef readonly int ICAFE_CA_OP_CONN_DOWN + cpdef readonly int ICAFE_CA_OP_CONN_UP - cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA - cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER - cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER - cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL - - cpdef readonly int ERRNO_EINTR - cpdef readonly int ERRNO_EAGAIN - cpdef readonly int ERRNO_EFAULT - cpdef readonly int ERRNO_EINVAL - cpdef readonly int ERRNO_ENOTSOCK - cpdef readonly int ERRNO_EPROTONOSUPPORT - - cpdef readonly int SEV_NO_ALARM - cpdef readonly int SEV_MINOR - cpdef readonly int SEV_MAJOR - cpdef readonly int SEV_INVALID + cpdef readonly int ICAFE_DAQ_RUN + cpdef readonly int ICAFE_DAQ_PAUSED + cpdef readonly int ICAFE_DAQ_STOPPED - cpdef readonly int STAT_NO_ALARM - cpdef readonly int STAT_READ - cpdef readonly int STAT_WRITE - cpdef readonly int STAT_HIHI - cpdef readonly int STAT_HIGH - cpdef readonly int STAT_LOLO - cpdef readonly int STAT_LOW - cpdef readonly int STAT_STATE - cpdef readonly int STAT_COS - cpdef readonly int STAT_COMM - cpdef readonly int STAT_TIMEOUT - cpdef readonly int STAT_HWLIMIT - cpdef readonly int STAT_CALC - cpdef readonly int STAT_SCAN - cpdef readonly int STAT_LINK - cpdef readonly int STAT_SOFT - cpdef readonly int STAT_BAD_SUB - cpdef readonly int STAT_UDF - cpdef readonly int STAT_DISABLE - cpdef readonly int STAT_SIMM - cpdef readonly int STAT_READ_ACCESS - cpdef readonly int STAT_WRITE_ACCESS - - - #ctypedef enum ChannelRequestPolicyKind: - cpdef readonly unsigned int WITHOUT_CALLBACK - cpdef readonly unsigned int WITH_CALLBACK_DEFAULT - cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED - - #ChannelFlushSendBufferPolicyKind: - cpdef readonly unsigned int WITH_FLUSH_IO - cpdef readonly unsigned int WITH_PEND_IO - cpdef readonly unsigned int WITH_PEND_EVENT - cpdef readonly unsigned int WITH_POLL + cpdef readonly int ECAFE_LOAD_COLLECTION + cpdef readonly int ECAFE_LOAD_GROUP - #ChannelWhenToFlushSendBufferPolicyKind: - cpdef readonly unsigned int FLUSH_AUTOMATIC - cpdef readonly unsigned int FLUSH_NOW - cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION - cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION - cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE - cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION - cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + cpdef readonly int ICAFE_NORMAL + cpdef readonly int ICAFE_SUCCESS - - #ChannelGetCacheWaitPolicyKind: - cpdef readonly unsigned int GET_CACHE_NO_CHECK - cpdef readonly unsigned int GET_CACHE_NO_WAIT - cpdef readonly unsigned int GET_CACHE_NOW - cpdef readonly unsigned int GET_CACHE_WAIT + cpdef readonly int ECAFE_NODATA + cpdef readonly int ECAFE_INVALID_TYPE + cpdef readonly int ECAFE_BADCOUNT + cpdef readonly int ECAFE_BADSTR + cpdef readonly int ECAFE_BADTYPE + cpdef readonly int ECAFE_NO_CONVERT + cpdef readonly int ECAFE_NULLCONTEXT + cpdef readonly int ECAFE_NULLCHID + cpdef readonly int ECAFE_NULLEVID + cpdef readonly int ECAFE_UNKNOWN_COLLECTION + cpdef readonly int ECAFE_EMPTY_COLLECTION + cpdef readonly int ECAFE_COLLECTION_PREV_DEF + cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + cpdef readonly int ECAFE_RULE_FALSE + cpdef readonly int ECAFE_UNKNOWN_GROUP + cpdef readonly int ECAFE_EMPTY_GROUP + cpdef readonly int ECAFE_GROUP_PREV_DEF + cpdef readonly int ECAFE_INVALID_HANDLE + cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + cpdef readonly int ECAFE_NORDACCESS + cpdef readonly int ECAFE_NOWTACCESS + cpdef readonly int ECAFE_TIMEOUT + cpdef readonly int ECAFE_CANNOT_OPEN_FILE + cpdef readonly int ECAFE_INVALID_SWITCH_CASE + cpdef readonly int ECAFE_PVALIAS_PREV_DEF + cpdef readonly int ECAFE_PVALIAS_INVALID + cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + cpdef readonly int ECAFE_WRONG_CA_CONTEXT + cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + cpdef readonly int ECAFE_INVALID_ENUM_INDEX + cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED - #ChannelGetActionWhenMonitorPolicyKind: - cpdef readonly unsigned int GET_FROM_CACHE - cpdef readonly unsigned int GET_FROM_IOC + cpdef readonly int ECAFE_BPM_DATA_IS_INVALID + + cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS + cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM + cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM + cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + + cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + + cpdef readonly int ERRNO_EINTR + cpdef readonly int ERRNO_EAGAIN + cpdef readonly int ERRNO_EFAULT + cpdef readonly int ERRNO_EINVAL + cpdef readonly int ERRNO_ENOTSOCK + cpdef readonly int ERRNO_EPROTONOSUPPORT + + cpdef readonly int SEV_NO_ALARM + cpdef readonly int SEV_MINOR + cpdef readonly int SEV_MAJOR + cpdef readonly int SEV_INVALID + + cpdef readonly int STAT_NO_ALARM + cpdef readonly int STAT_READ + cpdef readonly int STAT_WRITE + cpdef readonly int STAT_HIHI + cpdef readonly int STAT_HIGH + cpdef readonly int STAT_LOLO + cpdef readonly int STAT_LOW + cpdef readonly int STAT_STATE + cpdef readonly int STAT_COS + cpdef readonly int STAT_COMM + cpdef readonly int STAT_TIMEOUT + cpdef readonly int STAT_HWLIMIT + cpdef readonly int STAT_CALC + cpdef readonly int STAT_SCAN + cpdef readonly int STAT_LINK + cpdef readonly int STAT_SOFT + cpdef readonly int STAT_BAD_SUB + cpdef readonly int STAT_UDF + cpdef readonly int STAT_DISABLE + cpdef readonly int STAT_SIMM + cpdef readonly int STAT_READ_ACCESS + cpdef readonly int STAT_WRITE_ACCESS + + # ctypedef enum ChannelRequestPolicyKind: + cpdef readonly unsigned int WITHOUT_CALLBACK + cpdef readonly unsigned int WITH_CALLBACK_DEFAULT + cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + + # ChannelFlushSendBufferPolicyKind: + cpdef readonly unsigned int WITH_FLUSH_IO + cpdef readonly unsigned int WITH_PEND_IO + cpdef readonly unsigned int WITH_PEND_EVENT + cpdef readonly unsigned int WITH_POLL + + # ChannelWhenToFlushSendBufferPolicyKind: + cpdef readonly unsigned int FLUSH_AUTOMATIC + cpdef readonly unsigned int FLUSH_NOW + cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + + # ChannelGetCacheWaitPolicyKind: + cpdef readonly unsigned int GET_CACHE_NO_CHECK + cpdef readonly unsigned int GET_CACHE_NO_WAIT + cpdef readonly unsigned int GET_CACHE_NOW + cpdef readonly unsigned int GET_CACHE_WAIT + + # ChannelGetActionWhenMonitorPolicyKind: + cpdef readonly unsigned int GET_FROM_CACHE + cpdef readonly unsigned int GET_FROM_IOC + + # ChannelRequestDataTypePolicyKind: + cpdef readonly unsigned int NATIVE_DATATYPE + # The smaller in byte size of type requested and native datatype + cpdef readonly unsigned int LOWEST_DATATYPE + + # ChannelWaitForResponsePolicyKind: + cpdef readonly unsigned int BLOCKING + cpdef readonly unsigned int WAIT + cpdef readonly unsigned int NON_BLOCKING + cpdef readonly unsigned int NO_WAIT + + # StatusMessageKind: + cpdef readonly unsigned int NO_MESSAGE + cpdef readonly unsigned int PRE_REQUEST + cpdef readonly unsigned int FROM_REQUEST + cpdef readonly unsigned int FROM_PEND + cpdef readonly unsigned int FROM_CALLBACK + cpdef readonly unsigned int FROM_MESSAGE + + # CallbackProgressKind: + cpdef readonly unsigned int NOT_INITIATED + cpdef readonly unsigned int PENDING + cpdef readonly unsigned int COMPLETE + + # deines.h: + cpdef readonly double DEFAULT_TIMEOUT_PEND_EVENT + cpdef readonly double DEFAULT_TIMEOUT_PEND_IO + + cpdef readonly string INVALID_ENUM_RETURN_STRING + cpdef readonly short INVALID_ENUM_RETURN_VALUE + + cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + + def __cinit__(self): + + #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + self.CY_ECA_NORMAL = ECA_NORMAL + self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + self.CY_ECA_TOLARGE = ECA_TOLARGE + self.CY_ECA_TIMEOUT = ECA_TIMEOUT + self.CY_ECA_BADTYPE = ECA_BADTYPE + self.CY_ECA_INTERNAL = ECA_INTERNAL + self.CY_ECA_GETFAIL = ECA_GETFAIL + self.CY_ECA_PUTFAIL = ECA_PUTFAIL + self.CY_ECA_BADCOUNT = ECA_BADCOUNT + self.CY_ECA_BADSTR = ECA_BADSTR + self.CY_ECA_DISCONN = ECA_DISCONN + self.CY_ECA_DBLCHNL = ECA_DBLCHNL + self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + self.CY_ECA_BADMONID = ECA_BADMONID + self.CY_ECA_BADMASK = ECA_BADMASK + self.CY_ECA_IODONE = ECA_IODONE + self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + self.CY_ECA_NORDACCESS = ECA_NORDACCESS + self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + self.CY_ECA_NOCONVERT = ECA_NOCONVERT + self.CY_ECA_BADCHID = ECA_BADCHID + self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + self.CY_ECA_ISATTACHED = ECA_ISATTACHED + self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + + self.ICAFE_NORMAL = ICAFE_NORMAL + self.ICAFE_SUCCESS = ICAFE_SUCCESS + + self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + self.ICAFE_CS_CONN = ICAFE_CS_CONN + self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + + self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + + self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + + self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + + self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + + self.ECAFE_NODATA = ECAFE_NODATA + self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + self.ECAFE_BADSTR = ECAFE_BADSTR + self.ECAFE_BADTYPE = ECAFE_BADTYPE + self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + self.ECAFE_NULLCHID = ECAFE_NULLCHID + self.ECAFE_NULLEVID = ECAFE_NULLEVID + self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + + self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + + self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + + self.ERRNO_EINTR = ERRNO_EINTR + self.ERRNO_EAGAIN = ERRNO_EAGAIN + self.ERRNO_EFAULT = ERRNO_EFAULT + self.ERRNO_EINVAL = ERRNO_EINVAL + self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + + self.SEV_NO_ALARM = SEV_NO_ALARM + self.SEV_MINOR = SEV_MINOR + self.SEV_MAJOR = SEV_MAJOR + self.SEV_INVALID = SEV_INVALID + + self.STAT_NO_ALARM = STAT_NO_ALARM + self.STAT_READ = STAT_READ + self.STAT_WRITE = STAT_WRITE + self.STAT_HIHI = STAT_HIHI + self.STAT_HIGH = STAT_HIGH + self.STAT_LOLO = STAT_LOLO + self.STAT_LOW = STAT_LOW + self.STAT_STATE = STAT_STATE + self.STAT_COS = STAT_COS + self.STAT_COMM = STAT_COMM + self.STAT_TIMEOUT = STAT_TIMEOUT + self.STAT_HWLIMIT = STAT_HWLIMIT + self.STAT_CALC = STAT_CALC + self.STAT_SCAN = STAT_SCAN + self.STAT_LINK = STAT_LINK + self.STAT_SOFT = STAT_SOFT + self.STAT_BAD_SUB = STAT_BAD_SUB + self.STAT_UDF = STAT_UDF + self.STAT_DISABLE = STAT_DISABLE + self.STAT_SIMM = STAT_SIMM + self.STAT_READ_ACCESS = STAT_READ_ACCESS + self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + + self.CY_DBE_VALUE = DBE_VALUE + self.CY_DBE_LOG = DBE_LOG + self.CY_DBE_ARCHIVE = DBE_ARCHIVE + self.CY_DBE_ALARM = DBE_ALARM + self.CY_DBE_PROPERTY = DBE_PROPERTY + self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + self.CY_DBR_PLAIN = DBR_PLAIN + self.CY_DBR_STS = DBR_STS + self.CY_DBR_TIME = DBR_TIME + self.CY_DBR_GR = DBR_GR + self.CY_DBR_CTRL = DBR_CTRL + # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + self.CY_DBR_PUT = DBR_PUT + self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + self.CY_DBR_NONE = DBR_NONE + self.CY_DBR_STRING = DBR_STRING + self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + self.CY_DBR_INT = DBR_INT # returns an unsigned short + self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + # returns a string status structure (dbr_sts_string) + self.CY_DBR_STS_STRING = DBR_STS_STRING + # returns a short status structure (dbr_sts_short) + self.CY_DBR_STS_SHORT = DBR_STS_SHORT + # returns a short status structure (dbr_sts_int) + self.CY_DBR_STS_INT = DBR_STS_INT + # returns a float status structure (dbr_sts_float) + self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + # returns an enum status structure (dbr_sts_enum) + self.CY_DBR_STS_ENUM = DBR_STS_ENUM + # returns a char status structure (dbr_sts_char) + self.CY_DBR_STS_CHAR = DBR_STS_CHAR + # returns a long status structure (dbr_sts_long) + self.CY_DBR_STS_LONG = DBR_STS_LONG + # returns a double status structure (dbr_sts_double) + self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + # returns a string time structure (dbr_time_string) + self.CY_DBR_TIME_STRING = DBR_TIME_STRING + # returns a short time structure (dbr_time_short) + self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + # returns a short time structure (dbr_time_short) + self.CY_DBR_TIME_INT = DBR_TIME_INT + # returns a float time structure (dbr_time_float) + self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + # returns an enum time structure (dbr_time_enum) + self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + # returns a char time structure (dbr_time_char) + self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + # returns a long time structure (dbr_time_long) + self.CY_DBR_TIME_LONG = DBR_TIME_LONG + # returns a double time structure (dbr_time_double) + self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + # returns a graphic string structure (dbr_gr_string) + self.CY_DBR_GR_STRING = DBR_GR_STRING + # returns a graphic short structure (dbr_gr_short) + self.CY_DBR_GR_SHORT = DBR_GR_SHORT + # returns a graphic short structure (dbr_gr_int) + self.CY_DBR_GR_INT = DBR_GR_INT + # returns a graphic float structure (dbr_gr_float) + self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + # returns a graphic enum structure (dbr_gr_enum) + self.CY_DBR_GR_ENUM = DBR_GR_ENUM + # returns a graphic char structure (dbr_gr_char) + self.CY_DBR_GR_CHAR = DBR_GR_CHAR + # returns a graphic long structure (dbr_gr_long) + self.CY_DBR_GR_LONG = DBR_GR_LONG + # returns a graphic double structure (dbr_gr_double) + self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + # returns a control string structure (dbr_ctrl_int) + self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + # returns a control short structure (dbr_ctrl_short) + self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + # returns a control short structure (dbr_ctrl_int) + self.CY_DBR_CTRL_INT = DBR_CTRL_INT + # returns a control float structure (dbr_ctrl_float) + self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + # returns a control enum structure (dbr_ctrl_enum) + self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + # returns a control char structure (dbr_ctrl_char) + self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + # returns a control long structure (dbr_ctrl_long) + self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + # returns a control double structure (dbr_ctrl_double) + self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE + + # ctypedef enum ChannelRequestPolicyKind: + self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + + # ChannelFlushSendBufferPolicyKind: + self.WITH_FLUSH_IO = WITH_FLUSH_IO + self.WITH_PEND_IO = WITH_PEND_IO + self.WITH_PEND_EVENT = WITH_PEND_EVENT + self.WITH_POLL = WITH_POLL + + # ChannelWhenToFlushSendBufferPolicyKind: + self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + self.FLUSH_NOW = FLUSH_NOW + self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + + # ChannelGetCacheWaitPolicyKind: + self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + self.GET_CACHE_NOW = GET_CACHE_NOW + self.GET_CACHE_WAIT = GET_CACHE_WAIT + + # ChannelGetActionWhenMonitorPolicyKind: + self.GET_FROM_CACHE = GET_FROM_CACHE + self.GET_FROM_IOC = GET_FROM_IOC + + # ChannelRequestDataTypePolicyKind: + self.NATIVE_DATATYPE = NATIVE_DATATYPE + # The smaller in byte size of type requested and native datatype + self.LOWEST_DATATYPE = LOWEST_DATATYPE + + # ChannelWaitForResponsePolicyKind: + self.BLOCKING = BLOCKING + self.WAIT = WAIT + self.NON_BLOCKING = NON_BLOCKING + self.NO_WAIT = NO_WAIT + + # StatusMessageKind: + self.NO_MESSAGE = NO_MESSAGE + self.PRE_REQUEST = PRE_REQUEST + self.FROM_REQUEST = FROM_REQUEST + self.FROM_PEND = FROM_PEND + self.FROM_CALLBACK = FROM_CALLBACK + self.FROM_MESSAGE = FROM_MESSAGE + + # CallbackProgressKind: + self.NOT_INITIATED = NOT_INITIATED + self.PENDING = PENDING + self.COMPLETE = COMPLETE + + # deines.h: + self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT + self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS - #ChannelRequestDataTypePolicyKind: - cpdef readonly unsigned int NATIVE_DATATYPE - cpdef readonly unsigned int LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype +cdef class channelInfo: + cdef readonly long channelID + cdef readonly bint connectFlag + cdef readonly string hostName + cdef readonly unsigned int nelem # native + cdef readonly int dataType # native + cdef readonly string dataTypeAsString # native + cdef readonly unsigned short accessRead # 0 or 1 + cdef readonly unsigned short accessWrite # 0 or 1 + cdef readonly string className # dbr_class_name_t + cdef readonly int connectionState # as given by CA_OP_ + cdef readonly int cafeConnectionState # as given by cafe_cs_state + cdef readonly string connectionStateAsString # as given by CA_OP_ + # as given by cafe_cs_state + cdef readonly string cafeConnectionStateAsString + cdef CAFEDataTypeCode cdt + cdef CAFEStatusCode csc + cdef CAOPCodes caop - #ChannelWaitForResponsePolicyKind: - cpdef readonly unsigned int BLOCKING - cpdef readonly unsigned int WAIT - cpdef readonly unsigned int NON_BLOCKING - cpdef readonly unsigned int NO_WAIT - - #StatusMessageKind: - cpdef readonly unsigned int NO_MESSAGE - cpdef readonly unsigned int PRE_REQUEST - cpdef readonly unsigned int FROM_REQUEST - cpdef readonly unsigned int FROM_PEND - cpdef readonly unsigned int FROM_CALLBACK - cpdef readonly unsigned int FROM_MESSAGE - - #CallbackProgressKind: - cpdef readonly unsigned int NOT_INITIATED - cpdef readonly unsigned int PENDING - cpdef readonly unsigned int COMPLETE - - #deines.h: - cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK - cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS - - - def __cinit__(self): - - #self.CY_ECA_TIMEOUT =ECA_TIMEOUT - self.CY_ECA_NORMAL =ECA_NORMAL - self.CY_ECA_ALLOCMEM =ECA_ALLOCMEM - self.CY_ECA_TOLARGE =ECA_TOLARGE - self.CY_ECA_TIMEOUT =ECA_TIMEOUT - self.CY_ECA_BADTYPE =ECA_BADTYPE - self.CY_ECA_INTERNAL =ECA_INTERNAL - self.CY_ECA_GETFAIL =ECA_GETFAIL - self.CY_ECA_PUTFAIL =ECA_PUTFAIL - self.CY_ECA_BADCOUNT =ECA_BADCOUNT - self.CY_ECA_BADSTR =ECA_BADSTR - self.CY_ECA_DISCONN =ECA_DISCONN - self.CY_ECA_DBLCHNL =ECA_DBLCHNL - self.CY_ECA_EVDISALLOW =ECA_EVDISALLOW - self.CY_ECA_BADMONID =ECA_BADMONID - self.CY_ECA_BADMASK =ECA_BADMASK - self.CY_ECA_IODONE =ECA_IODONE - self.CY_ECA_IOINPROGRESS =ECA_IOINPROGRESS - self.CY_ECA_BADSYNCGRP =ECA_BADSYNCGRP - self.CY_ECA_PUTCBINPROG =ECA_PUTCBINPROG - self.CY_ECA_NORDACCESS =ECA_NORDACCESS - self.CY_ECA_NOWTACCESS =ECA_NOWTACCESS - self.CY_ECA_ANACHRONISM =ECA_ANACHRONISM - self.CY_ECA_NOSEARCHADDR =ECA_NOSEARCHADDR - self.CY_ECA_NOCONVERT =ECA_NOCONVERT - self.CY_ECA_BADCHID =ECA_BADCHID - self.CY_ECA_BADFUNCPTR =ECA_BADFUNCPTR - self.CY_ECA_ISATTACHED =ECA_ISATTACHED - self.CY_ECA_UNAVAILINSERV =ECA_UNAVAILINSERV - self.CY_ECA_CHANDESTROY =ECA_CHANDESTROY - self.CY_ECA_BADPRIORITY =ECA_BADPRIORITY - self.CY_ECA_NOTTHREADED =ECA_NOTTHREADED - self.CY_ECA_16KARRAYCLIENT=ECA_16KARRAYCLIENT - self.CY_ECA_CONNSEQTMO =ECA_CONNSEQTMO - self.CY_ECA_UNRESPTMO =ECA_UNRESPTMO - - - - self.ICAFE_NORMAL =ICAFE_NORMAL - self.ICAFE_SUCCESS =ICAFE_SUCCESS - - self.ICAFE_CS_NEVER_CONN =ICAFE_CS_NEVER_CONN - self.ICAFE_CS_PREV_CONN =ICAFE_CS_PREV_CONN - self.ICAFE_CS_CONN =ICAFE_CS_CONN - self.ICAFE_CS_CLOSED =ICAFE_CS_CLOSED - self.ICAFE_CS_DISCONN =ICAFE_CS_DISCONN - self.ICAFE_CS_UNKNOWN =ICAFE_CS_UNKNOWN - - self.ICAFE_TYPENOTCONN =ICAFE_TYPENOTCONN - self.ICAFE_RULE_FALSE =ICAFE_RULE_FALSE - self.ICAFE_BADCOUNT =ICAFE_BADCOUNT - self.ICAFE_CALLBACK_NOT_YET_INVOKED =ICAFE_CALLBACK_NOT_YET_INVOKED - self.ICAFE_WAITING_FOR_PREV_CALLBACK =ICAFE_WAITING_FOR_PREV_CALLBACK - self.ICAFE_CACHE_EMPTY =ICAFE_CACHE_EMPTY - self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT=ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT - self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN =ICAFE_MONITOR_DELAYED_AS_CONN_DOWN - self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE =ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE - self.ICAFE_SET_AND_GET_MISMATCH =ICAFE_SET_AND_GET_MISMATCH - - - self.ICAFE_CA_OP_GET =ICAFE_CA_OP_GET - self.ICAFE_CA_OP_PUT =ICAFE_CA_OP_PUT - self.ICAFE_CA_OP_CREATE_CHANNEL =ICAFE_CA_OP_CREATE_CHANNEL - self.ICAFE_CA_OP_ADD_EVENT =ICAFE_CA_OP_ADD_EVENT - self.ICAFE_CA_OP_CLEAR_EVENT =ICAFE_CA_OP_CLEAR_EVENT - self.ICAFE_CA_OP_OTHER =ICAFE_CA_OP_OTHER - self.ICAFE_CA_OP_CONN_DOWN =ICAFE_CA_OP_CONN_DOWN - self.ICAFE_CA_OP_CONN_UP =ICAFE_CA_OP_CONN_UP - - self.ECAFE_LOAD_COLLECTION =ECAFE_LOAD_COLLECTION - self.ECAFE_LOAD_GROUP =ECAFE_LOAD_GROUP - - self.ECAFE_NODATA =ECAFE_NODATA - self.ECAFE_INVALID_TYPE =ECAFE_INVALID_TYPE - self.ECAFE_BADCOUNT =ECAFE_BADCOUNT - self.ECAFE_BADSTR =ECAFE_BADSTR - self.ECAFE_BADTYPE =ECAFE_BADTYPE - self.ECAFE_NO_CONVERT =ECAFE_NO_CONVERT - self.ECAFE_NULLCONTEXT =ECAFE_NULLCONTEXT - self.ECAFE_NULLCHID =ECAFE_NULLCHID - self.ECAFE_NULLEVID =ECAFE_NULLEVID - self.ECAFE_UNKNOWN_COLLECTION =ECAFE_UNKNOWN_COLLECTION - self.ECAFE_EMPTY_COLLECTION =ECAFE_EMPTY_COLLECTION - self.ECAFE_COLLECTION_PREV_DEF =ECAFE_COLLECTION_PREV_DEF - self.ECAFE_COLLECTION_INVALID_MEMBER =ECAFE_COLLECTION_INVALID_MEMBER - self.ECAFE_RULE_FALSE =ECAFE_RULE_FALSE - self.ECAFE_UNKNOWN_GROUP =ECAFE_UNKNOWN_GROUP - self.ECAFE_EMPTY_GROUP =ECAFE_EMPTY_GROUP - self.ECAFE_GROUP_PREV_DEF =ECAFE_GROUP_PREV_DEF - self.ECAFE_INVALID_HANDLE =ECAFE_INVALID_HANDLE - self.ECAFE_INVALID_GROUP_HANDLE =ECAFE_INVALID_GROUP_HANDLE - self.ECAFE_NORDACCESS =ECAFE_NORDACCESS - self.ECAFE_NOWTACCESS =ECAFE_NOWTACCESS - self.ECAFE_TIMEOUT =ECAFE_TIMEOUT - self.ECAFE_CANNOT_OPEN_FILE =ECAFE_CANNOT_OPEN_FILE - self.ECAFE_INVALID_SWITCH_CASE =ECAFE_INVALID_SWITCH_CASE - self.ECAFE_PVALIAS_PREV_DEF =ECAFE_PVALIAS_PREV_DEF - self.ECAFE_PVALIAS_INVALID =ECAFE_PVALIAS_INVALID - self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS =ECAFE_PVNAME_PREV_DEF_AS_PVALIAS - self.ECAFE_DEVICE_ATTRIB_NOT_FOUND =ECAFE_DEVICE_ATTRIB_NOT_FOUND - self.ECAFE_HASH_UNIQUEID_EXISTS =ECAFE_HASH_UNIQUEID_EXISTS - self.ECAFE_WRONG_CA_CONTEXT =ECAFE_WRONG_CA_CONTEXT - self.ECAFE_INVALID_CAFENUM_POLICY_TYPE =ECAFE_INVALID_CAFENUM_POLICY_TYPE - self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED =ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED - self.ECAFE_INVALID_ENUM_INDEX =ECAFE_INVALID_ENUM_INDEX - self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH =ECAFE_PVGROUP_GROUPHANDLE_MISMATCH - self.ECAFE_TIMEOUT_SET_AND_MATCH =ECAFE_TIMEOUT_SET_AND_MATCH - self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH =ECAFE_HANDLE_MISMATCH_SET_AND_MATCH - self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED=ECAFE_INCONSISTENT_CONTAINER_CORRECTED - - self.ECAFE_BPM_DATA_IS_INVALID=ECAFE_BPM_DATA_IS_INVALID - self.ECAFE_BITSHUFF_DECOMPRESS=ECAFE_BITSHUFF_DECOMPRESS - self.ECAFE_BITSHUFF_ALLOCMEM=ECAFE_BITSHUFF_ALLOCMEM - self.ECAFE_BITSHUFF_REALLOCMEM=ECAFE_BITSHUFF_REALLOCMEM - self.ECAFE_BITSHUFF_BADCOUNT=ECAFE_BITSHUFF_BADCOUNT - - self.ECAFE_BSREAD_MULTIPART_MESS_NODATA=ECAFE_BSREAD_MULTIPART_MESS_NODATA - self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER=ECAFE_BSREAD_PARSEFAIL_MAINHEADER - self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER=ECAFE_BSREAD_PARSEFAIL_DATAHEADER - self.ECAFE_BSREAD_ZMQSTREAM_NULL=ECAFE_BSREAD_ZMQSTREAM_NULL - - self.ERRNO_EINTR=ERRNO_EINTR - self.ERRNO_EAGAIN=ERRNO_EAGAIN - self.ERRNO_EFAULT=ERRNO_EFAULT - self.ERRNO_EINVAL=ERRNO_EINVAL - self.ERRNO_ENOTSOCK=ERRNO_ENOTSOCK - self.ERRNO_EPROTONOSUPPORT=ERRNO_EPROTONOSUPPORT - - - self.SEV_NO_ALARM=SEV_NO_ALARM - self.SEV_MINOR =SEV_MINOR - self.SEV_MAJOR =SEV_MAJOR - self.SEV_INVALID =SEV_INVALID - - - self.STAT_NO_ALARM = STAT_NO_ALARM - self.STAT_READ = STAT_READ - self.STAT_WRITE = STAT_WRITE - self.STAT_HIHI = STAT_HIHI - self.STAT_HIGH = STAT_HIGH - self.STAT_LOLO = STAT_LOLO - self.STAT_LOW = STAT_LOW - self.STAT_STATE = STAT_STATE - self.STAT_COS = STAT_COS - self.STAT_COMM = STAT_COMM - self.STAT_TIMEOUT=STAT_TIMEOUT - self.STAT_HWLIMIT=STAT_HWLIMIT - self.STAT_CALC = STAT_CALC - self.STAT_SCAN = STAT_SCAN - self.STAT_LINK = STAT_LINK - self.STAT_SOFT = STAT_SOFT - self.STAT_BAD_SUB=STAT_BAD_SUB - self.STAT_UDF =STAT_UDF - self.STAT_DISABLE=STAT_DISABLE - self.STAT_SIMM =STAT_SIMM - self.STAT_READ_ACCESS =STAT_READ_ACCESS - self.STAT_WRITE_ACCESS=STAT_WRITE_ACCESS - - - self.CY_DBE_VALUE =DBE_VALUE - self.CY_DBE_LOG =DBE_LOG - self.CY_DBE_ARCHIVE =DBE_ARCHIVE - self.CY_DBE_ALARM =DBE_ALARM - self.CY_DBE_PROPERTY =DBE_PROPERTY - self.CY_DBR_PRIMITIVE =DBR_PRIMITIVE - self.CY_DBR_PLAIN =DBR_PLAIN - self.CY_DBR_STS =DBR_STS - self.CY_DBR_TIME =DBR_TIME - self.CY_DBR_GR =DBR_GR - self.CY_DBR_CTRL =DBR_CTRL - self.CY_DBR_PUT =DBR_PUT # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. - self.CY_DBR_STSACK =DBR_STSACK # is DBR_STSACK_STRING - self.CY_DBR_CLASS =DBR_CLASS # is DBR_CLASS_NAME, - self.CY_DBR_NONE =DBR_NONE - self.CY_DBR_STRING =DBR_STRING - self.CY_DBR_SHORT =DBR_SHORT #returns an unsigned short - self.CY_DBR_INT =DBR_INT #returns an unsigned short - self.CY_DBR_FLOAT =DBR_FLOAT #returns an IEEE floating point value - self.CY_DBR_ENUM =DBR_ENUM #returns an unsigned short which is the enum item - self.CY_DBR_CHAR =DBR_CHAR #returns an unsigned char - self.CY_DBR_LONG =DBR_LONG #returns an unsigned long - self.CY_DBR_DOUBLE =DBR_DOUBLE #returns a double precision floating point number - self.CY_DBR_STS_STRING=DBR_STS_STRING #returns a string status structure (dbr_sts_string) - self.CY_DBR_STS_SHORT =DBR_STS_SHORT #returns a short status structure (dbr_sts_short) - self.CY_DBR_STS_INT =DBR_STS_INT #returns a short status structure (dbr_sts_int) - self.CY_DBR_STS_FLOAT =DBR_STS_FLOAT #returns a float status structure (dbr_sts_float) - self.CY_DBR_STS_ENUM =DBR_STS_ENUM #returns an enum status structure (dbr_sts_enum) - self.CY_DBR_STS_CHAR =DBR_STS_CHAR #returns a char status structure (dbr_sts_char) - self.CY_DBR_STS_LONG =DBR_STS_LONG #returns a long status structure (dbr_sts_long) - self.CY_DBR_STS_DOUBLE=DBR_STS_DOUBLE #returns a double status structure (dbr_sts_double) - self.CY_DBR_TIME_STRING=DBR_TIME_STRING #returns a string time structure (dbr_time_string) - self.CY_DBR_TIME_SHORT =DBR_TIME_SHORT #returns a short time structure (dbr_time_short) - self.CY_DBR_TIME_INT =DBR_TIME_INT #returns a short time structure (dbr_time_short) - self.CY_DBR_TIME_FLOAT =DBR_TIME_FLOAT #returns a float time structure (dbr_time_float) - self.CY_DBR_TIME_ENUM =DBR_TIME_ENUM #returns an enum time structure (dbr_time_enum) - self.CY_DBR_TIME_CHAR =DBR_TIME_CHAR #returns a char time structure (dbr_time_char) - self.CY_DBR_TIME_LONG =DBR_TIME_LONG #returns a long time structure (dbr_time_long) - self.CY_DBR_TIME_DOUBLE=DBR_TIME_DOUBLE #returns a double time structure (dbr_time_double) - self.CY_DBR_GR_STRING =DBR_GR_STRING #returns a graphic string structure (dbr_gr_string) - self.CY_DBR_GR_SHORT =DBR_GR_SHORT #returns a graphic short structure (dbr_gr_short) - self.CY_DBR_GR_INT =DBR_GR_INT #returns a graphic short structure (dbr_gr_int) - self.CY_DBR_GR_FLOAT =DBR_GR_FLOAT #returns a graphic float structure (dbr_gr_float) - self.CY_DBR_GR_ENUM =DBR_GR_ENUM #returns a graphic enum structure (dbr_gr_enum) - self.CY_DBR_GR_CHAR =DBR_GR_CHAR #returns a graphic char structure (dbr_gr_char) - self.CY_DBR_GR_LONG =DBR_GR_LONG #returns a graphic long structure (dbr_gr_long) - self.CY_DBR_GR_DOUBLE =DBR_GR_DOUBLE #returns a graphic double structure (dbr_gr_double) - self.CY_DBR_CTRL_STRING=DBR_CTRL_STRING #returns a control string structure (dbr_ctrl_int) - self.CY_DBR_CTRL_SHORT =DBR_CTRL_SHORT #returns a control short structure (dbr_ctrl_short) - self.CY_DBR_CTRL_INT =DBR_CTRL_INT #returns a control short structure (dbr_ctrl_int) - self.CY_DBR_CTRL_FLOAT =DBR_CTRL_FLOAT #returns a control float structure (dbr_ctrl_float) - self.CY_DBR_CTRL_ENUM =DBR_CTRL_ENUM #returns a control enum structure (dbr_ctrl_enum) - self.CY_DBR_CTRL_CHAR =DBR_CTRL_CHAR #returns a control char structure (dbr_ctrl_char) - self.CY_DBR_CTRL_LONG =DBR_CTRL_LONG #returns a control long structure (dbr_ctrl_long) - self.CY_DBR_CTRL_DOUBLE=DBR_CTRL_DOUBLE #returns a control double structure (dbr_ctrl_double) - - #ctypedef enum ChannelRequestPolicyKind: - self.WITHOUT_CALLBACK = WITHOUT_CALLBACK - self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT - self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED - - #ChannelFlushSendBufferPolicyKind: - self.WITH_FLUSH_IO = WITH_FLUSH_IO - self.WITH_PEND_IO = WITH_PEND_IO - self.WITH_PEND_EVENT = WITH_PEND_EVENT - self.WITH_POLL = WITH_POLL - - #ChannelWhenToFlushSendBufferPolicyKind: - self.FLUSH_AUTOMATIC =FLUSH_AUTOMATIC - self.FLUSH_NOW =FLUSH_NOW - self.FLUSH_AFTER_EACH_CHANNEL_CREATION =FLUSH_AFTER_EACH_CHANNEL_CREATION - self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION=FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION - self.FLUSH_AFTER_EACH_MESSAGE =FLUSH_AFTER_EACH_MESSAGE - self.FLUSH_AFTER_EACH_GROUP_CREATION =FLUSH_AFTER_EACH_GROUP_CREATION - self.FLUSH_DESIGNATED_TO_CLIENT =FLUSH_DESIGNATED_TO_CLIENT - - #ChannelGetCacheWaitPolicyKind: - self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK - self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT - self.GET_CACHE_NOW = GET_CACHE_NOW - self.GET_CACHE_WAIT = GET_CACHE_WAIT - - #ChannelGetActionWhenMonitorPolicyKind: - self.GET_FROM_CACHE = GET_FROM_CACHE - self.GET_FROM_IOC = GET_FROM_IOC - - - #ChannelRequestDataTypePolicyKind: - self.NATIVE_DATATYPE = NATIVE_DATATYPE - self.LOWEST_DATATYPE = LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype - - #ChannelWaitForResponsePolicyKind: - self.BLOCKING =BLOCKING - self.WAIT =WAIT - self.NON_BLOCKING =NON_BLOCKING - self.NO_WAIT =NO_WAIT - - #StatusMessageKind: - self.NO_MESSAGE =NO_MESSAGE - self.PRE_REQUEST =PRE_REQUEST - self.FROM_REQUEST =FROM_REQUEST - self.FROM_PEND =FROM_PEND - self.FROM_CALLBACK=FROM_CALLBACK - self.FROM_MESSAGE =FROM_MESSAGE - - #CallbackProgressKind: - self.NOT_INITIATED=NOT_INITIATED - self.PENDING =PENDING - self.COMPLETE =COMPLETE - - #deines.h: - self.BSREAD_ZEROMQ_HIGH_WATER_MARK =BSREAD_ZEROMQ_HIGH_WATER_MARK - self.BSREAD_ZEROMQ_TIMEOUT_MS =BSREAD_ZEROMQ_TIMEOUT_MS - return - - - -cdef class channelInfo: - cdef readonly long channelID - cdef readonly bint connectFlag - cdef readonly string hostName - cdef readonly unsigned int nelem #native - cdef readonly int dataType #native - cdef readonly string dataTypeAsString #native - cdef readonly unsigned short accessRead #0 or 1 - cdef readonly unsigned short accessWrite #0 or 1 - cdef readonly string className #dbr_class_name_t - cdef readonly int connectionState #as given by CA_OP_ - cdef readonly int cafeConnectionState #as given by cafe_cs_state - cdef readonly string connectionStateAsString #as given by CA_OP_ - cdef readonly string cafeConnectionStateAsString #as given by cafe_cs_state - cdef CAFEDataTypeCode cdt - cdef CAFEStatusCode csc - cdef CAOPCodes caop - - def __cinit__(self): - self.channelID=0 - self.connectFlag=False - self.hostName=(("")).encode('UTF-8') - self.nelem=0 - self.dataType=ICAFE_TYPENOTCONN - self.dataTypeAsString=(("ICAFE_TYPENOTCONN")).encode('UTF-8') - self.accessRead=0 - self.accessWrite=0 - self.className=(("")).encode('UTF-8') - self.connectionState=ICAFE_CA_OP_CONN_DOWN - self.cafeConnectionState=ICAFE_CS_NEVER_CONN - self.connectionStateAsString=(('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') - self.cafeConnectionStateAsString=(('ICAFE_CS_NEVER_CONN')).encode('UTF-8') - - def show(self): - print ("channelID = %s" % hex(self.channelID)) - print ("connectFlag = %d" % self.connectFlag) - print ("hostName = %s" % self.hostName) - print ("nelem = %d" % self.nelem) - print ("dataType = %s (%d)" % (self.cdt.message(self.dataType), self.dataType)) - print ("accessRead = %d" % self.accessRead) - print ("accessWrite = %d" % self.accessWrite) - print ("className = %s" % self.className) - #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) - #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) - print ("connectionState = %s (%d)" % (self.caop.message(self.connectionState),self.connectionState)) - print ("cafeConnectionState = %s (%d)" % (self.csc.message(self.cafeConnectionState),self.cafeConnectionState)) - return + def __cinit__(self): + self.channelID = 0 + self.connectFlag = False + self.hostName = (< bytes > ("")).encode('UTF-8') + self.nelem = 0 + self.dataType = ICAFE_TYPENOTCONN + self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + self.accessRead = 0 + self.accessWrite = 0 + self.className = (< bytes > ("")).encode('UTF-8') + self.connectionState = ICAFE_CA_OP_CONN_DOWN + self.cafeConnectionState = ICAFE_CS_NEVER_CONN + self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + def show(self): + print("channelID = %s" % hex(self.channelID)) + print("connectFlag = %d" % self.connectFlag) + print("hostName = %s" % self.hostName) + print("nelem = %d" % self.nelem) + print("dataType = %s (%d)" % + (self.cdt.message(self.dataType), self.dataType)) + print("accessRead = %d" % self.accessRead) + print("accessWrite = %d" % self.accessWrite) + print("className = %s" % self.className) + #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + print("connectionState = %s (%d)" % + (self.caop.message(self.connectionState), self.connectionState)) + print("cafeConnectionState = %s (%d)" % (self.csc.message( + self.cafeConnectionState), self.cafeConnectionState)) + return ################################################################################## +''' cdef class _epicsTimeStampAsDate: - cdef epicsTime *_time + cdef epicsTime * _time cdef local_tm_nano_sec local cdef list etsDate def __cinit__(self, epicsTimeStamp ts): + self._time = new epicsTime(ts) #This gives warning: dereferencing type-punned pointer will break strict-aliasing rules - self.local = (self._time) + self.local = self._time + ##April 2020 to avoid above warning + ##cdef local_tm_nano_sec * _local = malloc(sizeof(epicsTime)) + ##_local = self._time + ##self.local = _local[0] # self._time - #print ("ts====== ", ts.secPastEpoch, ts.nsec) - #print ("year=== ", ( ( (&(&self.local).ansi_tm).tm_year) + 1900)) + print ("ts===== ", ts.secPastEpoch, ts.nsec) + print ("year=== ", ( ( (&(&self.local).ansi_tm).tm_year) + 1900)) self.etsDate=[] self.etsDate.append( (self.local.ansi_tm.tm_year + 1900)) @@ -838,676 +741,1119 @@ cdef class _epicsTimeStampAsDate: self.etsDate.append( self.local.ansi_tm.tm_sec) self.etsDate.append( ts.nsec) self.etsDate.append( self.local.nSec) + del self._time + ###free(_local) def get(self): return self.etsDate - - +''' + ################################################################################## - + ################################################################################## cdef class pvctrl: - cdef readonly unsigned int nelem - cdef readonly int alarmStatus - cdef readonly int alarmSeverity - cdef readonly unsigned short precision - cdef readonly string units - cdef readonly unsigned short noEnumStrings - cdef readonly list enumStrings - cdef readonly upperDisplayLimit - cdef readonly lowerDisplayLimit - cdef readonly upperAlarmLimit - cdef readonly upperWarningLimit - cdef readonly lowerWarningLimit - cdef readonly lowerAlarmLimit - cdef readonly upperControlLimit - cdef readonly lowerControlLimit - cdef readonly list value - cdef readonly int status - cdef readonly tuple pythonVersion - - - def __cinit__(self): - self.nelem= 1 - self.alarmStatus=-1 - self.alarmSeverity=-1 - self.precision=0 - self.units=(("")).encode('UTF-8') - self.noEnumStrings=0 - self.enumStrings=[] - self.upperDisplayLimit=0 - self.lowerDisplayLimit=0 - self.upperAlarmLimit=0 - self.lowerAlarmLimit=0 - self.upperControlLimit=0 - self.lowerControlLimit=0 - self.value=[] - self.status=1 - self.pythonVersion=sys.version_info[0:4] - - def show(self): - self.showPrint(self.nelem) - return - - def showMax(self, nelem): - if nelem > self.nelem: - #print ("----------------------" - #print ("Note: Max. Nelem =", self.nelem - #print ("----------------------" - nelem=self.nelem - self.showPrint(nelem) - return + cdef readonly unsigned int nelem + cdef readonly int alarmStatus + cdef readonly int alarmSeverity + cdef readonly unsigned short precision + cdef readonly str units + cdef readonly unsigned short noEnumStrings + cdef readonly list enumStrings + cdef readonly upperDisplayLimit + cdef readonly lowerDisplayLimit + cdef readonly upperAlarmLimit + cdef readonly upperWarningLimit + cdef readonly lowerWarningLimit + cdef readonly lowerAlarmLimit + cdef readonly upperControlLimit + cdef readonly lowerControlLimit + cdef readonly list value + cdef readonly int status + + def __cinit__(self): + self.nelem = 1 + self.alarmStatus = -1 + self.alarmSeverity = -1 + self.precision = 0 + self.units = str("") #(< bytes > ("")).encode('UTF-8') + self.noEnumStrings = 0 + self.enumStrings = [] + self.upperDisplayLimit = 0 + self.lowerDisplayLimit = 0 + self.upperAlarmLimit = 0 + self.lowerAlarmLimit = 0 + self.upperControlLimit = 0 + self.lowerControlLimit = 0 + self.value = [] + self.status = 1 + - - cdef showPrint(self, nelem): - cdef unsigned int i - #is self.value[0] a list - if nelem==1: - if isinstance (self.value[0], list): - if self.pythonVersion[0] < 3: - print ("value =", self.value[0][0] ) - - else: - print ("value = ", self.value[0][0], end="" ) - else: - if self.pythonVersion[0] < 3: - print ("value =", self.value[0] ) - - else: - print ("value =", self.value[0] , end="" ) - else: - print ("value = ", end="") - if self.pythonVersion[0] < 3: - if isinstance (self.value[0], list): - for i in range(0, nelem): - print (self.value[0][i],"[%d]" %i ) - else: - for i in range(0, nelem): - print (self.value[i],"[%d]" %i ) - - else: - if isinstance (self.value[0], list): - for i in range(0, nelem): - print (self.value[0][i],"[%d]" %i, end=" ") - else: - for i in range(0, nelem): - print (self.value[i],"[%d]" %i, end=" ") - - print ("") - print ("status = %d" % self.status) - print ("alarmStatus = %d" % self.alarmStatus) - print ("alarmSeverity = %d" % self.alarmSeverity) - print ("precision = %d" % self.precision) - print ("units = %s" % self.units) - print ("noEnumStrings = %d" % self.noEnumStrings) - - if self.noEnumStrings > 0: - print ("enumStrings =",) - for i in range(0, self.noEnumStrings): - print (self.enumStrings[i],"[%s]" %i,) - print ("") - - print ("upperDisplayLimit = %f" % self.upperDisplayLimit) - print ("lowerDisplayLimit = %f" % self.lowerDisplayLimit) - print ("upperAlarmLimit = %f" % self.upperAlarmLimit) - print ("lowerAlarmLimit = %f" % self.lowerAlarmLimit) - print ("upperWarningLimit = %f" % self.upperWarningLimit) - print ("lowerWarningLimit = %f" % self.lowerWarningLimit) - print ("upperControlLimit = %f" % self.upperControlLimit) - print ("lowerControlLimit = %f" % self.lowerControlLimit) - - return + def show(self): + self.showPrint(self.nelem) + return + + def showMax(self, nelem): + if nelem > self.nelem: + # print ("----------------------" + # print ("Note: Max. Nelem =", self.nelem + # print ("----------------------" + nelem = self.nelem + self.showPrint(nelem) + return + + cdef showPrint(self, nelem): + cdef unsigned int i + # is self.value[0] a list + if nelem == 1: + if isinstance(self.value[0], list): + print("value = ", self.value[0][0], end="") + else: + print("value =", self.value[0], end="" ) + else: + print("value = ", end="") + + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i, end=" ") + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i, end=" ") + + print("") + print("status = %d" % self.status) + print("alarmStatus = %d" % self.alarmStatus) + print("alarmSeverity = %d" % self.alarmSeverity) + + if self.noEnumStrings > 0: + print("noEnumStrings = %d" % self.noEnumStrings) + print("enumStrings =", end=" ") # end for same line + for i in range(0, self.noEnumStrings): + print(self.enumStrings[i], "[%s]" % i, end=" ") + print("") + else: + print("precision = %d" % self.precision) + print("units = %s" % self.units) + print("upperDisplayLimit = %f" % self.upperDisplayLimit) + print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + print("upperAlarmLimit = %f" % self.upperAlarmLimit) + print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + print("upperWarningLimit = %f" % self.upperWarningLimit) + print("lowerWarningLimit = %f" % self.lowerWarningLimit) + print("upperControlLimit = %f" % self.upperControlLimit) + print("lowerControlLimit = %f" % self.lowerControlLimit) + + ################################################################################## -cdef class CyCafeException: - cdef readonly str type - cdef readonly str source - cdef readonly int handle - cdef readonly str pv - cdef readonly int errorCode - cdef readonly str errorText - cdef readonly str errorInfo - - def __cinit__(self, _type='cycafe', _source=None, _handle=-1, _pv=None, _ec=-1, _et=None, _ei=None): - self.type =_type - self.source=_source - self.handle=_handle - self.pv =_pv - self.errorCode =_ec - self.errorText =_et - self.errorInfo =_ei - - def show(self): - print ("------CyCafeException-----------------------------------------------------") - print ("raised from CyCafe method:",self.source) - if (self.handle!=-1): - print ("name=",self.pv,"(handle=",self.handle,") reports the following error:") - print ("errorCode:",self.errorCode,"errorText:",self.errorText,"\nerrorInfo:",self.errorInfo) - elif self.type=='cafe': - print ("name=",self.pv,"(handle=",self.handle,") reports the following error:") - print ("errorCode:",self.errorCode,"errorText:",self.errorText,"\nerrorInfo:",self.errorInfo) - else: - print ("errorInfo:",self.errorInfo) - print ("------------------------------------------------------------------------") - return - - def reveal(self): - print ("------CyCafeException-----------------------------------------------------") - if(self.type): - print (".type =",self.type) - print (".source =",self.source) - if (self.handle!=-1): - print (".handle =",self.handle) - if (self.pv): - print (".pv =",self.pv) - if (self.errorCode != -1): - print (".errorCode=",self.errorCode) - if (self.errorText): - print (".errorText=",self.errorText) - print (".errorInfo=",self.errorInfo) - print ("------------------------------------------------------------------------") - return - - -cdef class monitorpolicy: - cdef readonly chtype dataType - cdef readonly chtype dbrDataType - cdef readonly DBR_TYPE cafeDbrType - cdef readonly unsigned int nelem - cdef readonly unsigned int mask - #cdef readonly pCallback handler - cdef readonly unsigned int userArgs - #cdef readonly evid eventID - cdef readonly int status - cdef readonly unsigned int monid - cdef readonly bint maskHasDBE_PROPERTY - cdef readonly bint maskHasDBE_VALUE - cdef readonly bint maskHasDBE_LOG - cdef readonly bint maskHasDBE_ALARM - - def __cinit__(self): - self.monid=0 - #self.dataType=None - #self.dbrDataType=None - #self.cafeDbrType=None - self.nelem=1 - #self.mask=None - #self.userArgs=None - self.status=ICAFE_NORMAL - self.maskHasDBE_PROPERTY=False - self.maskHasDBE_VALUE =False - self.maskHasDBE_LOG =False - self.maskHasDBE_ALARM =False - - def show(self): - print("monid =", self.monid) - print("datatype =", self.dataType) - print("dbrDataType=", self.dbrDataType) - print("cafeDbrType=", self.cafeDbrType) - print("nelem =", self.nelem) - print("mask =", self.mask) - print("userArgs =", self.userArgs) - print("status =", self.status) - print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) - print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) - print("maskHasDBE_LOG =", self.maskHasDBE_LOG) - print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) - return - - - -################################################################################## -cdef class pvdata: - cdef readonly unsigned int nelem - cdef readonly int alarmStatus - cdef readonly int alarmSeverity - cdef readonly str alarmStatusAsString - cdef readonly str alarmSeverityAsString - cdef readonly list ts - cdef readonly list tsDate - cdef readonly str tsDateAsString - cdef readonly str bsDateAsString - cdef readonly list value - cdef readonly int status - cdef readonly str statusAsString - cdef readonly unsigned long long pulseID - cdef readonly int dataType - cdef readonly str dataTypeAsString - - cdef readonly tuple pythonVersion +cdef class CafeException(Exception): + cdef readonly str type + cdef readonly str source + cdef readonly unsigned int handle + cdef readonly str name + cdef readonly int error_code + cdef readonly str error_text + cdef readonly str error_info + + #Inheriting from base clas requires __init__; __cinit__ is ignored. + def __init__( + self, _type="CafePVError", _source=None, _handle=0, + _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + self.type = _type + self.source = _source + self.handle = _handle + self.name = _pv_name + self.error_code = _error_code + self.error_text = _error_text + self.error_info = _error_info - def __cinit__(self): - self.nelem= 1 - self.alarmStatus=-1 - self.alarmSeverity=-1 - self.ts=[] - self.tsDate=[] - self.tsDateAsString='' - self.bsDateAsString='' - self.value=[] - self.status=1 - self.statusAsString='ICAFE_NORMAL' - self.pulseID=0 - self.dataType=-1 - self.dataTypeAsString="" - self.pythonVersion=sys.version_info[0:4] + def show(self): + print("------CafeException-----------------------------------------------------") + if self.type is not None: + print(self.type) + print("Exception raised from CyCafe method:", self.source) + + if self.handle != 0: + print("name =", self.name, "( handle =", + self.handle, ") reports the following error:") + if (self.error_code != -1): + print("error_code:", self.error_code, "error_text:", self.error_text) + print("error_info:", self.error_info) + elif self.type == 'CafePVError': + print("name =", self.name, "( handle =", + self.handle, ") reports the following error:") + if self.error_code != -1: + print("error_code:", self.error_code, "error_text:", self.error_text) + print("error_info:", self.error_info) + else: + print("error_info:", self.error_info) + print("------------------------------------------------------------------------") + return - def show(self): - self.showPrint(self.nelem) - return - - def showMax(self, nelem): - if nelem > self.nelem: - #print ("----------------------" - #print ("Note: Max. Nelem =", self.nelem - #print ("----------------------" - nelem=self.nelem - - self.showPrint(nelem) - return - - cdef showPrint(self, nelem): - cdef unsigned int i - #is self.value[0] a list - - if self.pythonVersion[0] < 3: - - if nelem==1: - if isinstance (self.value[0], list): - print ("value =", self.value[0][0], "(",self.dataTypeAsString,")" ) - else: - print ("value =", self.value[0], "(",self.dataTypeAsString,")" ) - else: - print ("value = "), - if isinstance (self.value[0], list): - for i in range(0, nelem): - print (self.value[0][i],"[%d]" %i ) - else: - for i in range(0, nelem): - print (self.value[i],"[%d]" %i ) - - - else: - - if nelem==1: - if isinstance (self.value[0], list): - #print ("value =", self.value[0][0], "(",self.dataTypeAsString,")", end="") - print ("value = {} ({})".format(self.value[0][0], self.dataTypeAsString), end="") - else: - #print ("value =", self.value[0], "(",self.dataTypeAsString,")", end="") - print ("value = {} ({})".format(self.value[0], self.dataTypeAsString), end="") - else: - print ("value = ", end="") - if isinstance (self.value[0], list): - for i in range(0, nelem): - print (self.value[0][i],"[%d]" %i , end=" ") - else: - for i in range(0, nelem): - print (self.value[i],"[%d]" %i , end=" ") - #print("(",self.dataTypeAsString,")" , end=" ") - print( "({0})".format(self.dataTypeAsString)) - - print ("") - #print ("status = %d" % self.status) - print ("status = %d (%s)" % (self.status, self.statusAsString)) - if self.alarmStatus != -1: - print ("alarmStatus = %d (%s)" % (self.alarmStatus, self.alarmStatusAsString) ) - print ("alarmSeverity = %d (%s)" % (self.alarmSeverity, self.alarmSeverityAsString) ) - #if self.ts[0] != 0: - print ("ts =", self.ts[0], self.ts[1]) - print ("tsDate =", self.tsDate[0], self.tsDate[1], \ - self.tsDate[2], self.tsDate[3],\ - self.tsDate[4], self.tsDate[5], self.tsDate[6]) - if self.pulseID > 0: - print ("pulseID =", self.pulseID) - return - -################################################################################## + def reveal(self): + print("------CafeException-----------------------------------------------------") + if self.type is not None: + print(".type =", self.type) + print(".source =", self.source) + if self.handle != 0: + print(".handle =", self.handle) + if self.name is not None: + print(".name =", self.name) + if self.error_code != -1: + print(".error_code =", self.error_code) + if self.error_text is not None: + print(".error_text =", self.error_text) + print(".error_info =", self.error_info) + print("------------------------------------------------------------------------") + return +cdef class monitorpolicy: + cdef readonly chtype dataType + cdef readonly chtype dbrDataType + cdef readonly DBR_TYPE cafeDbrType + cdef readonly unsigned int nelem + cdef readonly unsigned int mask + # cdef readonly pCallback handler + cdef readonly unsigned int userArgs + # cdef readonly evid eventID + cdef readonly int status + cdef readonly unsigned int monid + cdef readonly bint maskHasDBE_PROPERTY + cdef readonly bint maskHasDBE_VALUE + cdef readonly bint maskHasDBE_LOG + cdef readonly bint maskHasDBE_ALARM + + def __cinit__(self): + self.monid = 0 + # self.dataType=None + # self.dbrDataType=None + # self.cafeDbrType=None + self.nelem = 1 + # self.mask=None + # self.userArgs=None + self.status = ICAFE_NORMAL + self.maskHasDBE_PROPERTY = False + self.maskHasDBE_VALUE = False + self.maskHasDBE_LOG = False + self.maskHasDBE_ALARM = False + + def show(self): + print("monid =", self.monid) + print("datatype =", self.dataType) + print("dbrDataType=", self.dbrDataType) + print("cafeDbrType=", self.cafeDbrType) + print("nelem =", self.nelem) + print("mask =", self.mask) + print("userArgs =", < long > self.userArgs) + print("status =", self.status) + print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + return + + +################################################################################## +cdef class pvdata: + cdef readonly unsigned int nelem + cdef readonly int alarmStatus + cdef readonly int alarmSeverity + cdef readonly str alarmStatusAsString + cdef readonly str alarmSeverityAsString + cdef readonly list ts + cdef readonly list tsDate + cdef readonly str tsDateAsString + cdef readonly str bsDateAsString + cdef readonly list value + cdef public int status + cdef public str statusAsString + cdef readonly unsigned long long pulseID + cdef readonly int dataType + cdef readonly str dataTypeAsString + + + def __cinit__(self): + self.nelem = 1 + self.alarmStatus = -1 + self.alarmSeverity = -1 + self.ts = [] + self.tsDate = [] + self.tsDateAsString = '' + self.bsDateAsString = '' + self.value = [] + self.status = 1 + self.statusAsString = 'ICAFE_NORMAL' + self.pulseID = 0 + self.dataType = -1 + self.dataTypeAsString = "" + + def show(self): + self.showPrint(self.nelem) + return + + def showMax(self, nelem): + if nelem > self.nelem: + # print ("----------------------" + # print ("Note: Max. Nelem =", self.nelem + # print ("----------------------" + nelem = self.nelem + + self.showPrint(nelem) + return + + cdef showPrint(self, nelem): + cdef unsigned int i + # is self.value[0] a list + + if nelem == 1: + if isinstance(self.value[0], list): + print("value = {} ({})".format( + self.value[0][0], self.dataTypeAsString), end="") + else: + print("value = {} ({})".format( + self.value[0], self.dataTypeAsString), end="") + print("") + else: + print("value = ", end="") + + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i, end=" ") + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i, end=" ") + print("({0})".format(self.dataTypeAsString)) + + + print("status = %d (%s)" % (self.status, self.statusAsString)) + if self.alarmStatus != -1: + print("alarmStatus = %d (%s)" % + (self.alarmStatus, self.alarmStatusAsString)) + print("alarmSeverity = %d (%s)" % + (self.alarmSeverity, self.alarmSeverityAsString)) + print("ts =", self.ts[0], self.ts[1]) + print("tsDate =", self.tsDate[0], self.tsDate[1], + self.tsDate[2], self.tsDate[3], + self.tsDate[4], self.tsDate[5], self.tsDate[6]) + if self.pulseID > 0: + print("pulseID =", self.pulseID) + return + +################################################################################## + - ################################################################################## cdef class pvgroup: - cdef public list pvdata - cdef public unsigned int npv - cdef public string name - cdef readonly int groupStatus - cdef public unsigned int groupHandle - cpdef public bint rule - cpdef public bint hasAlarm - cpdef public bint hasTS - - cdef tuple pythonVersion - - def __cinit__(self): - self.groupStatus=ICAFE_NORMAL - self.rule=True - self.hasAlarm=True - self.hasTS=True - self.pythonVersion=sys.version_info[0:4] - return + cdef public list pvdata + cdef public unsigned int npv + cdef public string name + cdef readonly int groupStatus + cdef public unsigned int groupHandle + cpdef public bint rule + cpdef public bint hasAlarm + cpdef public bint hasTS - def show(self): - self.showPrint(npv=self.npv, grouplist=None) - return + def __cinit__(self): + self.groupStatus = ICAFE_NORMAL + self.rule = True + self.hasAlarm = True + self.hasTS = True + + return - def showWithPV(self,glist): - if len(glist) != self.npv: - print ("ERROR: GROUP MEMBER MISMATCH!!") - print (glist, "has", len(glist), "members while group has", self.npv,"!!") - return - self.showPrint(self.npv, grouplist=glist) - return + def show(self): + self.showPrint(npv=self.npv, grouplist=None) + return - def showMax(self, _npv): - if _npv > self.npv: - #print ("----------------------" - #print ("Note: Max. Npv =", self.npv - #print ("----------------------" - _npv=self.npv - self.showPrint(npv=_npv, grouplist=None) - return - - cdef showPrint(self, npv, grouplist): - print ("GROUP NAME = ", self.name) - print ("GROUP HANDLE = ", self.groupHandle) - print ("GROUP STATUS = ", self.groupStatus) - cdef unsigned int i,j - #if nelem==1: - # print "value =", self.value[0], - #else: + def showWithPV(self, glist): + if len(glist) != self.npv: + print("ERROR: GROUP MEMBER MISMATCH!!") + print(glist, "has", len(glist), + "members while group has", self.npv, "!!") + return + self.showPrint(self.npv, grouplist=glist) + return - for i in range(0, npv): - print ("Member: ", i, "---------------------------------") - if grouplist: - print ("PV =", grouplist[i]) + def showMax(self, _npv): + if _npv > self.npv: + # print ("----------------------" + # print ("Note: Max. Npv =", self.npv + # print ("----------------------" + _npv = self.npv + self.showPrint(npv=_npv, grouplist=None) + return - if self.pythonVersion[0] < 3: - print ("value = " ) - for j in range(0, len(self.pvdata[i].value)): - print (self.pvdata[i].value[j],"[%d]"%j ) - - else: - - print ("value = " ,end="") - for j in range(0, len(self.pvdata[i].value)): - print (self.pvdata[i].value[j],"[%d]"%j, end=" ") + cdef showPrint(self, npv, grouplist): + print("GROUP NAME = ", self.name) + print("GROUP HANDLE = ", self.groupHandle) + print("GROUP STATUS = ", self.groupStatus) + print("No. Members = ", self.npv) + cdef unsigned int i, j + + for i in range(0, npv): + print("Member: ", i, "---------------------------------") + if grouplist: + print("PV =", grouplist[i]) - print ("") - print ("status = %d (%s)" % (self.pvdata[i].status, self.pvdata[i].statusAsString)) - print ("alarmStatus = %d (%s)" % (self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString) ) - print ("alarmSeverity = %d (%s)" % (self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString) ) - print ("ts =", self.pvdata[i].ts[0], self.pvdata[i].ts[1]) - print ("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], \ - self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3],\ - self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) - print ("--------------------------------------------") - return + print("value = ", end="") + for j in range(0, len(self.pvdata[i].value)): + print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + print("") + print("status = %d (%s)" % + (self.pvdata[i].status, self.pvdata[i].statusAsString)) + print("alarmStatus = %d (%s)" % ( + self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + print("alarmSeverity = %d (%s)" % ( + self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + print("ts =", + self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + print("--------------------------------------------") + return - ''' - cdef showPrintWithPVName(self, npv, pvlist): - print ("GROUP NAME = ", self.name) - print ("GROUP HANDLE = ", self.groupHandle) - print ("GROUP STATUS = ", self.groupStatus) - cdef unsigned int i,j - - for i in range(0, npv): - print ("pv =", pvlist[i]) - for j in range(0, len(self.pvdata[i].value)): - print (self.pvdata[i].value[j],"[%d]" %j,) - print ("") - print ("status = %d " % self.pvdata[i].status) - print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) - print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) - print ("ts =", self.pvdata[i].ts[0], self.pvdata[i].tsDate[1]) - print ("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], \ - self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3],\ - self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) - return - ''' -################################################################################## - + +################################################################################## ################################################################################## cdef getMatchedDataType(dt, dtn): - #dt: input from user - #dtn: native type - #dtcheck: matching data type for pvd convert method - - cdef unsigned int dtcheck=dtn; - - if dt in ['uchar','uint8']: - dtcheck=CAFE_CHAR - elif dt in ['np.uint8']: - dtcheck=CAFE_CHAR - elif dt in ['ushort','uint16']: - dtcheck=CAFE_USHORT - elif dt in ['np.ushort','np.uint16']: - dtcheck=CAFE_USHORT - elif dt in ['short','int16','int8','bool','byte']: - dtcheck=CAFE_SHORT - elif dt in ['np.short','np.int16','np.int8','np.bool_', 'np.byte']: - dtcheck=CAFE_SHORT - elif dt in ['int','int_','uint','ushort','int32','uint32']: - dtcheck=CAFE_LONG - elif dt in ['np.intc','np.int_','np.long','np.ushort','np.int32','np.uint32']: - dtcheck=CAFE_LONG - elif dt in ['double', 'float', 'float_','float64', 'int64', 'uint64']: - dtcheck=CAFE_DOUBLE - elif dt in ['np.float_','np.float64', 'np.long', 'np.ulong','np.int64','np.uint64']: - dtcheck=CAFE_DOUBLE - elif dt in ['float16','float32']: - dtcheck=CAFE_FLOAT - elif dt in ['np.float16','np.float32']: - dtcheck=CAFE_FLOAT - elif dt in ['string','str','unicode','string_','str_','unicode_']: - dtcheck=CAFE_STRING - elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: - dtcheck=CAFE_STRING - elif dt in ['native','']: - dtcheck=dtn #need a line here - else: - print ("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") - print ("Data to be presented in native data type") - - return dtcheck + # dt: input from user + # dtn: native type + # dtcheck: matching data type for pvd convert method + + cdef unsigned int dtcheck = dtn + + if dt in ['uchar', 'uint8']: + dtcheck = CAFE_CHAR + elif dt in ['np.uint8']: + dtcheck = CAFE_CHAR + elif dt in ['ushort', 'uint16']: + dtcheck = CAFE_USHORT + elif dt in ['np.ushort', 'np.uint16']: + dtcheck = CAFE_USHORT + elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + dtcheck = CAFE_SHORT + elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + dtcheck = CAFE_SHORT + elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + dtcheck = CAFE_LONG + elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + dtcheck = CAFE_LONG + elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + dtcheck = CAFE_DOUBLE + elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + dtcheck = CAFE_DOUBLE + elif dt in ['float16', 'float32']: + dtcheck = CAFE_FLOAT + elif dt in ['np.float16', 'np.float32']: + dtcheck = CAFE_FLOAT + elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + dtcheck = CAFE_STRING + elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + dtcheck = CAFE_STRING + elif dt in ['native', '']: + dtcheck = dtn # need a line here + else: + print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + print("Data to be presented in native data type") + + return dtcheck ################################################################################## - - -################################################################################# - -#cdef pvdata p1 = pvdata() -#cdef pvctrl c1 = pvctrl() - ################################################################################# -cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): - - cdef CAFEDataTypeCode cdt - #global p1 - cdef pvdata p1 = pvdata() - - cdef unsigned int dtn = pvd.getDataType(); - cdef unsigned int dtcheck=dtn - cdef localList=[] - - if dt: - dtcheck=getMatchedDataType(dt, dtn) - - if dtcheck==CAFE_STRING: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsString(i)) - elif dtcheck==CAFE_SHORT: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsLong(i)) #getAsShort(i) - elif dtcheck==CAFE_FLOAT: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsDouble(i)) #getAsFloat(i) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - #if self._c_cafe.isEnum(handle)==1: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsString(i)) - #else: - # for i in range(0, pvd.getNelem()): - # localList.append(pvd.getAsLong(i)) #getAsUShort(i) - elif dtcheck==CAFE_CHAR: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsLong(i)) # pvd.getAsChar(i) - elif dtcheck==CAFE_LONG: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsLong(i)) - elif dtcheck==CAFE_DOUBLE: - for i in range(0, pvd.getNelem()): - localList.append(pvd.getAsDouble(i)) - else: - localList.append(0) - #print ("This line in PyCafe def getDataHolderToStruct should never appear!" - #print ("No Data! Error. Is channel connected?" +# cdef pvdata p1 = pvdata() +# cdef pvctrl c1 = pvctrl() - p1.value=localList - p1.status=pvd.getStatus() - p1.statusAsString=pvd.getStatusAsString() - p1.nelem=pvd.getNelem() - p1.alarmStatus=pvd.getAlarmStatus() - p1.alarmSeverity=pvd.getAlarmSeverity() - p1.alarmStatusAsString=pvd.getAlarmStatusAsString() - p1.alarmSeverityAsString=pvd.getAlarmSeverityAsString() +################################################################################# - p1.pulseID=pvd.getPulseID() - - p1.dataType=pvd.getDataType() - p1.dataTypeAsString = cdt.message(pvd.getDataType()) - - p1.tsDateAsString=pvd.getEpicsTimeStampAsString() - p1.bsDateAsString=pvd.getBSTimeStampAsString() - - pvd._etsNorm=pvd.getEpicsTimeStampAsUInt32() - - cpdef ll=[] - ll.append((pvd._etsNorm).secPastEpoch) - ll.append((pvd._etsNorm).nsec) - p1.ts=ll - - pvd._etsDate=pvd.getEpicsTimeStampAsDate() +cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): - cpdef ld=[] - ld.append( (pvd._etsDate).year ) - ld.append( (pvd._etsDate).mon ) - ld.append( (pvd._etsDate).day ) - ld.append( (pvd._etsDate).hour ) - ld.append( (pvd._etsDate).min ) - ld.append( (pvd._etsDate).sec ) - ld.append( (pvd._etsDate).nsec ) - p1.tsDate=ld + cdef CAFEDataTypeCode cdt + #global p1 + cdef pvdata p1 = pvdata() - return p1 -################################################################################## + cdef unsigned int dtn = pvd.getDataType() + cdef unsigned int dtcheck = dtn + cdef localList = [] + if dt: + dtcheck = getMatchedDataType(dt, dtn) + + if dtcheck == CAFE_STRING: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsString(i)) + elif dtcheck == CAFE_SHORT: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsLong(i)) # getAsShort(i) + elif dtcheck == CAFE_FLOAT: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + # if self._c_cafe.isEnum(handle)==1: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsString(i)) + # else: + # for i in range(0, pvd.getNelem()): + # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + elif dtcheck == CAFE_CHAR: + for i in range(0, pvd.getNelem()): + # pvd.getAsChar(i) + localList.append(pvd.getAsLong(i)) + elif dtcheck == CAFE_LONG: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsLong(i)) + elif dtcheck == CAFE_DOUBLE: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsDouble(i)) + else: + localList.append(0) + # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + # print ("No Data! Error. Is channel connected?" + + p1.value = localList + p1.status = pvd.getStatus() + p1.statusAsString = pvd.getStatusAsString() + p1.nelem = pvd.getNelem() + p1.alarmStatus = pvd.getAlarmStatus() + p1.alarmSeverity = pvd.getAlarmSeverity() + + p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + + p1.pulseID = pvd.getPulseID() + + p1.dataType = pvd.getDataType() + p1.dataTypeAsString = cdt.message(pvd.getDataType()) + + p1.tsDateAsString = pvd.getEpicsTimeStampAsString() + p1.bsDateAsString = pvd.getBSTimeStampAsString() + + pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() + + cpdef ll = [] + ll.append((pvd._etsNorm).secPastEpoch) + ll.append((pvd._etsNorm).nsec) + p1.ts = ll + + pvd._etsDate = pvd.getEpicsTimeStampAsDate() + + cpdef ld = [] + ld.append((pvd._etsDate).year) + ld.append((pvd._etsDate).mon) + ld.append((pvd._etsDate).day) + ld.append((pvd._etsDate).hour) + ld.append((pvd._etsDate).min) + ld.append((pvd._etsDate).sec) + ld.append((pvd._etsDate).nsec) + p1.tsDate = ld + + return p1 +################################################################################## ################################################################################# cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): - - #global c1 - cdef pvctrl c1 = pvctrl() - - cdef unsigned int dtn = pvc.getDataType(); - - cdef unsigned int dtcheck=dtn - - cdef localList=[] - - if dt: - dtcheck=getMatchedDataType(dt, dtn) - - if dtcheck==CAFE_STRING: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsString(i)) - elif dtcheck==CAFE_SHORT: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsLong(i)) #getAsShort(i) - elif dtcheck==CAFE_FLOAT: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsDouble(i)) #getAsFloat(i) - elif dtcheck==CAFE_ENUM: - #if enum, string taken as native - #if self._c_cafe.isEnum(handle)==1: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsString(i)) - #else: - # for i in range(0, pvd.getNelem()): - # localList.append(pvd.getAsLong(i)) #getAsUShort(i) - elif dtcheck==CAFE_CHAR: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsLong(i)) # pvd.getAsChar(i) - elif dtcheck==CAFE_LONG: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsLong(i)) - elif dtcheck==CAFE_DOUBLE: - for i in range(0, pvc.getNelem()): - localList.append(pvc.getAsDouble(i)) - else: - localList.append(0) - #print ("This line in PyCafe def getDataHolderToStruct should never appear!" - #print ("No Data! Error. Is channel connected?" - c1.value=localList - c1.status=pvc.getStatus() - c1.nelem=pvc.getNelem() - c1.alarmStatus=pvc.getAlarmStatus() - c1.alarmSeverity=pvc.getAlarmSeverity() - - c1.precision=pvc.getPrecision() - c1.noEnumStrings=pvc.getNoEnumStrings() - - enumList=[] - for i in range(0, pvc.getNoEnumStrings()): - enumList.append(pvc.getEnumStrings()[i]) - - c1.enumStrings=enumList - - c1.units=pvc.getUnitsAsString() - - c1.upperDisplayLimit=pvc.getUpperDispLimit_AsDouble() - c1.lowerDisplayLimit=pvc.getLowerDispLimit_AsDouble() - c1.upperAlarmLimit =pvc.getUpperAlarmLimit_AsDouble() - c1.upperWarningLimit=pvc.getUpperWarningLimit_AsDouble() - c1.lowerWarningLimit=pvc.getLowerWarningLimit_AsDouble() - c1.lowerAlarmLimit =pvc.getLowerAlarmLimit_AsDouble() - c1.upperControlLimit=pvc.getUpperCtrlLimit_AsDouble() - c1.lowerControlLimit=pvc.getLowerCtrlLimit_AsDouble() - - return c1 -################################################################################## + + #global c1 + cdef pvctrl c1 = pvctrl() + + + + cdef unsigned int dtn = pvc.getDataType() + + cdef unsigned int dtcheck = dtn + + cdef localList = [] + + if dt: + dtcheck = getMatchedDataType(dt, dtn) + + if dtcheck == CAFE_STRING: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsString(i)) + elif dtcheck == CAFE_SHORT: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsLong(i)) # getAsShort(i) + elif dtcheck == CAFE_FLOAT: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + # if self._c_cafe.isEnum(handle)==1: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsString(i)) + # else: + # for i in range(0, pvd.getNelem()): + # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + elif dtcheck == CAFE_CHAR: + for i in range(0, pvc.getNelem()): + # pvd.getAsChar(i) + localList.append(pvc.getAsLong(i)) + elif dtcheck == CAFE_LONG: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsLong(i)) + elif dtcheck == CAFE_DOUBLE: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsDouble(i)) + else: + localList.append(0) + # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + # print ("No Data! Error. Is channel connected?" + c1.value = localList + c1.status = pvc.getStatus() + c1.nelem = pvc.getNelem() + c1.alarmStatus = pvc.getAlarmStatus() + c1.alarmSeverity = pvc.getAlarmSeverity() + + c1.precision = pvc.getPrecision() + c1.noEnumStrings = pvc.getNoEnumStrings() + + enumList = [] + for i in range(0, pvc.getNoEnumStrings()): + enumList.append(pvc.getEnumStrings()[i]) + + c1.enumStrings = enumList + + try: + c1.units = pvc.getUnits() + except UnicodeDecodeError: + c1.units = str("") + + ''' + result = isinstance(pvc.getUnits(), (bytes,)) + + if result: + c1.units = pvc.getUnits().decode('utf-8') + print(str(c1.units + " is bytes")) + else: + c1.units = pvc.getUnits() #AsString() + print(str(c1.units + " has type " + str(type(pvc.getUnits())))) + print(c1.units) + ''' + + c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + + return c1 +################################################################################## ################################################################################# cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): - - cdef channelInfo ci = channelInfo() - cdef CAFEDataTypeCode cdt - - ci.channelID = ( cr.getChannelID()) - ci.connectFlag=cr.getConnectFlag() - ci.hostName =cr.getHostNameAsString() - ci.dataType =cr.getDataType() - ci.dataTypeAsString = cdt.message(cr.getDataType()) - ci.className =cr.getClassNameAsString() - ci.accessRead =cr.getAccessRead() - ci.accessWrite=cr.getAccessWrite() - ci.nelem =cr.getNelem() - ci.connectionState =cr.getConnectionState() - ci.cafeConnectionState=cr.getCafeConnectionState() - ci.connectionStateAsString =cr.getConnectionStateAsString() - ci.cafeConnectionStateAsString =cr.getCafeConnectionStateAsString() - return ci + + cdef channelInfo ci = channelInfo() + cdef CAFEDataTypeCode cdt + + ci.channelID = ( < long > cr.getChannelID()) + ci.connectFlag = cr.getConnectFlag() + ci.hostName = cr.getHostNameAsString() + ci.dataType = cr.getDataType() + ci.dataTypeAsString = cdt.message(cr.getDataType()) + ci.className = cr.getClassNameAsString() + ci.accessRead = cr.getAccessRead() + ci.accessWrite = cr.getAccessWrite() + ci.nelem = cr.getNelem() + ci.connectionState = cr.getConnectionState() + ci.cafeConnectionState = cr.getCafeConnectionState() + ci.connectionStateAsString = cr.getConnectionStateAsString() + ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + return ci ################################################################################# +cdef class bschannel: + cdef readonly string name + cdef readonly string type + cdef readonly int modulo + cdef readonly int offset + cdef readonly unsigned int nelem + cdef readonly bint BSEnabled + + def __cinit__(self): + self.name = (< bytes > ("")).encode('UTF-8') + self.type = (< bytes > ("")).encode('UTF-8') + self.modulo = 1 + self.offset = 0 + self.nelem = 1 + self.BSEnabled = False + +cdef class BSData: + cdef readonly string htype + cdef readonly unsigned long long pulse_id + cdef readonly list BSChannel + cdef readonly list pv + cdef readonly dict pvIdx + cdef readonly list handle + cdef readonly list global_timestamp + cdef readonly list gtsDate + cdef readonly bint isBS + cdef readonly unsigned int nPV + cdef readonly unsigned int nBSEnabled + cdef readonly unsigned short nhwm + cdef readonly int timeoutMS + cdef readonly unsigned int nChannels + cdef readonly unsigned int nNullData + cdef readonly float pGoodData + cdef readonly int status + cdef readonly statusAsString + cdef public bint daqStop + + cdef readonly list hasNewData + cdef readonly list pvdata + + def __cinit__(self): + self.pulse_id = 0 + self.htype = (< bytes > ("")).encode('UTF-8') + self.BSChannel = [] + self.pv = [] + self.handle = [] + self.global_timestamp = [] + self.gtsDate = [] + self.isBS = False + self.nPV = 0 + self.nBSEnabled = 0 + self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + self.nChannels = 0 # Diagnostics + self.nNullData = 0 + self.pGoodData = 0 + self.status = ICAFE_NORMAL + self.statusAsString = 'ICAFE_NORMAL' + self.daqStop = False + self.hasNewData = [] + + def __copy__(self): + return self + + def __deepcopy__(self, memo): + cdef BSData res = BSData() + cpdef p1List = [] + cpdef bscList = [] + + res.htype = self.htype + res.pulse_id = self.pulse_id + res.pv = deepcopy(self.pv) + res.handle = deepcopy(self.handle) + res.isBS = self.isBS + + #res.pvIdx = dict([(self.pv[i], i) for i in range(0,len(self.pv))] ) + + res.pvIdx = deepcopy(self.pvIdx) + + # print(res.pvIdx.items()) + + res.global_timestamp = deepcopy(self.global_timestamp) + res.gtsDate = deepcopy(self.gtsDate) + + res.hasNewData = deepcopy(self.hasNewData) + + res.nPV = self.nPV + res.timeoutMS = self.timeoutMS + res.nhwm = self.nhwm + res.status = self.status + res.statusAsString = self.statusAsString + + res.nChannels = self.nChannels + res.nNullData = self.nNullData + res.pGoodData = self.pGoodData + + res.daqStop = self.daqStop + + lenPV = len(self.pvdata) + + # Should never happen + if lenPV != len(self.BSChannel): + print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + if lenPV > len(self.BSChannel): + lenPV = len(self.BSChannel) + + for i in range(0, lenPV): + + # for i in range(0,len(self.BSChannel)): + bsc = bschannel() + bsc.name = self.BSChannel[i].name + bsc.type = self.BSChannel[i].type + bsc.modulo = self.BSChannel[i].modulo + bsc.offset = self.BSChannel[i].offset + bsc.nelem = self.BSChannel[i].nelem + bsc.BSEnabled = self.BSChannel[i].BSEnabled + + bscList.append(bsc) + + # res.BSChannel=bscList + + # for i in range(0,len(self.pvdata)): + + p1 = pvdata() + # value=[] + # value.append(self.pvdata[i].value[0]) + # p1.value.append(value) + p1.value = deepcopy(self.pvdata[i].value) + p1.status = self.pvdata[i].status + p1.statusAsString = self.pvdata[i].statusAsString + p1.nelem = self.pvdata[i].nelem + p1.alarmStatus = self.pvdata[i].alarmStatus + p1.alarmSeverity = self.pvdata[i].alarmSeverity + p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + p1.pulseID = self.pvdata[i].pulseID + p1.dataType = self.pvdata[i].dataType + p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + p1.tsDateAsString = self.pvdata[i].tsDateAsString + p1.bsDateAsString = self.pvdata[i].bsDateAsString + p1.ts = deepcopy(self.pvdata[i].ts) + p1.tsDate = deepcopy(self.pvdata[i].tsDate) + + p1List.append(p1) + + res.pvdata = p1List + res.BSChannel = bscList + + # for i in range(0,len(res.pvdata)): + # res.pvdata[i].show() + + return res + + def compare(self, list _pvdata): + self.hasNewData = [0]*len(self.pv) + cdef unsigned short newDataFlag = 0 + + for i in range(0, len(self.pv)): + if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: + self.hasNewData[i] = 1 + newDataFlag = 1 + elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + self.hasNewData[i] = 1 + newDataFlag = 1 + # Catch disconnect events(!!) and set newDataFlag only + elif self.pvdata[i].status != _pvdata[i].status: + newDataFlag = 1 + return newDataFlag + + def getIdxFromPVName(self, str _name): + for i in range(0, len(self.pv)): + if _name == self.pv[i]: + return i + return -1 + + def getDaqStop(self): + return self.daqStop + + def setDaqStop(self, bint ds): + self.daqStop = ds + + def getVal(self, iElem=None): + + cdef int idx = -1 + + if isinstance(iElem, (str)): + # iElem=self.getIdxFromPVName(iElem) + iElem = self.pvIdx.get(iElem) + if iElem is None: + return None + idx = iElem + elif isinstance(iElem, (int, long)): + if iElem < 0: + print("Invalid input:", iElem, "Idx must be non-negative!") + return None + idx = iElem + + if iElem is not None: + if len(self.pvdata[idx].value) == 1: + return self.pvdata[idx].value[0] + else: + return self.pvdata[idx].value + vall = [] + for i in range(0, self.nPV): + if len(self.pvdata[i].value) == 1: + vall.append(self.pvdata[i].value[0]) + else: + vall.append(self.pvdata[i].value) + return vall + + def getPV(self, iElem=None): + + cdef int idx = -1 + + if isinstance(iElem, (str)): + iElem = self.pvIdx.get(iElem) + if iElem is None: + return None + idx = iElem + elif isinstance(iElem, (int, long)): + if iElem < 0: + print("Invalid input:", iElem, " Idx must be non-negative!") + return None + idx = iElem + + if iElem is not None: + return self.pvdata[idx] + vall = [] + for i in range(0, self.nPV): + vall.append(self.pvdata[i]) + return vall + + def show(self, str BSCA=None, int wf=1): + + for i in range(0, self.nPV): + + if self.BSChannel[i].BSEnabled and self.isBS: + if BSCA in (None, 'BS'): + print("---------------------------------") + print("pv= %s [%d] BS" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + else: + if BSCA in (None, 'CA'): + print("---------------------------------") + print("pv= %s [%d] CA" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + print("---------------------------------") + + print("overallStatus = %d (%s)" % + (self.status, self.statusAsString)) + if self.pulse_id > 0: + print("pulse_id = %d" % self.pulse_id) + print("global_timestamp = %d sec. %d nsec" % + (self.global_timestamp[0], self.global_timestamp[1])) + print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + self.gtsDate[5], self.gtsDate[6])) + print("nPV = %d" % self.nPV) + if self.isBS: + print("of which BS = %d (Percentage with data = %f)" % + (self.nChannels, float(self.pGoodData))) + print("of which CA = %d" % (self.nPV - self.nChannels)) + else: + print("of which CA = %d (i.e., all)" % (self.nPV) ) + print("---------------------------------") + return + + def showAll(self, int wf=1): + + for i in range(0, self.nPV): + print("---------------------------------") + if self.BSChannel[i].BSEnabled and self.isBS: + print("pv= %s [%d] BS" % (self.pv[i], i)) + else: + print("pv= %s [%d] CA" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + print("---------------------------------") + print("overallStatus = %d (%s)" % + (self.status, self.statusAsString)) + print("pulse_id = %d" % self.pulse_id) + print("global_timestamp = %d sec. %d nsec" % + (self.global_timestamp[0], self.global_timestamp[1])) + print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + self.gtsDate[6])) + print("nPV = %d" % self.nPV) + if self.isBS: + print("of which BS = %d (Percentage with data = %f)" % + (self.nChannels, float(self.pGoodData))) + print("of which CA = %d" % (self.nPV-self.nChannels)) + else: + print("of which CA = %d (i.e., all)" % (self.nPV) ) + print("pvIdx = ", self.pvIdx) + print("pv = ", self.pv) + print("handle = ", self.handle) + print("isBS = %d" % self.isBS) + #print ("nBSEnabled = %d" % self.nBSEnabled) + print("nhwm = %d" % self.nhwm) + print("timeoutMS = %d" % self.timeoutMS) + print("nChannels = %d" % self.nChannels) + print("nNullData = %d" % self.nNullData) + print("pGoodData = %f" % float(self.pGoodData)) + print("---------------------------------") + return + + +cdef class SFDBPMData: + cdef readonly list x + cdef readonly list y + cdef readonly list q + cdef readonly list Energy + cdef readonly list xStatus + cdef readonly list yStatus + cdef readonly list qStatus + cdef readonly list EnergyStatus + + # cdef readonly list offs_x + # cdef readonly list offs_y + + cdef readonly bint isAllXOK + cdef readonly bint isAllYOK + cdef readonly bint isAllQOK + cdef readonly bint isAllOK + cdef readonly list device + cdef readonly int status + + def __cinit__(self): + self.isAllOK = False + self.isAllXOK = False + self.isAllYOK = False + self.isAllQOK = False + self.x = [] + self.y = [] + self.q = [] + self.Energy = [] + self.xStatus = [] + self.yStatus = [] + self.qStatus = [] + self.EnergyStatus = [] + self.device = [] + + # self.offs_x=[] + # self.offs_y=[] + + +################################################################################# + +cdef SFDBPMData dbpmHolderToStruct(DBPMKeeper d): + cdef SFDBPMData dbpm = SFDBPMData() + + cdef unsigned int i + + # double [::1] mvDouble + #mvDouble = np.empty(d.getX().size(), dtype=np.float64) + # for ij in range(0, d.getX().size()): + # mvDouble[ij]=d.getX()[i] + # dbpm.x=np.array(mvDouble) + + for i in range(0, d.getX().size()): + + dbpm.x.append(d.getX()[i].getValue()) + dbpm.y.append(d.getY()[i].getValue()) + dbpm.q.append(d.getQ()[i].getValue()) + dbpm.Energy.append(d.getEnergy()[i].getValue()) + dbpm.xStatus.append(d.getX()[i].getStatus()) + dbpm.yStatus.append(d.getY()[i].getStatus()) + dbpm.qStatus.append(d.getQ()[i].getStatus()) + dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) + + dbpm.isAllXOK = d.getIsAllXOK() + dbpm.isAllYOK = d.getIsAllYOK() + dbpm.isAllQOK = d.getIsAllQOK() + dbpm.isAllOK = d.getIsAllOK() + dbpm.status = d.getStatus() + return dbpm + +################################################################################# + + +################################################################################# + +cdef BSDataHolderToStruct(BSDataHolder b): + + cdef BSData bsd = BSData() + cdef vector[PVDataHolder] pvd + cdef unsigned int i + cdef etsNorm _etsNorm + cdef etsDate _etsDate + cdef HandleHelper hh + cdef CAFEStatusCode csc + localListToStruct = [] + localBSCToStruct = [] + + bsd.pulse_id = b.getPulse_id() + bsd.pv = b.getPV() + bsd.handle = b.getHandles() + bsd.isBS = b.getIsBS() + + bsd.pvIdx = dict([(bsd.pv[i], i) for i in range(0, len(bsd.pv))]) + + # print(bsd.pvIdx.items()) + + _etsNorm = b.getGlobal_timestamp() + + #print ("pulse_id " , b.getPulse_id()) + #print ("gto ", b.getGlobal_timestamp()) + + cpdef ll = [] + ll.append(_etsNorm.secPastEpoch) + ll.append(_etsNorm.nsec) + bsd.global_timestamp = ll + + _etsDate = hh.unixTimeToDate(_etsNorm) + cpdef ld = [] + ld.append(_etsDate.year) + ld.append(_etsDate.mon) + ld.append(_etsDate.day) + ld.append(_etsDate.hour) + ld.append(_etsDate.min) + ld.append(_etsDate.sec) + ld.append(_etsDate.nsec) + + bsd.gtsDate = ld + + #bsd.isBS = b.getIsBS() + bsd.nPV = b.getNPV() + bsd.timeoutMS = b.getTimeout() + bsd.nhwm = b.getHWM() + + bsd.status = b.getStatus() + bsd.statusAsString = csc.msgIDAsString(bsd.status) + + pvd = b.getPVDataV() + cpdef lt = [] + cpdef bscList = [] + + # Would be quicker to have p1 = pvdata() outside loop - check this + for i in range(0, pvd.size()): + p1 = pvdata() + p1 = PVDataHolderToStruct(pvd[i], dt='native') + + #print ("a: ", p1.tsDate) + lt = [] + bsc = bschannel() + + if b.getBSChannel(i).isBSEnabled() and bsd.isBS: + bsc.BSEnabled = True + _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) + else: + _etsDate = pvd[i].getEpicsTimeStampAsDate() + lt.append(_etsDate.year) + lt.append(_etsDate.mon) + lt.append(_etsDate.day) + lt.append(_etsDate.hour) + lt.append(_etsDate.min) + lt.append(_etsDate.sec) + lt.append(_etsDate.nsec) + p1.tsDate = lt + #print ("b: ", p1.tsDate) + localListToStruct.append(p1) + localBSCToStruct.append(bsc) + + bsd.pvdata = localListToStruct + bsd.BSChannel = localBSCToStruct + + bsd.nChannels = b.getNChannels() + bsd.nNullData = b.getNNullData() + bsd.pGoodData = b.getPGoodData() + + bsd.daqStop = False + return bsd + +################################################################################# diff --git a/PyCafeDefs_api.pxi b/PyCafeDefs_api.pxi new file mode 100644 index 0000000..bce0114 --- /dev/null +++ b/PyCafeDefs_api.pxi @@ -0,0 +1,94 @@ + +cdef object py_cb_handle = None +cdef object py_cb_handle_open = None + +# ***********public or api*************** + +cdef api void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + #print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + cdef pvdata pv1 = PVDataHolderToStruct(pvd) + + for cbobjt, v in handleMonDictGlobal.items(): + if v == handle: + cbobjt(pv1, handle, pvname) + with nogil: + return + +cdef api void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: + #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + + for cbobjt, v in handleMonDictGlobal.items(): + if v == handle: + cbobjt(c1, handle, pvname) + + with nogil: + return + +cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: + #print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + py_cb_handle(handle) + with nogil: + return + + +# Default +cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: + #print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) + # if monDictGlobal.has_key(monid): + if monid in monDictGlobal.keys(): + cbobjt = monDictGlobal[monid] + cbobjt(handle) + else: + print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + with nogil: + return + + +cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: + #print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle) + # py_cb_handle_get(handle) + if handle in getDictGlobal.keys(): + cbobjt = getDictGlobal[handle] + cbobjt(handle) + else: + print("GET CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + +cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: + #print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle) + # py_cb_handle_put(handle) + if handle in putDictGlobal.keys(): + cbobjt = putDictGlobal[handle] + cbobjt(handle) + else: + print("PUT CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + + +cdef api void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: + # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + #print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + py_cb_handle_open(handle, status) + with nogil: + return + +cdef api void py_cb_handle_connect_wrapper(unsigned int handle, string pvname, int status) with gil: + print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status) + #py_cb_handle_connect(handle, pvname, status) + + for k, y in openDictGlobal.items(): + print(k, y) + # if openDictGlobal.has_key(pvname): + if str(pvname) in openDictGlobal.keys(): + cbobjt = openDictGlobal[pvname] + cbobjt(handle, pvname, status) + with nogil: + return + + +# ***********api*************** diff --git a/PyCafeDefs_api_full.pxi b/PyCafeDefs_api_full.pxi new file mode 100644 index 0000000..79e932e --- /dev/null +++ b/PyCafeDefs_api_full.pxi @@ -0,0 +1,2119 @@ + +def show(): + print("cafe=PyCafe.CyCafe()") + print("cyca=PyCafe.CyCa()") + print("cafe.init()") + print("cafe.openNoWait()") + print("=cafe.open()") + print("cafe.openNowAndWait(timeout)") + print("cafe.openNow()") + print("cafe.close(handlePV=)") + print("cafe.closeChannels()") + print("cafe.allConnected()") + print("cafe.isConnected(handlePV=)") + print("cafe.printDisconnected()") + print("cafe.printHandles()") + print("cafe.printHandle(handlePV=)") + + print("cafe.getStatus(handlePV=)") + print("cafe.getAlarmStatusSeverity(handlePV=)") + print("cafe.getTimeStamp(handlePV=)") + print("cafe.getTimeStampDate(handlePV=)") + print("cafe.checkForHandle()") + print("cafe.checkForHandleList()") + print("cafe.checkForGroupHandle()") + print("cafe.getPVNameFromHandle(int)") + print("cafe.getHandleFromPVName(str)") + print("cafe.getChannelInfo(handlePV=)") + print("cafe.setDbrBase(handlePV=, unsigned int)") # dbrBase.DBR_XXX + print("cafe.getDbrBase(handlePV=)") + + print("cafe.getNonBlocking(handlePV=)") # followed by getCache + print("cafe.get(handlePV=)") # return in native type + print("cafe.get(handlePV=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getInt(handlePV=)") + print("cafe.getFloathandlePV=)") + print("cafe.getStr(handlePV=)") + + print("cafe.getList(handlePV=)") # return List in native type + print("cafe.getList(handlePV=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getIntList(handlePV=)") + print("cafe.getFloatList(handlePV=)") + print("cafe.getStrList(handlePV=)") + + # returns Memoryview in native type, except for when dt='str' which returns a List + # returns np.array if asnumpy=True + print("cafe.getArray(handlePV=)") + print("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") + print("cafe.getIntArray(handlePV=,asnumpy=)") + print("cafe.getFloatArray(handlePV=,asnumpy=)") + + print("cafe.getPV(handlePV=)") # return PVData in native type + print("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getPVInt(handlePV=)") + print("cafe.getPVFloat(handlePV=)") + print("cafe.getPVStr(handlePV=)") + + # return Array of PVData in native type + print("cafe.getPVList(handleList=)") + print("cafe.getPVList(handleList=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getPVIntList(handleList=)") + print("cafe.getPVFloatList(handleList=)") + print("cafe.getPVStrList(handleList=)") + + # return List in native type + print("cafe.getScalarList(handleList=)") + print("cafe.getScalarList(handleList=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getIntScalarList(handleList=)") + print("cafe.getFloatScalarList(handleList=)") + print("cafe.getStrScalarList(handleList=)") + + # return PVData in native type + print("cafe.getPVCache(handlePV=)") + print("cafe.getPVCache(handlePV=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getPVIntCache(handlePV=)") + print("cafe.getPVFloatCache(handlePV=)") + print("cafe.getPVStrCache(handlePV=)") + + # returns Memoryview in native type, except for when dt='str' which returns a List + # returns np.array if asnumpy=True + print("cafe.getArrayCache(handlePV=)") + print("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") + print("cafe.getIntArrayCache(handlePV=,asnumpy=)") + print("cafe.getFloatArrayCache(handlePV=,asnumpy=)") + + print("cafe.getCtrl(handlePV=)") + print("cafe.getCtrl(handlePV=, dt='native' (default) else <'int','float','str'>)") + print("cafe.getCtrlCache(handlePV=)") + print("cafe.getCtrlCache(handlePV=, dt='native' (default) else <'int','float','str'>)") + + print("mpid=cafe.monitorStart(handlePV=), cb=None, dbr=None, mask=DBE_VALUE|DBE_LOG|DBE_ALARM)") + print("cafe.monitorStop(handlePV=, mpID=None)") + print("cafe.monitorStopAll(handlePV=)") + + print("cafe.getNoMonitors(handlePV=)") + + print("cafe.set(handlePV=, valSet)") + print("cafe.setScalarList(handleList=, valList)") + print("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ + tolerance= , timeout=, printFlag=)") + # Synchronous groups + print("ghandle = groupings(char * gname, list _pvlist)") + print("ghandle = groupopen(char * gname)") + print("status = groupClose()") + print("handleList[]=cafe.defineGroup(gname, pvList)") + print("list[]=cafe.PVGroupValuesToList(pvgroup)") + print("vectorList,status,statusList = cafe.getGroup(ghandleName, dt='native')") + print("pvdataList[],status = cafe.getPVGroup(ghandleName, dt='native')") + print("cafe.setGroup(ghandleName, vectorList)") + + return + + +# define threshold +cdef int PYCAFE_PRINT_HIGH = 9 +cdef int PYCAFE_PRINT_MED = 5 +cdef int PYCAFE_PRINT_LOW = 1 + +cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_MED + +ctypedef shared_ptr[vector[double]] vdouble_ptr +ctypedef shared_ptr[vector[float]] vfloat_ptr + +cdef object py_cb = None +cdef object py_cb_handle = None +cdef object py_cb_ctrl = None +cdef object py_cb_handle_get = None +cdef object py_cb_handle_put = None +cdef object py_cb_handle_open = None + + +# ***********api*************** + +# For when with pvdata +cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + cdef pvdata pv1 = PVDataHolderToStruct(pvd) + + # This has to go to a dictionary else last callback is always invoked + #py_cb(pv1, handle, pvname) + + for cbobjt, v in handleMonDictGlobal.items(): + if v == handle: + cbobjt(pv1, handle, pvname) + + with nogil: + return + +cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: + print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + + for cbobjt, v in handleMonDictGlobal.items(): + if v == handle: + cbobjt(c1, handle, pvname) + + with nogil: + return + +cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: + print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + py_cb_handle(handle) + with nogil: + return + + +# Default +cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: + print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) + # if monDictGlobal.has_key(monid): + if monid in monDictGlobal.keys(): + cbobjt = monDictGlobal[monid] + cbobjt(handle) + else: + print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + + with nogil: + return + + +cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil: + print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle) + # py_cb_handle_get(handle) + if handle in getDictGlobal.keys(): + cbobjt = getDictGlobal[handle] + cbobjt(handle) + else: + print("GET CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + +cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil: + print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle) + # py_cb_handle_put(handle) + if handle in putDictGlobal.keys(): + cbobjt = putDictGlobal[handle] + cbobjt(handle) + else: + print("PUT CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + + +cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: + # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + py_cb_handle_open(handle, status) + with nogil: + return + +cdef public void py_cb_handle_connect_wrapper(unsigned int handle, string pvname, int status) with gil: + print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status) + #py_cb_handle_connect(handle, pvname, status) + print("handle=", handle) + print("pvname=", pvname) + print("status=", status) + for k, y in openDictGlobal.items(): + print(k, y) + # if openDictGlobal.has_key(pvname): + if str(pvname) in openDictGlobal.keys(): + cbobjt = openDictGlobal[pvname] + cbobjt(handle, pvname, status) + with nogil: + return + + +# ***********api*************** +''' +cdef object callbackHandlerMonitor = None + + +cdef void callbackHandlerMonitor_wrapper(event_handler_args args) with gil: + handle= args.usr + py_cb_handle(handle) + with nogil: + return + + +#Correct memory management a la KWSmith p.190 +cdef class _finalizer: + cdef void *_data + def __dealloc__(self): + if self._data is not NULL: + free(self._data) + return + + +cdef void set_base(cnp.ndarray arr, void * carr): + cdef _finalizer fin = _finalizer() + fin._data = carr + cnp.set_array_base(arr, fin) + return +''' + +cdef class CyCa: + cpdef readonly unsigned int CY_DBE_VALUE + cpdef readonly unsigned int CY_DBE_LOG + cpdef readonly unsigned int CY_DBE_ARCHIVE + cpdef readonly unsigned int CY_DBE_ALARM + cpdef readonly unsigned int CY_DBE_PROPERTY + cpdef readonly unsigned int CY_DBR_PRIMITIVE + cpdef readonly unsigned int CY_DBR_PLAIN + cpdef readonly unsigned int CY_DBR_STS + cpdef readonly unsigned int CY_DBR_TIME + cpdef readonly unsigned int CY_DBR_GR + cpdef readonly unsigned int CY_DBR_CTRL + cpdef readonly unsigned int CY_DBR_PUT + cpdef readonly unsigned int CY_DBR_STSACK + cpdef readonly unsigned int CY_DBR_CLASS + cpdef readonly unsigned int CY_DBR_NONE + cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short + # returns an IEEE floating point value + cpdef readonly unsigned int CY_DBR_FLOAT + # returns an unsigned short which is the enum item + cpdef readonly unsigned int CY_DBR_ENUM + cpdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + # returns a double precision floating point number + cpdef readonly unsigned int CY_DBR_DOUBLE + # returns a string status structure (dbr_sts_string) + cpdef readonly unsigned int CY_DBR_STS_STRING + # returns a short status structure (dbr_sts_short) + cpdef readonly unsigned int CY_DBR_STS_SHORT + # returns a short status structure (dbr_sts_int) + cpdef readonly unsigned int CY_DBR_STS_INT + # returns a float status structure (dbr_sts_float) + cpdef readonly unsigned int CY_DBR_STS_FLOAT + # returns an enum status structure (dbr_sts_enum) + cpdef readonly unsigned int CY_DBR_STS_ENUM + # returns a char status structure (dbr_sts_char) + cpdef readonly unsigned int CY_DBR_STS_CHAR + # returns a long status structure (dbr_sts_long) + cpdef readonly unsigned int CY_DBR_STS_LONG + # returns a double status structure (dbr_sts_double) + cpdef readonly unsigned int CY_DBR_STS_DOUBLE + # returns a string time structure (dbr_time_string) + cpdef readonly unsigned int CY_DBR_TIME_STRING + # returns a short time structure (dbr_time_short) + cpdef readonly unsigned int CY_DBR_TIME_SHORT + # returns a short time structure (dbr_time_short) + cpdef readonly unsigned int CY_DBR_TIME_INT + # returns a float time structure (dbr_time_float) + cpdef readonly unsigned int CY_DBR_TIME_FLOAT + # returns an enum time structure (dbr_time_enum) + cpdef readonly unsigned int CY_DBR_TIME_ENUM + # returns a char time structure (dbr_time_char) + cpdef readonly unsigned int CY_DBR_TIME_CHAR + # returns a long time structure (dbr_time_long) + cpdef readonly unsigned int CY_DBR_TIME_LONG + # returns a double time structure (dbr_time_double) + cpdef readonly unsigned int CY_DBR_TIME_DOUBLE + # returns a graphic string structure (dbr_gr_string) + cpdef readonly unsigned int CY_DBR_GR_STRING + # returns a graphic short structure (dbr_gr_short) + cpdef readonly unsigned int CY_DBR_GR_SHORT + # returns a graphic short structure (dbr_gr_int) + cpdef readonly unsigned int CY_DBR_GR_INT + # returns a graphic float structure (dbr_gr_float) + cpdef readonly unsigned int CY_DBR_GR_FLOAT + # returns a graphic enum structure (dbr_gr_enum) + cpdef readonly unsigned int CY_DBR_GR_ENUM + # returns a graphic char structure (dbr_gr_char) + cpdef readonly unsigned int CY_DBR_GR_CHAR + # returns a graphic long structure (dbr_gr_long) + cpdef readonly unsigned int CY_DBR_GR_LONG + # returns a graphic double structure (dbr_gr_double) + cpdef readonly unsigned int CY_DBR_GR_DOUBLE + # returns a control string structure (dbr_ctrl_int) + cpdef readonly unsigned int CY_DBR_CTRL_STRING + # returns a control short structure (dbr_ctrl_short) + cpdef readonly unsigned int CY_DBR_CTRL_SHORT + # returns a control short structure (dbr_ctrl_int) + cpdef readonly unsigned int CY_DBR_CTRL_INT + # returns a control float structure (dbr_ctrl_float) + cpdef readonly unsigned int CY_DBR_CTRL_FLOAT + # returns a control enum structure (dbr_ctrl_enum) + cpdef readonly unsigned int CY_DBR_CTRL_ENUM + # returns a control char structure (dbr_ctrl_char) + cpdef readonly unsigned int CY_DBR_CTRL_CHAR + # returns a control long structure (dbr_ctrl_long) + cpdef readonly unsigned int CY_DBR_CTRL_LONG + # returns a control double structure (dbr_ctrl_double) + cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE + + # cpdef readonly int CY_ECA_TIMEOUT + + cpdef readonly int CY_ECA_NORMAL # 1 + cpdef readonly int CY_ECA_ALLOCMEM # 48 + cpdef readonly int CY_ECA_TOLARGE # 72 + cpdef readonly int CY_ECA_TIMEOUT # 80 + cpdef readonly int CY_ECA_BADTYPE # 114 + cpdef readonly int CY_ECA_INTERNAL # 142 + cpdef readonly int CY_ECA_GETFAIL # 152 + cpdef readonly int CY_ECA_PUTFAIL # 160 + cpdef readonly int CY_ECA_BADCOUNT # 176 + cpdef readonly int CY_ECA_BADSTR # 186 + cpdef readonly int CY_ECA_DISCONN # 192 + cpdef readonly int CY_ECA_DBLCHNL # 200 + cpdef readonly int CY_ECA_EVDISALLOW # 210 + cpdef readonly int CY_ECA_BADMONID # 242 + cpdef readonly int CY_ECA_BADMASK # 330 + cpdef readonly int CY_ECA_IODONE # 339 + cpdef readonly int CY_ECA_IOINPROGRESS # 347 + cpdef readonly int CY_ECA_BADSYNCGRP # 354 + cpdef readonly int CY_ECA_PUTCBINPROG # 362 + cpdef readonly int CY_ECA_NORDACCESS # 368 + cpdef readonly int CY_ECA_NOWTACCESS # 376 + cpdef readonly int CY_ECA_ANACHRONISM # 386 + cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + cpdef readonly int CY_ECA_NOCONVERT # 400 + cpdef readonly int CY_ECA_BADCHID # 410 + cpdef readonly int CY_ECA_BADFUNCPTR # 418 + cpdef readonly int CY_ECA_ISATTACHED # 424 + cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + cpdef readonly int CY_ECA_CHANDESTROY # 440 + cpdef readonly int CY_ECA_BADPRIORITY # 450 + cpdef readonly int CY_ECA_NOTTHREADED # 458 + cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + cpdef readonly int CY_ECA_CONNSEQTMO # 472 + cpdef readonly int CY_ECA_UNRESPTMO # 480 + + cpdef readonly int ICAFE_CS_NEVER_CONN + cpdef readonly int ICAFE_CS_PREV_CONN + cpdef readonly int ICAFE_CS_CONN + cpdef readonly int ICAFE_CS_CLOSED + cpdef readonly int ICAFE_CS_DISCONN + cpdef readonly int ICAFE_CS_UNKNOWN + + cpdef readonly int ICAFE_TYPENOTCONN + cpdef readonly int ICAFE_RULE_FALSE + cpdef readonly int ICAFE_BADCOUNT + cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + cpdef readonly int ICAFE_CACHE_EMPTY + cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + cpdef readonly int ICAFE_SET_AND_GET_MISMATCH + + cpdef readonly int ICAFE_CA_OP_GET + cpdef readonly int ICAFE_CA_OP_PUT + cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + cpdef readonly int ICAFE_CA_OP_ADD_EVENT + cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + cpdef readonly int ICAFE_CA_OP_OTHER + cpdef readonly int ICAFE_CA_OP_CONN_DOWN + cpdef readonly int ICAFE_CA_OP_CONN_UP + + cpdef readonly int ICAFE_DAQ_RUN + cpdef readonly int ICAFE_DAQ_PAUSED + cpdef readonly int ICAFE_DAQ_STOPPED + + cpdef readonly int ECAFE_LOAD_COLLECTION + cpdef readonly int ECAFE_LOAD_GROUP + + cpdef readonly int ICAFE_NORMAL + cpdef readonly int ICAFE_SUCCESS + + cpdef readonly int ECAFE_NODATA + cpdef readonly int ECAFE_INVALID_TYPE + cpdef readonly int ECAFE_BADCOUNT + cpdef readonly int ECAFE_BADSTR + cpdef readonly int ECAFE_BADTYPE + cpdef readonly int ECAFE_NO_CONVERT + cpdef readonly int ECAFE_NULLCONTEXT + cpdef readonly int ECAFE_NULLCHID + cpdef readonly int ECAFE_NULLEVID + cpdef readonly int ECAFE_UNKNOWN_COLLECTION + cpdef readonly int ECAFE_EMPTY_COLLECTION + cpdef readonly int ECAFE_COLLECTION_PREV_DEF + cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + cpdef readonly int ECAFE_RULE_FALSE + cpdef readonly int ECAFE_UNKNOWN_GROUP + cpdef readonly int ECAFE_EMPTY_GROUP + cpdef readonly int ECAFE_GROUP_PREV_DEF + cpdef readonly int ECAFE_INVALID_HANDLE + cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + cpdef readonly int ECAFE_NORDACCESS + cpdef readonly int ECAFE_NOWTACCESS + cpdef readonly int ECAFE_TIMEOUT + cpdef readonly int ECAFE_CANNOT_OPEN_FILE + cpdef readonly int ECAFE_INVALID_SWITCH_CASE + cpdef readonly int ECAFE_PVALIAS_PREV_DEF + cpdef readonly int ECAFE_PVALIAS_INVALID + cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + cpdef readonly int ECAFE_WRONG_CA_CONTEXT + cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + cpdef readonly int ECAFE_INVALID_ENUM_INDEX + cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + + cpdef readonly int ECAFE_BPM_DATA_IS_INVALID + + cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS + cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM + cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM + cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + + cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + + cpdef readonly int ERRNO_EINTR + cpdef readonly int ERRNO_EAGAIN + cpdef readonly int ERRNO_EFAULT + cpdef readonly int ERRNO_EINVAL + cpdef readonly int ERRNO_ENOTSOCK + cpdef readonly int ERRNO_EPROTONOSUPPORT + + cpdef readonly int SEV_NO_ALARM + cpdef readonly int SEV_MINOR + cpdef readonly int SEV_MAJOR + cpdef readonly int SEV_INVALID + + cpdef readonly int STAT_NO_ALARM + cpdef readonly int STAT_READ + cpdef readonly int STAT_WRITE + cpdef readonly int STAT_HIHI + cpdef readonly int STAT_HIGH + cpdef readonly int STAT_LOLO + cpdef readonly int STAT_LOW + cpdef readonly int STAT_STATE + cpdef readonly int STAT_COS + cpdef readonly int STAT_COMM + cpdef readonly int STAT_TIMEOUT + cpdef readonly int STAT_HWLIMIT + cpdef readonly int STAT_CALC + cpdef readonly int STAT_SCAN + cpdef readonly int STAT_LINK + cpdef readonly int STAT_SOFT + cpdef readonly int STAT_BAD_SUB + cpdef readonly int STAT_UDF + cpdef readonly int STAT_DISABLE + cpdef readonly int STAT_SIMM + cpdef readonly int STAT_READ_ACCESS + cpdef readonly int STAT_WRITE_ACCESS + + # ctypedef enum ChannelRequestPolicyKind: + cpdef readonly unsigned int WITHOUT_CALLBACK + cpdef readonly unsigned int WITH_CALLBACK_DEFAULT + cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + + # ChannelFlushSendBufferPolicyKind: + cpdef readonly unsigned int WITH_FLUSH_IO + cpdef readonly unsigned int WITH_PEND_IO + cpdef readonly unsigned int WITH_PEND_EVENT + cpdef readonly unsigned int WITH_POLL + + # ChannelWhenToFlushSendBufferPolicyKind: + cpdef readonly unsigned int FLUSH_AUTOMATIC + cpdef readonly unsigned int FLUSH_NOW + cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + + # ChannelGetCacheWaitPolicyKind: + cpdef readonly unsigned int GET_CACHE_NO_CHECK + cpdef readonly unsigned int GET_CACHE_NO_WAIT + cpdef readonly unsigned int GET_CACHE_NOW + cpdef readonly unsigned int GET_CACHE_WAIT + + # ChannelGetActionWhenMonitorPolicyKind: + cpdef readonly unsigned int GET_FROM_CACHE + cpdef readonly unsigned int GET_FROM_IOC + + # ChannelRequestDataTypePolicyKind: + cpdef readonly unsigned int NATIVE_DATATYPE + # The smaller in byte size of type requested and native datatype + cpdef readonly unsigned int LOWEST_DATATYPE + + # ChannelWaitForResponsePolicyKind: + cpdef readonly unsigned int BLOCKING + cpdef readonly unsigned int WAIT + cpdef readonly unsigned int NON_BLOCKING + cpdef readonly unsigned int NO_WAIT + + # StatusMessageKind: + cpdef readonly unsigned int NO_MESSAGE + cpdef readonly unsigned int PRE_REQUEST + cpdef readonly unsigned int FROM_REQUEST + cpdef readonly unsigned int FROM_PEND + cpdef readonly unsigned int FROM_CALLBACK + cpdef readonly unsigned int FROM_MESSAGE + + # CallbackProgressKind: + cpdef readonly unsigned int NOT_INITIATED + cpdef readonly unsigned int PENDING + cpdef readonly unsigned int COMPLETE + + # deines.h: + cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + + def __cinit__(self): + + #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + self.CY_ECA_NORMAL = ECA_NORMAL + self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + self.CY_ECA_TOLARGE = ECA_TOLARGE + self.CY_ECA_TIMEOUT = ECA_TIMEOUT + self.CY_ECA_BADTYPE = ECA_BADTYPE + self.CY_ECA_INTERNAL = ECA_INTERNAL + self.CY_ECA_GETFAIL = ECA_GETFAIL + self.CY_ECA_PUTFAIL = ECA_PUTFAIL + self.CY_ECA_BADCOUNT = ECA_BADCOUNT + self.CY_ECA_BADSTR = ECA_BADSTR + self.CY_ECA_DISCONN = ECA_DISCONN + self.CY_ECA_DBLCHNL = ECA_DBLCHNL + self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + self.CY_ECA_BADMONID = ECA_BADMONID + self.CY_ECA_BADMASK = ECA_BADMASK + self.CY_ECA_IODONE = ECA_IODONE + self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + self.CY_ECA_NORDACCESS = ECA_NORDACCESS + self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + self.CY_ECA_NOCONVERT = ECA_NOCONVERT + self.CY_ECA_BADCHID = ECA_BADCHID + self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + self.CY_ECA_ISATTACHED = ECA_ISATTACHED + self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + + self.ICAFE_NORMAL = ICAFE_NORMAL + self.ICAFE_SUCCESS = ICAFE_SUCCESS + + self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + self.ICAFE_CS_CONN = ICAFE_CS_CONN + self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + + self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + + self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + + self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + + self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + + self.ECAFE_NODATA = ECAFE_NODATA + self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + self.ECAFE_BADSTR = ECAFE_BADSTR + self.ECAFE_BADTYPE = ECAFE_BADTYPE + self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + self.ECAFE_NULLCHID = ECAFE_NULLCHID + self.ECAFE_NULLEVID = ECAFE_NULLEVID + self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + + self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + + self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + + self.ERRNO_EINTR = ERRNO_EINTR + self.ERRNO_EAGAIN = ERRNO_EAGAIN + self.ERRNO_EFAULT = ERRNO_EFAULT + self.ERRNO_EINVAL = ERRNO_EINVAL + self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + + self.SEV_NO_ALARM = SEV_NO_ALARM + self.SEV_MINOR = SEV_MINOR + self.SEV_MAJOR = SEV_MAJOR + self.SEV_INVALID = SEV_INVALID + + self.STAT_NO_ALARM = STAT_NO_ALARM + self.STAT_READ = STAT_READ + self.STAT_WRITE = STAT_WRITE + self.STAT_HIHI = STAT_HIHI + self.STAT_HIGH = STAT_HIGH + self.STAT_LOLO = STAT_LOLO + self.STAT_LOW = STAT_LOW + self.STAT_STATE = STAT_STATE + self.STAT_COS = STAT_COS + self.STAT_COMM = STAT_COMM + self.STAT_TIMEOUT = STAT_TIMEOUT + self.STAT_HWLIMIT = STAT_HWLIMIT + self.STAT_CALC = STAT_CALC + self.STAT_SCAN = STAT_SCAN + self.STAT_LINK = STAT_LINK + self.STAT_SOFT = STAT_SOFT + self.STAT_BAD_SUB = STAT_BAD_SUB + self.STAT_UDF = STAT_UDF + self.STAT_DISABLE = STAT_DISABLE + self.STAT_SIMM = STAT_SIMM + self.STAT_READ_ACCESS = STAT_READ_ACCESS + self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + + self.CY_DBE_VALUE = DBE_VALUE + self.CY_DBE_LOG = DBE_LOG + self.CY_DBE_ARCHIVE = DBE_ARCHIVE + self.CY_DBE_ALARM = DBE_ALARM + self.CY_DBE_PROPERTY = DBE_PROPERTY + self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + self.CY_DBR_PLAIN = DBR_PLAIN + self.CY_DBR_STS = DBR_STS + self.CY_DBR_TIME = DBR_TIME + self.CY_DBR_GR = DBR_GR + self.CY_DBR_CTRL = DBR_CTRL + # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + self.CY_DBR_PUT = DBR_PUT + self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + self.CY_DBR_NONE = DBR_NONE + self.CY_DBR_STRING = DBR_STRING + self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + self.CY_DBR_INT = DBR_INT # returns an unsigned short + self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + # returns a string status structure (dbr_sts_string) + self.CY_DBR_STS_STRING = DBR_STS_STRING + # returns a short status structure (dbr_sts_short) + self.CY_DBR_STS_SHORT = DBR_STS_SHORT + # returns a short status structure (dbr_sts_int) + self.CY_DBR_STS_INT = DBR_STS_INT + # returns a float status structure (dbr_sts_float) + self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + # returns an enum status structure (dbr_sts_enum) + self.CY_DBR_STS_ENUM = DBR_STS_ENUM + # returns a char status structure (dbr_sts_char) + self.CY_DBR_STS_CHAR = DBR_STS_CHAR + # returns a long status structure (dbr_sts_long) + self.CY_DBR_STS_LONG = DBR_STS_LONG + # returns a double status structure (dbr_sts_double) + self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + # returns a string time structure (dbr_time_string) + self.CY_DBR_TIME_STRING = DBR_TIME_STRING + # returns a short time structure (dbr_time_short) + self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + # returns a short time structure (dbr_time_short) + self.CY_DBR_TIME_INT = DBR_TIME_INT + # returns a float time structure (dbr_time_float) + self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + # returns an enum time structure (dbr_time_enum) + self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + # returns a char time structure (dbr_time_char) + self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + # returns a long time structure (dbr_time_long) + self.CY_DBR_TIME_LONG = DBR_TIME_LONG + # returns a double time structure (dbr_time_double) + self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + # returns a graphic string structure (dbr_gr_string) + self.CY_DBR_GR_STRING = DBR_GR_STRING + # returns a graphic short structure (dbr_gr_short) + self.CY_DBR_GR_SHORT = DBR_GR_SHORT + # returns a graphic short structure (dbr_gr_int) + self.CY_DBR_GR_INT = DBR_GR_INT + # returns a graphic float structure (dbr_gr_float) + self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + # returns a graphic enum structure (dbr_gr_enum) + self.CY_DBR_GR_ENUM = DBR_GR_ENUM + # returns a graphic char structure (dbr_gr_char) + self.CY_DBR_GR_CHAR = DBR_GR_CHAR + # returns a graphic long structure (dbr_gr_long) + self.CY_DBR_GR_LONG = DBR_GR_LONG + # returns a graphic double structure (dbr_gr_double) + self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + # returns a control string structure (dbr_ctrl_int) + self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + # returns a control short structure (dbr_ctrl_short) + self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + # returns a control short structure (dbr_ctrl_int) + self.CY_DBR_CTRL_INT = DBR_CTRL_INT + # returns a control float structure (dbr_ctrl_float) + self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + # returns a control enum structure (dbr_ctrl_enum) + self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + # returns a control char structure (dbr_ctrl_char) + self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + # returns a control long structure (dbr_ctrl_long) + self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + # returns a control double structure (dbr_ctrl_double) + self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE + + # ctypedef enum ChannelRequestPolicyKind: + self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + + # ChannelFlushSendBufferPolicyKind: + self.WITH_FLUSH_IO = WITH_FLUSH_IO + self.WITH_PEND_IO = WITH_PEND_IO + self.WITH_PEND_EVENT = WITH_PEND_EVENT + self.WITH_POLL = WITH_POLL + + # ChannelWhenToFlushSendBufferPolicyKind: + self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + self.FLUSH_NOW = FLUSH_NOW + self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + + # ChannelGetCacheWaitPolicyKind: + self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + self.GET_CACHE_NOW = GET_CACHE_NOW + self.GET_CACHE_WAIT = GET_CACHE_WAIT + + # ChannelGetActionWhenMonitorPolicyKind: + self.GET_FROM_CACHE = GET_FROM_CACHE + self.GET_FROM_IOC = GET_FROM_IOC + + # ChannelRequestDataTypePolicyKind: + self.NATIVE_DATATYPE = NATIVE_DATATYPE + # The smaller in byte size of type requested and native datatype + self.LOWEST_DATATYPE = LOWEST_DATATYPE + + # ChannelWaitForResponsePolicyKind: + self.BLOCKING = BLOCKING + self.WAIT = WAIT + self.NON_BLOCKING = NON_BLOCKING + self.NO_WAIT = NO_WAIT + + # StatusMessageKind: + self.NO_MESSAGE = NO_MESSAGE + self.PRE_REQUEST = PRE_REQUEST + self.FROM_REQUEST = FROM_REQUEST + self.FROM_PEND = FROM_PEND + self.FROM_CALLBACK = FROM_CALLBACK + self.FROM_MESSAGE = FROM_MESSAGE + + # CallbackProgressKind: + self.NOT_INITIATED = NOT_INITIATED + self.PENDING = PENDING + self.COMPLETE = COMPLETE + + # deines.h: + self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS + return + + +cdef class channelInfo: + cdef readonly long channelID + cdef readonly bint connectFlag + cdef readonly string hostName + cdef readonly unsigned int nelem # native + cdef readonly int dataType # native + cdef readonly string dataTypeAsString # native + cdef readonly unsigned short accessRead # 0 or 1 + cdef readonly unsigned short accessWrite # 0 or 1 + cdef readonly string className # dbr_class_name_t + cdef readonly int connectionState # as given by CA_OP_ + cdef readonly int cafeConnectionState # as given by cafe_cs_state + cdef readonly string connectionStateAsString # as given by CA_OP_ + # as given by cafe_cs_state + cdef readonly string cafeConnectionStateAsString + cdef CAFEDataTypeCode cdt + cdef CAFEStatusCode csc + cdef CAOPCodes caop + + def __cinit__(self): + self.channelID = 0 + self.connectFlag = False + self.hostName = (< bytes > ("")).encode('UTF-8') + self.nelem = 0 + self.dataType = ICAFE_TYPENOTCONN + self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + self.accessRead = 0 + self.accessWrite = 0 + self.className = (< bytes > ("")).encode('UTF-8') + self.connectionState = ICAFE_CA_OP_CONN_DOWN + self.cafeConnectionState = ICAFE_CS_NEVER_CONN + self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + + def show(self): + print("channelID = %s" % hex(self.channelID)) + print("connectFlag = %d" % self.connectFlag) + print("hostName = %s" % self.hostName) + print("nelem = %d" % self.nelem) + print("dataType = %s (%d)" % + (self.cdt.message(self.dataType), self.dataType)) + print("accessRead = %d" % self.accessRead) + print("accessWrite = %d" % self.accessWrite) + print("className = %s" % self.className) + #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + print("connectionState = %s (%d)" % + (self.caop.message(self.connectionState), self.connectionState)) + print("cafeConnectionState = %s (%d)" % (self.csc.message( + self.cafeConnectionState), self.cafeConnectionState)) + return + + +################################################################################## +''' +cdef class _epicsTimeStampAsDate: + cdef epicsTime * _time + cdef local_tm_nano_sec local + cdef list etsDate + def __cinit__(self, epicsTimeStamp ts): + + self._time = new epicsTime(ts) + #This gives warning: dereferencing type-punned pointer will break strict-aliasing rules + self.local = self._time + ##April 2020 to avoid above warning + ##cdef local_tm_nano_sec * _local = malloc(sizeof(epicsTime)) + ##_local = self._time + ##self.local = _local[0] # self._time + + print ("ts===== ", ts.secPastEpoch, ts.nsec) + print ("year=== ", ( ( (&(&self.local).ansi_tm).tm_year) + 1900)) + + self.etsDate=[] + self.etsDate.append( (self.local.ansi_tm.tm_year + 1900)) + self.etsDate.append( (self.local.ansi_tm.tm_mon + 1)) + self.etsDate.append( self.local.ansi_tm.tm_mday) + self.etsDate.append( self.local.ansi_tm.tm_hour) + self.etsDate.append( self.local.ansi_tm.tm_min) + self.etsDate.append( self.local.ansi_tm.tm_sec) + self.etsDate.append( ts.nsec) + self.etsDate.append( self.local.nSec) + del self._time + ###free(_local) + def get(self): + return self.etsDate +''' + +################################################################################## + +################################################################################## +cdef class pvctrl: + cdef readonly unsigned int nelem + cdef readonly int alarmStatus + cdef readonly int alarmSeverity + cdef readonly unsigned short precision + cdef readonly string units + cdef readonly unsigned short noEnumStrings + cdef readonly list enumStrings + cdef readonly upperDisplayLimit + cdef readonly lowerDisplayLimit + cdef readonly upperAlarmLimit + cdef readonly upperWarningLimit + cdef readonly lowerWarningLimit + cdef readonly lowerAlarmLimit + cdef readonly upperControlLimit + cdef readonly lowerControlLimit + cdef readonly list value + cdef readonly int status + cdef readonly tuple pythonVersion + + def __cinit__(self): + self.nelem = 1 + self.alarmStatus = -1 + self.alarmSeverity = -1 + self.precision = 0 + self.units = (< bytes > ("")).encode('UTF-8') + self.noEnumStrings = 0 + self.enumStrings = [] + self.upperDisplayLimit = 0 + self.lowerDisplayLimit = 0 + self.upperAlarmLimit = 0 + self.lowerAlarmLimit = 0 + self.upperControlLimit = 0 + self.lowerControlLimit = 0 + self.value = [] + self.status = 1 + self.pythonVersion = sys.version_info[0:4] + + def show(self): + self.showPrint(self.nelem) + return + + def showMax(self, nelem): + if nelem > self.nelem: + # print ("----------------------" + # print ("Note: Max. Nelem =", self.nelem + # print ("----------------------" + nelem = self.nelem + self.showPrint(nelem) + return + + cdef showPrint(self, nelem): + cdef unsigned int i + # is self.value[0] a list + if nelem == 1: + if isinstance(self.value[0], list): + if self.pythonVersion[0] < 3: + print("value =", self.value[0][0]) + + else: + print("value = ", self.value[0][0], end="") + else: + if self.pythonVersion[0] < 3: + print("value =", self.value[0]) + + else: + print("value =", self.value[0], end="" ) + else: + print("value = ", end="") + if self.pythonVersion[0] < 3: + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i) + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i) + + else: + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i, end=" ") + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i, end=" ") + + print("") + print("status = %d" % self.status) + print("alarmStatus = %d" % self.alarmStatus) + print("alarmSeverity = %d" % self.alarmSeverity) + + if self.noEnumStrings > 0: + print("noEnumStrings = %d" % self.noEnumStrings) + print("enumStrings =", end=" ") # end for same line + for i in range(0, self.noEnumStrings): + print(self.enumStrings[i], "[%s]" % i, end=" ") + print("") + else: + print("precision = %d" % self.precision) + print("units = %s" % self.units) + print("upperDisplayLimit = %f" % self.upperDisplayLimit) + print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + print("upperAlarmLimit = %f" % self.upperAlarmLimit) + print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + print("upperWarningLimit = %f" % self.upperWarningLimit) + print("lowerWarningLimit = %f" % self.lowerWarningLimit) + print("upperControlLimit = %f" % self.upperControlLimit) + print("lowerControlLimit = %f" % self.lowerControlLimit) + + return +################################################################################## + +cdef class CyCafeException: + cdef readonly str type + cdef readonly str source + cdef readonly int handle + cdef readonly str pv_name + cdef readonly int error_code + cdef readonly str error_text + cdef readonly str error_info + + def __cinit__(self, _type='cycafe', _source=None, _handle=0, _pv=None, _ec=-1, _et=None, _ei=None): + self.type = _type + self.source = _source + self.handle = _handle + self.pv_name = _pv + self.error_code = _ec + self.error_text = _et + self.error_info = _ei + + def formatStatusCode(self): + statusMsg = self.errorText + " (" + str(self.errorCode) + ")" + return str(statusMsg) + + def show(self): + print("------CyCafeException-----------------------------------------------------") + print("raised from CyCafe method:", self.source) + if (self.handle != 0): + print("pv_name =", self.pv_name, "( handle =", + self.handle, ") reports the following error:") + print("error_code:", self.error_code, "error_text:", + self.error_text, "\nerror_info:", self.error_info) + elif self.type == 'cafe': + print("pv_name =", self.pv, "( handle =", + self.handle, ") reports the following error:") + print("error_code:", self.error_code, "error_text:", + self.error_text, "\nerror_info:", self.error_info) + else: + print("error_info:", self.error_info) + print("------------------------------------------------------------------------") + return + + def reveal(self): + print("------CyCafeException-----------------------------------------------------") + if(self.type): + print(".type =", self.type) + print(".source =", self.source) + if (self.handle != 0): + print(".handle =", self.handle) + if (self.pv_name): + print(".pv_name =", self.pv_name) + if (self.error_code != -1): + print(".error_code =", self.error_code) + if (self.error_text): + print(".error_text =", self.error_text) + print(".error_info =", self.error_info) + print("------------------------------------------------------------------------") + return + + +cdef class monitorpolicy: + cdef readonly chtype dataType + cdef readonly chtype dbrDataType + cdef readonly DBR_TYPE cafeDbrType + cdef readonly unsigned int nelem + cdef readonly unsigned int mask + # cdef readonly pCallback handler + cdef readonly unsigned int userArgs + # cdef readonly evid eventID + cdef readonly int status + cdef readonly unsigned int monid + cdef readonly bint maskHasDBE_PROPERTY + cdef readonly bint maskHasDBE_VALUE + cdef readonly bint maskHasDBE_LOG + cdef readonly bint maskHasDBE_ALARM + + def __cinit__(self): + self.monid = 0 + # self.dataType=None + # self.dbrDataType=None + # self.cafeDbrType=None + self.nelem = 1 + # self.mask=None + # self.userArgs=None + self.status = ICAFE_NORMAL + self.maskHasDBE_PROPERTY = False + self.maskHasDBE_VALUE = False + self.maskHasDBE_LOG = False + self.maskHasDBE_ALARM = False + + def show(self): + print("monid =", self.monid) + print("datatype =", self.dataType) + print("dbrDataType=", self.dbrDataType) + print("cafeDbrType=", self.cafeDbrType) + print("nelem =", self.nelem) + print("mask =", self.mask) + print("userArgs =", < long > self.userArgs) + print("status =", self.status) + print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + return + + +################################################################################## +cdef class pvdata: + cdef readonly unsigned int nelem + cdef readonly int alarmStatus + cdef readonly int alarmSeverity + cdef readonly str alarmStatusAsString + cdef readonly str alarmSeverityAsString + cdef readonly list ts + cdef readonly list tsDate + cdef readonly str tsDateAsString + cdef readonly str bsDateAsString + cdef readonly list value + cdef readonly int status + cdef readonly str statusAsString + cdef readonly unsigned long long pulseID + cdef readonly int dataType + cdef readonly str dataTypeAsString + + cdef readonly tuple pythonVersion + + def __cinit__(self): + self.nelem = 1 + self.alarmStatus = -1 + self.alarmSeverity = -1 + self.ts = [] + self.tsDate = [] + self.tsDateAsString = '' + self.bsDateAsString = '' + self.value = [] + self.status = 1 + self.statusAsString = 'ICAFE_NORMAL' + self.pulseID = 0 + self.dataType = -1 + self.dataTypeAsString = "" + self.pythonVersion = sys.version_info[0:4] + + def show(self): + self.showPrint(self.nelem) + return + + def showMax(self, nelem): + if nelem > self.nelem: + # print ("----------------------" + # print ("Note: Max. Nelem =", self.nelem + # print ("----------------------" + nelem = self.nelem + + self.showPrint(nelem) + return + + cdef showPrint(self, nelem): + cdef unsigned int i + # is self.value[0] a list + + if self.pythonVersion[0] < 3: + + if nelem == 1: + if isinstance(self.value[0], list): + print("value =", + self.value[0][0], "(", self.dataTypeAsString, ")") + else: + print("value =", + self.value[0], "(", self.dataTypeAsString, ")") + else: + print("value = "), + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i) + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i) + + else: + + if nelem == 1: + if isinstance(self.value[0], list): + #print ("value =", self.value[0][0], "(",self.dataTypeAsString,")", end="") + print("value = {} ({})".format( + self.value[0][0], self.dataTypeAsString), end="") + else: + #print ("value =", self.value[0], "(",self.dataTypeAsString,")", end="") + print("value = {} ({})".format( + self.value[0], self.dataTypeAsString), end="") + else: + print("value = ", end="") + + if isinstance(self.value[0], list): + for i in range(0, nelem): + print(self.value[0][i], "[%d]" % i, end=" ") + else: + for i in range(0, nelem): + print(self.value[i], "[%d]" % i, end=" ") + #print("(",self.dataTypeAsString,")" , end=" ") + print("({0})".format(self.dataTypeAsString)) + + print("") + #print ("status = %d" % self.status) + print("status = %d (%s)" % (self.status, self.statusAsString)) + if self.alarmStatus != -1: + print("alarmStatus = %d (%s)" % + (self.alarmStatus, self.alarmStatusAsString)) + print("alarmSeverity = %d (%s)" % + (self.alarmSeverity, self.alarmSeverityAsString)) + # if self.ts[0] != 0: + print("ts =", self.ts[0], self.ts[1]) + print("tsDate =", self.tsDate[0], self.tsDate[1], + self.tsDate[2], self.tsDate[3], + self.tsDate[4], self.tsDate[5], self.tsDate[6]) + if self.pulseID > 0: + print("pulseID =", self.pulseID) + return + +################################################################################## + + +################################################################################## +cdef class pvgroup: + cdef public list pvdata + cdef public unsigned int npv + cdef public string name + cdef readonly int groupStatus + cdef public unsigned int groupHandle + cpdef public bint rule + cpdef public bint hasAlarm + cpdef public bint hasTS + + cdef tuple pythonVersion + + def __cinit__(self): + self.groupStatus = ICAFE_NORMAL + self.rule = True + self.hasAlarm = True + self.hasTS = True + self.pythonVersion = sys.version_info[0:4] + return + + def show(self): + self.showPrint(npv=self.npv, grouplist=None) + return + + def showWithPV(self, glist): + if len(glist) != self.npv: + print("ERROR: GROUP MEMBER MISMATCH!!") + print(glist, "has", len(glist), + "members while group has", self.npv, "!!") + return + self.showPrint(self.npv, grouplist=glist) + return + + def showMax(self, _npv): + if _npv > self.npv: + # print ("----------------------" + # print ("Note: Max. Npv =", self.npv + # print ("----------------------" + _npv = self.npv + self.showPrint(npv=_npv, grouplist=None) + return + + cdef showPrint(self, npv, grouplist): + print("GROUP NAME = ", self.name) + print("GROUP HANDLE = ", self.groupHandle) + print("GROUP STATUS = ", self.groupStatus) + cdef unsigned int i, j + # if nelem==1: + # print "value =", self.value[0], + # else: + + for i in range(0, npv): + print("Member: ", i, "---------------------------------") + if grouplist: + print("PV =", grouplist[i]) + + if self.pythonVersion[0] < 3: + print("value = ") + for j in range(0, len(self.pvdata[i].value)): + print(self.pvdata[i].value[j], "[%d]" % j) + + else: + + print("value = ", end="") + for j in range(0, len(self.pvdata[i].value)): + print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + + print("") + print("status = %d (%s)" % + (self.pvdata[i].status, self.pvdata[i].statusAsString)) + print("alarmStatus = %d (%s)" % ( + self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + print("alarmSeverity = %d (%s)" % ( + self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + print("ts =", + self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + print("--------------------------------------------") + return + + ''' + cdef showPrintWithPVName(self, npv, pvlist): + print ("GROUP NAME = ", self.name) + print ("GROUP HANDLE = ", self.groupHandle) + print ("GROUP STATUS = ", self.groupStatus) + cdef unsigned int i,j + + for i in range(0, npv): + print ("pv =", pvlist[i]) + for j in range(0, len(self.pvdata[i].value)): + print (self.pvdata[i].value[j],"[%d]" %j,) + print ("") + print ("status = %d " % self.pvdata[i].status) + print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) + print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) + print ("ts =", self.pvdata[i].ts[0], self.pvdata[i].tsDate[1]) + print ("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], \ + self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3],\ + self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + return + ''' +################################################################################## + + +################################################################################## +cdef getMatchedDataType(dt, dtn): + # dt: input from user + # dtn: native type + # dtcheck: matching data type for pvd convert method + + cdef unsigned int dtcheck = dtn + + if dt in ['uchar', 'uint8']: + dtcheck = CAFE_CHAR + elif dt in ['np.uint8']: + dtcheck = CAFE_CHAR + elif dt in ['ushort', 'uint16']: + dtcheck = CAFE_USHORT + elif dt in ['np.ushort', 'np.uint16']: + dtcheck = CAFE_USHORT + elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + dtcheck = CAFE_SHORT + elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + dtcheck = CAFE_SHORT + elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + dtcheck = CAFE_LONG + elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + dtcheck = CAFE_LONG + elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + dtcheck = CAFE_DOUBLE + elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + dtcheck = CAFE_DOUBLE + elif dt in ['float16', 'float32']: + dtcheck = CAFE_FLOAT + elif dt in ['np.float16', 'np.float32']: + dtcheck = CAFE_FLOAT + elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + dtcheck = CAFE_STRING + elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + dtcheck = CAFE_STRING + elif dt in ['native', '']: + dtcheck = dtn # need a line here + else: + print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + print("Data to be presented in native data type") + + return dtcheck +################################################################################## + + +################################################################################# + +# cdef pvdata p1 = pvdata() +# cdef pvctrl c1 = pvctrl() + + +################################################################################# + +cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): + + cdef CAFEDataTypeCode cdt + #global p1 + cdef pvdata p1 = pvdata() + + cdef unsigned int dtn = pvd.getDataType() + cdef unsigned int dtcheck = dtn + cdef localList = [] + + if dt: + dtcheck = getMatchedDataType(dt, dtn) + + if dtcheck == CAFE_STRING: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsString(i)) + elif dtcheck == CAFE_SHORT: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsLong(i)) # getAsShort(i) + elif dtcheck == CAFE_FLOAT: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + # if self._c_cafe.isEnum(handle)==1: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsString(i)) + # else: + # for i in range(0, pvd.getNelem()): + # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + elif dtcheck == CAFE_CHAR: + for i in range(0, pvd.getNelem()): + # pvd.getAsChar(i) + localList.append(pvd.getAsLong(i)) + elif dtcheck == CAFE_LONG: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsLong(i)) + elif dtcheck == CAFE_DOUBLE: + for i in range(0, pvd.getNelem()): + localList.append(pvd.getAsDouble(i)) + else: + localList.append(0) + # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + # print ("No Data! Error. Is channel connected?" + + p1.value = localList + p1.status = pvd.getStatus() + p1.statusAsString = pvd.getStatusAsString() + p1.nelem = pvd.getNelem() + p1.alarmStatus = pvd.getAlarmStatus() + p1.alarmSeverity = pvd.getAlarmSeverity() + + p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + + p1.pulseID = pvd.getPulseID() + + p1.dataType = pvd.getDataType() + p1.dataTypeAsString = cdt.message(pvd.getDataType()) + + p1.tsDateAsString = pvd.getEpicsTimeStampAsString() + p1.bsDateAsString = pvd.getBSTimeStampAsString() + + pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() + + cpdef ll = [] + ll.append((pvd._etsNorm).secPastEpoch) + ll.append((pvd._etsNorm).nsec) + p1.ts = ll + + pvd._etsDate = pvd.getEpicsTimeStampAsDate() + + cpdef ld = [] + ld.append((pvd._etsDate).year) + ld.append((pvd._etsDate).mon) + ld.append((pvd._etsDate).day) + ld.append((pvd._etsDate).hour) + ld.append((pvd._etsDate).min) + ld.append((pvd._etsDate).sec) + ld.append((pvd._etsDate).nsec) + p1.tsDate = ld + + return p1 +################################################################################## + + +################################################################################# + +cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): + + #global c1 + cdef pvctrl c1 = pvctrl() + + cdef unsigned int dtn = pvc.getDataType() + + cdef unsigned int dtcheck = dtn + + cdef localList = [] + + if dt: + dtcheck = getMatchedDataType(dt, dtn) + + if dtcheck == CAFE_STRING: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsString(i)) + elif dtcheck == CAFE_SHORT: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsLong(i)) # getAsShort(i) + elif dtcheck == CAFE_FLOAT: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + elif dtcheck == CAFE_ENUM: + # if enum, string taken as native + # if self._c_cafe.isEnum(handle)==1: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsString(i)) + # else: + # for i in range(0, pvd.getNelem()): + # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + elif dtcheck == CAFE_CHAR: + for i in range(0, pvc.getNelem()): + # pvd.getAsChar(i) + localList.append(pvc.getAsLong(i)) + elif dtcheck == CAFE_LONG: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsLong(i)) + elif dtcheck == CAFE_DOUBLE: + for i in range(0, pvc.getNelem()): + localList.append(pvc.getAsDouble(i)) + else: + localList.append(0) + # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + # print ("No Data! Error. Is channel connected?" + c1.value = localList + c1.status = pvc.getStatus() + c1.nelem = pvc.getNelem() + c1.alarmStatus = pvc.getAlarmStatus() + c1.alarmSeverity = pvc.getAlarmSeverity() + + c1.precision = pvc.getPrecision() + c1.noEnumStrings = pvc.getNoEnumStrings() + + enumList = [] + for i in range(0, pvc.getNoEnumStrings()): + enumList.append(pvc.getEnumStrings()[i]) + + c1.enumStrings = enumList + + c1.units = pvc.getUnitsAsString() + + c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + + return c1 +################################################################################## + + +################################################################################# + +cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): + + cdef channelInfo ci = channelInfo() + cdef CAFEDataTypeCode cdt + + ci.channelID = ( < long > cr.getChannelID()) + ci.connectFlag = cr.getConnectFlag() + ci.hostName = cr.getHostNameAsString() + ci.dataType = cr.getDataType() + ci.dataTypeAsString = cdt.message(cr.getDataType()) + ci.className = cr.getClassNameAsString() + ci.accessRead = cr.getAccessRead() + ci.accessWrite = cr.getAccessWrite() + ci.nelem = cr.getNelem() + ci.connectionState = cr.getConnectionState() + ci.cafeConnectionState = cr.getCafeConnectionState() + ci.connectionStateAsString = cr.getConnectionStateAsString() + ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + return ci +################################################################################# + + +cdef class bschannel: + cdef readonly string name + cdef readonly string type + cdef readonly int modulo + cdef readonly int offset + cdef readonly unsigned int nelem + cdef readonly bint BSEnabled + + def __cinit__(self): + self.name = (< bytes > ("")).encode('UTF-8') + self.type = (< bytes > ("")).encode('UTF-8') + self.modulo = 1 + self.offset = 0 + self.nelem = 1 + self.BSEnabled = False + +cdef class BSData: + cdef readonly string htype + cdef readonly unsigned long long pulse_id + cdef readonly list BSChannel + cdef readonly list pv + cdef readonly dict pvIdx + cdef readonly list handle + cdef readonly list global_timestamp + cdef readonly list gtsDate + cdef readonly bint isBS + cdef readonly unsigned int nPV + cdef readonly unsigned int nBSEnabled + cdef readonly unsigned short nhwm + cdef readonly int timeoutMS + cdef readonly unsigned int nChannels + cdef readonly unsigned int nNullData + cdef readonly float pGoodData + cdef readonly int status + cdef readonly str statusAsString + cdef bint daqStop + + cdef readonly list hasNewData + cdef readonly list pvdata + + def __cinit__(self): + self.pulse_id = 0 + self.htype = (< bytes > ("")).encode('UTF-8') + self.BSChannel = [] + self.pv = [] + self.handle = [] + self.global_timestamp = [] + self.gtsDate = [] + self.isBS = False + self.nPV = 0 + self.nBSEnabled = 0 + self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + self.nChannels = 0 # Diagnostics + self.nNullData = 0 + self.pGoodData = 0 + self.status = ICAFE_NORMAL + self.statusAsString = 'ICAFE_NORMAL' + self.daqStop = False + self.hasNewData = [] + + def __copy__(self): + return self + + def __deepcopy__(self, memo): + cdef BSData res = BSData() + cpdef p1List = [] + cpdef bscList = [] + + res.htype = self.htype + res.pulse_id = self.pulse_id + res.pv = deepcopy(self.pv) + res.handle = deepcopy(self.handle) + res.isBS = self.isBS + + #res.pvIdx = dict([(self.pv[i], i) for i in range(0,len(self.pv))] ) + + res.pvIdx = deepcopy(self.pvIdx) + + # print(res.pvIdx.items()) + + res.global_timestamp = deepcopy(self.global_timestamp) + res.gtsDate = deepcopy(self.gtsDate) + + res.hasNewData = deepcopy(self.hasNewData) + + res.nPV = self.nPV + res.timeoutMS = self.timeoutMS + res.nhwm = self.nhwm + res.status = self.status + res.statusAsString = self.statusAsString + + res.nChannels = self.nChannels + res.nNullData = self.nNullData + res.pGoodData = self.pGoodData + + res.daqStop = self.daqStop + + lenPV = len(self.pvdata) + + # Should never happen + if lenPV != len(self.BSChannel): + print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + if lenPV > len(self.BSChannel): + lenPV = len(self.BSChannel) + + for i in range(0, lenPV): + + # for i in range(0,len(self.BSChannel)): + bsc = bschannel() + bsc.name = self.BSChannel[i].name + bsc.type = self.BSChannel[i].type + bsc.modulo = self.BSChannel[i].modulo + bsc.offset = self.BSChannel[i].offset + bsc.nelem = self.BSChannel[i].nelem + bsc.BSEnabled = self.BSChannel[i].BSEnabled + + bscList.append(bsc) + + # res.BSChannel=bscList + + # for i in range(0,len(self.pvdata)): + + p1 = pvdata() + # value=[] + # value.append(self.pvdata[i].value[0]) + # p1.value.append(value) + p1.value = deepcopy(self.pvdata[i].value) + p1.status = self.pvdata[i].status + p1.statusAsString = self.pvdata[i].statusAsString + p1.nelem = self.pvdata[i].nelem + p1.alarmStatus = self.pvdata[i].alarmStatus + p1.alarmSeverity = self.pvdata[i].alarmSeverity + p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + p1.pulseID = self.pvdata[i].pulseID + p1.dataType = self.pvdata[i].dataType + p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + p1.tsDateAsString = self.pvdata[i].tsDateAsString + p1.bsDateAsString = self.pvdata[i].bsDateAsString + p1.ts = deepcopy(self.pvdata[i].ts) + p1.tsDate = deepcopy(self.pvdata[i].tsDate) + + p1List.append(p1) + + res.pvdata = p1List + res.BSChannel = bscList + + # for i in range(0,len(res.pvdata)): + # res.pvdata[i].show() + + return res + + def compare(self, list _pvdata): + self.hasNewData = [0]*len(self.pv) + cdef unsigned short newDataFlag = 0 + + for i in range(0, len(self.pv)): + if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: + self.hasNewData[i] = 1 + newDataFlag = 1 + elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + self.hasNewData[i] = 1 + newDataFlag = 1 + # Catch disconnect events(!!) and set newDataFlag only + elif self.pvdata[i].status != _pvdata[i].status: + newDataFlag = 1 + return newDataFlag + + def getIdxFromPVName(self, str _name): + for i in range(0, len(self.pv)): + if _name == self.pv[i]: + return i + return -1 + + def getDaqStop(self): + return self.daqStop + + def setDaqStop(self, bint ds): + self.daqStop = ds + + def getVal(self, iElem=None): + + cdef int idx = -1 + + if isinstance(iElem, (str)): + # iElem=self.getIdxFromPVName(iElem) + iElem = self.pvIdx.get(iElem) + if iElem is None: + return None + idx = iElem + elif isinstance(iElem, (int, long)): + if iElem < 0: + print("Invalid input:", iElem, "Idx must be non-negative!") + return None + idx = iElem + + if iElem is not None: + if len(self.pvdata[idx].value) == 1: + return self.pvdata[idx].value[0] + else: + return self.pvdata[idx].value + vall = [] + for i in range(0, self.nPV): + if len(self.pvdata[i].value) == 1: + vall.append(self.pvdata[i].value[0]) + else: + vall.append(self.pvdata[i].value) + return vall + + def getPV(self, iElem=None): + + cdef int idx = -1 + + if isinstance(iElem, (str)): + iElem = self.pvIdx.get(iElem) + if iElem is None: + return None + idx = iElem + elif isinstance(iElem, (int, long)): + if iElem < 0: + print("Invalid input:", iElem, " Idx must be non-negative!") + return None + idx = iElem + + if iElem is not None: + return self.pvdata[idx] + vall = [] + for i in range(0, self.nPV): + vall.append(self.pvdata[i]) + return vall + + def show(self, str BSCA=None, int wf=1): + + for i in range(0, self.nPV): + + if self.BSChannel[i].BSEnabled and self.isBS: + if BSCA in (None, 'BS'): + print("---------------------------------") + print("pv= %s [%d] BS" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + else: + if BSCA in (None, 'CA'): + print("---------------------------------") + print("pv= %s [%d] CA" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + print("---------------------------------") + print("overallStatus = %d (%s)" % + (self.status, self.statusAsString)) + print("pulse_id = %d" % self.pulse_id) + print("global_timestamp = %d sec. %d nsec" % + (self.global_timestamp[0], self.global_timestamp[1])) + print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + self.gtsDate[6])) + print("nPV = %d" % self.nPV) + if self.isBS: + print("of which BS = %d (Percentage with data = %f)" % + (self.nChannels, float(self.pGoodData))) + print("of which CA = %d" % (self.nPV - self.nChannels)) + else: + print("of which CA = %d (i.e., all)" % (self.nPV) ) + print("---------------------------------") + return + + def showAll(self, int wf=1): + + for i in range(0, self.nPV): + print("---------------------------------") + if self.BSChannel[i].BSEnabled and self.isBS: + print("pv= %s [%d] BS" % (self.pv[i], i)) + else: + print("pv= %s [%d] CA" % (self.pv[i], i)) + if wf > 1: + self.pvdata[i].showMax(wf) + else: + self.pvdata[i].show() + print("---------------------------------") + print("overallStatus = %d (%s)" % + (self.status, self.statusAsString)) + print("pulse_id = %d" % self.pulse_id) + print("global_timestamp = %d sec. %d nsec" % + (self.global_timestamp[0], self.global_timestamp[1])) + print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + self.gtsDate[6])) + print("nPV = %d" % self.nPV) + if self.isBS: + print("of which BS = %d (Percentage with data = %f)" % + (self.nChannels, float(self.pGoodData))) + print("of which CA = %d" % (self.nPV-self.nChannels)) + else: + print("of which CA = %d (i.e., all)" % (self.nPV) ) + print("pvIdx = ", self.pvIdx) + print("pv = ", self.pv) + print("handle = ", self.handle) + print("isBS = %d" % self.isBS) + #print ("nBSEnabled = %d" % self.nBSEnabled) + print("nhwm = %d" % self.nhwm) + print("timeoutMS = %d" % self.timeoutMS) + print("nChannels = %d" % self.nChannels) + print("nNullData = %d" % self.nNullData) + print("pGoodData = %f" % float(self.pGoodData)) + print("---------------------------------") + return + + +cdef class SFDBPMData: + cdef readonly list x + cdef readonly list y + cdef readonly list q + cdef readonly list Energy + cdef readonly list xStatus + cdef readonly list yStatus + cdef readonly list qStatus + cdef readonly list EnergyStatus + + # cdef readonly list offs_x + # cdef readonly list offs_y + + cdef readonly bint isAllXOK + cdef readonly bint isAllYOK + cdef readonly bint isAllQOK + cdef readonly bint isAllOK + cdef readonly list device + cdef readonly int status + + def __cinit__(self): + self.isAllOK = False + self.isAllXOK = False + self.isAllYOK = False + self.isAllQOK = False + self.x = [] + self.y = [] + self.q = [] + self.Energy = [] + self.xStatus = [] + self.yStatus = [] + self.qStatus = [] + self.EnergyStatus = [] + self.device = [] + + # self.offs_x=[] + # self.offs_y=[] + + +################################################################################# + +cdef SFDBPMData dbpmHolderToStruct(DBPMKeeper d): + cdef SFDBPMData dbpm = SFDBPMData() + + cdef unsigned int i + + # double [::1] mvDouble + #mvDouble = np.empty(d.getX().size(), dtype=np.float64) + # for ij in range(0, d.getX().size()): + # mvDouble[ij]=d.getX()[i] + # dbpm.x=np.array(mvDouble) + + for i in range(0, d.getX().size()): + + dbpm.x.append(d.getX()[i].getValue()) + dbpm.y.append(d.getY()[i].getValue()) + dbpm.q.append(d.getQ()[i].getValue()) + dbpm.Energy.append(d.getEnergy()[i].getValue()) + dbpm.xStatus.append(d.getX()[i].getStatus()) + dbpm.yStatus.append(d.getY()[i].getStatus()) + dbpm.qStatus.append(d.getQ()[i].getStatus()) + dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) + + dbpm.isAllXOK = d.getIsAllXOK() + dbpm.isAllYOK = d.getIsAllYOK() + dbpm.isAllQOK = d.getIsAllQOK() + dbpm.isAllOK = d.getIsAllOK() + dbpm.status = d.getStatus() + return dbpm + +################################################################################# + + +################################################################################# + +cdef BSDataHolderToStruct(BSDataHolder b): + + cdef BSData bsd = BSData() + cdef vector[PVDataHolder] pvd + cdef unsigned int i + cdef etsNorm _etsNorm + cdef etsDate _etsDate + cdef HandleHelper hh + cdef CAFEStatusCode csc + localListToStruct = [] + localBSCToStruct = [] + + bsd.pulse_id = b.getPulse_id() + bsd.pv = b.getPV() + bsd.handle = b.getHandles() + bsd.isBS = b.getIsBS() + + bsd.pvIdx = dict([(bsd.pv[i], i) for i in range(0, len(bsd.pv))]) + + # print(bsd.pvIdx.items()) + + _etsNorm = b.getGlobal_timestamp() + + #print ("pulse_id " , b.getPulse_id()) + #print ("gto ", b.getGlobal_timestamp()) + + cpdef ll = [] + ll.append(_etsNorm.secPastEpoch) + ll.append(_etsNorm.nsec) + bsd.global_timestamp = ll + + _etsDate = hh.unixTimeToDate(_etsNorm) + cpdef ld = [] + ld.append(_etsDate.year) + ld.append(_etsDate.mon) + ld.append(_etsDate.day) + ld.append(_etsDate.hour) + ld.append(_etsDate.min) + ld.append(_etsDate.sec) + ld.append(_etsDate.nsec) + + bsd.gtsDate = ld + + bsd.isBS = b.getIsBS() + bsd.nPV = b.getNPV() + bsd.timeoutMS = b.getTimeout() + bsd.nhwm = b.getHWM() + + bsd.status = b.getStatus() + bsd.statusAsString = csc.msgIDAsString(bsd.status) + + pvd = b.getPVDataV() + cpdef lt = [] + cpdef bscList = [] + + # Would be quicker to have p1 = pvdata() outside loop - check this + for i in range(0, pvd.size()): + p1 = pvdata() + p1 = PVDataHolderToStruct(pvd[i], dt='native') + + #print ("a: ", p1.tsDate) + lt = [] + bsc = bschannel() + + if b.getBSChannel(i).isBSEnabled() and bsd.isBS: + bsc.BSEnabled = True + _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) + else: + _etsDate = pvd[i].getEpicsTimeStampAsDate() + lt.append(_etsDate.year) + lt.append(_etsDate.mon) + lt.append(_etsDate.day) + lt.append(_etsDate.hour) + lt.append(_etsDate.min) + lt.append(_etsDate.sec) + lt.append(_etsDate.nsec) + p1.tsDate = lt + #print ("b: ", p1.tsDate) + localListToStruct.append(p1) + localBSCToStruct.append(bsc) + + bsd.pvdata = localListToStruct + bsd.BSChannel = localBSCToStruct + + bsd.nChannels = b.getNChannels() + bsd.nNullData = b.getNNullData() + bsd.pGoodData = b.getPGoodData() + + bsd.daqStop = False + return bsd + +################################################################################# diff --git a/PyCafeDefs_pub.pxi b/PyCafeDefs_pub.pxi new file mode 100644 index 0000000..8ed0898 --- /dev/null +++ b/PyCafeDefs_pub.pxi @@ -0,0 +1,213 @@ + +cdef object py_cb_handle = None +cdef object py_cb_handle_open = None + +cdef object cbobjt = None + +# ***********public or api*************** +# For when with pvdata + +cdef public void cy_data_event_handler_wrapper(void * callback, + unsigned int handle, + string pvname, + PVDataHolder pvd) with gil: + + global py_cb + + + #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) + + cdef pvdata data = PVDataHolderToStruct(pvd) + #data.show() + py_cb = ( callback) + #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname) + #print( py_cb) + + ''' + global handleMonDictGlobal + if handleMonDictGlobal is not None: + for cbobjt, v in handleMonDictGlobal.items(): + print("handle", v, "cbobjt", cbobjt) + if v == handle: + cbobjt(handle, pvname, data) + ''' + if callback: + cbobjt= ( callback) + #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname) + cbobjt(handle, pvname, data) + #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(4)= Handle/PVNAME :", handle, pvname) + + + #with nogil: + #return + + +cdef public void cy_ctrl_event_handler_wrapper(void * callback, + unsigned int handle, + string pvname, + PVCtrlHolder pvc) with gil: + + #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname) + cdef pvctrl data = PVCtrlHolderToStruct(pvc) + cbobjt= ( callback) + cbobjt(handle, pvname, data) + with nogil: + return + +cdef public void cy_event_handler_wrapper(void * callback, + unsigned int handle, + string pvname) with gil: + #print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname) + + cbobjt= callback + cbobjt(handle, pvname) + with nogil: + return + +cdef public void cy_connect_handler_wrapper(void * callback, + unsigned int handle, + string pvname, + int status) with gil: + #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status) + #print(" callback is ", callback) + + if callback: + #print(" callback is not None ") + cbobjt= callback + + cbobjt(handle, pvname, status) + #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++ SUCCESS") + #else: + # if str(pvname) in openDictGlobal.keys(): + # cbobjt = openDictGlobal[pvname] + # cbobjt(handle, pvname, status) + + with nogil: + return + +cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + cdef pvdata pv1 = PVDataHolderToStruct(pvd) + + + ''' + cdef string val + _c_cafe.getCacheString(handle, val) + #print(val, " ", pv1.value[0]) + + cdef HandleHelper hh + cdef vector[void *] widgetV + widgetV.reserve(2) + widgetList = [] + status = hh.getWidgets(handle, widgetV) + for i in range(0, widgetV.size()): + cbobjt = < object > widgetV[i] + cbobjt(pv1, handle, pvname) + widgetList.append( < object > widgetV[i]) + + #print(widgetList) + ''' + ''' + global handleMonDictGlobal + if handleMonDictGlobal is not None: + for cbobjt, v in handleMonDictGlobal.items(): + print("handle", v, "cbobjt", cbobjt) + if v == handle: + cbobjt(pv1, handle, pvname) + ''' + with nogil: + return + + +cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: + #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + ''' + global handleMonDictGlobal + cdef object cbobjt = None + for cbobjt, v in handleMonDictGlobal.items(): + if v == handle: + cbobjt(c1, handle, pvname) + ''' + with nogil: + return + +cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: + print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + py_cb_handle(handle) + with nogil: + return + + +# Default +cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: + print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) + + ''' + cdef string val + _c_cafe.getCacheString(handle, val) + print(val, " is val") + ''' + + # if monDictGlobal.has_key(monid): + global monDictGlobal + if monid in monDictGlobal.keys(): + cbobjt = monDictGlobal[monid] + cbobjt(handle) + else: + print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + with nogil: + return + + +cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil: + #print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle) + # py_cb_handle_get(handle) + global getDictGlobal + if handle in getDictGlobal.keys(): + cbobjt = getDictGlobal[handle] + cbobjt(handle) + else: + print("GET CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + +cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil: + #print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle) + # py_cb_handle_put(handle) + global putDictGlobal + if handle in putDictGlobal.keys(): + cbobjt = putDictGlobal[handle] + cbobjt(handle) + else: + print("PUT CALLBACK NOT FOUND FOR handle", handle) + + with nogil: + return + + +cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: + # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + py_cb_handle_open(handle, status) + with nogil: + return + +cdef public void py_cb_handle_connect_wrapper(unsigned int handle, + string pvname, + int status) with gil: + print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status) + #py_cb_handle_connect(handle, pvname, status) + global openDictGlobal + for k, y in openDictGlobal.items(): + print(k, y) + # if openDictGlobal.has_key(pvname): + if str(pvname) in openDictGlobal.keys(): + cbobjt = openDictGlobal[pvname] + cbobjt(handle, pvname, status) + with nogil: + return + + +# ***********public*************** diff --git a/examples.py b/examples.py index 32ee0c1..fdb790c 100644 --- a/examples.py +++ b/examples.py @@ -7,635 +7,766 @@ import array import inspect import os import operator +import platform import sys import PyCafe - -cafe=PyCafe.CyCafe() -cyca=PyCafe.CyCa() +cafe = PyCafe.CyCafe() +cyca = PyCafe.CyCa() ############################################################## -# (1) Establishing connections to EPICS Process Variables (PVs) -# (2) Simple single channel operations +# (1) Establishing connections to EPICS Process Variables (PVs) +# (2) Simple single channel operations # (3) Waveforms and Arrays -# (4) Multiple scalar operations, i.e. operations on several PVs with scalar values +# (4) Multiple scalar operations, i.e. operations on several PVs with scalar values # (5) Multiple compound operations, i.e. operations on several PVS with either scalar values or arrays # (6) Synchronous group operations # (7) Control system parameters, i.e. operating limits, engineerimg units # (8) Monitors, either with or without user supplied callbacks # (9) Asynchronous interactions and retrieving data from Cache -#(10) Synchronous group operations, with externally defined groups -#(11) Special Methods, match, setAndMatch -#(END) Gracefully terminate CAFE +# (10) Synchronous group operations, with externally defined groups +# (11) Special Methods, match, setAndMatch +# (END) Gracefully terminate CAFE ############################################################## +PY2 = True +PY3 = False -PY2=True -PY3=False +if sys.version_info >= (3, 0): + PY3 = True + PY2 = False -if sys.version_info >= (3,0): - PY3=True - PY2=False - -print("This is Python Version:\n",sys.version_info) +print("This is Python Version:\n", sys.version_info) ################################################################# # Test channels ################################################################# -## For use in office network cao -PV1 ='ARIDI-BPM-01LE:X-AVG' -PV2 ='ARIDI-BPM-01LE:Y-AVG' -PV3 ='ARIDI-BPM-01LB:X-AVG' -PV4 ='ARIDI-BPM-01LB:Y-AVG' -PVWF1='ARIDI-BPM-01LE:WF-INT-2' -PVWF2='ARIDI-BPM-01LB:WF-INT-2' -PVWF3='ARIDI-BPM-01SE:WF-INT-2' -PVWF4='ARIDI-BPM-01SB:WF-INT-2' +# For use in office network cao +PV1 = 'ARIDI-BPM-01LE:X-AVG' +PV2 = 'ARIDI-BPM-01LE:Y-AVG' +PV3 = 'ARIDI-BPM-01LB:X-AVG' +PV4 = 'ARIDI-BPM-01LB:Y-AVG' +PVWF1 = 'ARIDI-BPM-01LE:WF-INT-1' +PVWF2 = 'ARIDI-BPM-01LB:WF-INT-2' +PVWF3 = 'ARIDI-BPM-01SE:WF-INT-2' +PVWF4 = 'ARIDI-BPM-01SB:WF-INT-2' -PVS='ARIDI-BPM-01SB:SET-ENABLE.DESC' -PV_JOKE='PV-DOES-NOT:EXIST' -PV_REAL='SAR-CMON-MAG4531:VOLTAGE-5' +PVS = 'ARIDI-BPM-01SB:SET-ENABLE' +PV_JOKE = 'PV-DOES-NOT:EXIST' +PV_REAL = 'SAR-CMON-MAG4531:VOLTAGE-5' -pvlist1 =[PV1,PV2,PV3,PV4] -pvlistWF =[PVWF1, PVWF2,PVWF3,PVWF4] -pvlistAll=[PV1,PV2,PV3,PV4,PVWF1,PVWF2,PVWF3,PVWF4,PVS,PV_JOKE] +pvlist1 = [PV1, PV2, PV3, PV4] +pvlistWF = [PVWF1, PVWF2, PVWF3, PVWF4] +pvlistAll = [PV1, PV2, PV3, PV4, PVWF1, PVWF2, PVWF3, PVWF4, PVS, PV_JOKE] ################################################################# +def py_connect_callback(handle: int = None, pv_name: str = "", status: int = None): + try: + print("pv_name=", pv_name) + print("CONNECT CALLBACK HANDLER INVOKED FOR HANDLE with status:", handle, status) + # Usual action is to get the updated value + print("isConnected?", cafe.isConnected(handle)) + print("Channel=", cafe.getPVNameFromHandle(handle)) + print("Value =", cafe.getCache(handle)) # native format + # else dt='int', dt='float' + print("Value =", cafe.getCache(handle, dt='str')) + + except PyCafe.CafeException as cafeEx: + + cafeEx.show() + # or + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + except Exception as inst: + print(inst) + + print("END: CONNECT CALLBACK HANDLER COMPLETED FOR HANDLE with status:", handle, status) + print("") + return ################################################################# # A user supplied callback function to be (optionally) used in (8) Monitors # (or puts and gets if required) ################################################################# -def py_callback(handle): - #operations permitted from within handle are getCache, set and close - #open, get and monitorStart are not permitted - try: - print ("") - print ("START: MONITOR CALLBACK HANDLER INVOKED FOR HANDLE:", handle) - #Usual action is to get the updated value - print ("isConnected?", cafe.isConnected(handle)); - print ("Channel=", cafe.getPVNameFromHandle(handle)) - print ("Value =", cafe.getCache(handle)) #native format - print ("Value =", cafe.getCache(handle, dt='str')) #else dt='int', dt='float' - #print ("DbrDataType =", cafe.getDbrDataTypeInCallback(handle) ) - #print ("DataType =", cafe.getDataTypeInCallback(handle) ) - #print ("DbrBase =", cafe.getDbrBaseInCallback(handle) ) - - #This retrieves all the parameters that acted as input to the monitor - #Input is handle and monitorId - monid= cafe.getMonitorIDInCallback(handle) - print ("monid ", monid) - #mp=cafe.getMonitorPolicyVector(handle, monid) - #mp.show() - - #get PVData - p1=cafe.getPVCache(handle) - print ("--------") - p1.showMax(10) #if waveform print only first 10 elements - print ("--------") - #alternatively: - print ("Value =", p1.value[0]) - print ("status = %d" % p1.status) - print ("alarmStatus = %d" % p1.alarmStatus) - print ("alarmSeverity = %d" % p1.alarmSeverity) - print ("ts =", p1.ts[0], p1.ts[1]) - print ("tsDate =", p1.tsDate[0], p1.tsDate[1], \ - p1.tsDate[2], p1.tsDate[3],\ - p1.tsDate[4], p1.tsDate[5], p1.tsDate[6] ) - - #Increment value - set to this channel - #newValue=1+pv.value[0] - #if newValue < 10: - # cafe.set(handle, newValue) - - except Exception as inst: - print ("ERROR IN CALLBACK HANDLER:") - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) - - print ("END: MONITOR CALLBACK HANDLER COMPLETED FOR HANDLE:", handle) - print ("") - return + + +def py_callback(handle: int = None, pvname: str = ""): + # operations permitted from within handle are getCache, set and close + # open, get and monitorStart are not permitted + try: + print("") + print("START: MONITOR CALLBACK HANDLER INVOKED FOR HANDLE:", handle) + # Usual action is to get the updated value + print("isConnected?", cafe.isConnected(handle)) + print("Channel=", cafe.getPVNameFromHandle(handle)) + print("Value =", cafe.getCache(handle)) # native format + # else dt='int', dt='float' + print("Value =", cafe.getCache(handle, dt='str')) + #print ("DbrDataType =", cafe.getDbrDataTypeInCallback(handle) ) + #print ("DataType =", cafe.getDataTypeInCallback(handle) ) + #print ("DbrBase =", cafe.getDbrBaseInCallback(handle) ) + + # This retrieves all the parameters that acted as input to the monitor + #Input is handle and monitorId + monid = cafe.getMonitorIDInCallback(handle) + print("monid ", monid) + #mp=cafe.getMonitorPolicyVector(handle, monid) + # mp.show() + + # get PVData + p1 = cafe.getPVCache(handle) + print("--------") + p1.showMax(10) # if waveform print only first 10 elements + print("--------") + # alternatively: + print("Value =", p1.value[0]) + print("status = %d" % p1.status) + print("alarmStatus = %d" % p1.alarmStatus) + print("alarmSeverity = %d" % p1.alarmSeverity) + print("ts =", p1.ts[0], p1.ts[1]) + print("tsDate =", p1.tsDate[0], p1.tsDate[1], + p1.tsDate[2], p1.tsDate[3], + p1.tsDate[4], p1.tsDate[5], p1.tsDate[6]) + + # Increment value - set to this channel + # newValue=1+pv.value[0] + # if newValue < 10: + # cafe.set(handle, newValue) + + except PyCafe.CafeException as cafeEx: + + cafeEx.show() + # or + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + + except Exception as inst: + print(inst) + + print("END: MONITOR CALLBACK HANDLER COMPLETED FOR HANDLE:", handle) + print("") + return ############################################################## ################################################################# # A user supplied callback function to be (optionally) used in (8) Monitors. -# This is a variant to the above; it returns a PVData object, handle, and pv name. +# This is a variant to the above; it returns a PVData object, handle, and pv name. ################################################################# -def py_callback_pvdata(p1, handle, pv): - #operations permitted from within handle are getCache, set and close - #open, get and monitorStart are not permitted - try: - print ("") - print ("START: MONITOR CALLBACK HANDLER INVOKED FOR HANDLE:", handle) - #Usual action is to get the updated value - print ("isConnected?", cafe.isConnected(handle)); - print ("Channel=", pv) - print ("Value =", p1.value[0]) #native format - print ("Value =", cafe.getCache(handle, dt='str')) #else dt='int', dt='float' - #print ("DbrDataType =", cafe.getDbrDataTypeInCallback(handle) ) - #print ("DataType =", cafe.getDataTypeInCallback(handle) ) - #print ("DbrBase =", cafe.getDbrBaseInCallback(handle) ) - print ("----------") - p1.showMax(10) #if waveform print only first 10 elements - print ("----------") - #alternatively: - print ("Value =", p1.value[0]) - print ("status = %d" % p1.status) - print ("alarmStatus = %d" % p1.alarmStatus) - print ("alarmSeverity = %d" % p1.alarmSeverity) - print ("ts =", p1.ts[0], p1.ts[1]) - print ("tsDate =", p1.tsDate[0], p1.tsDate[1], \ - p1.tsDate[2], p1.tsDate[3],\ - p1.tsDate[4], p1.tsDate[5], p1.tsDate[6] ) - - except Exception as inst: - print ("ERROR IN CALLBACK HANDLER:") - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) - - print ("END: MONITOR CALLBACK HANDLER COMPLETED FOR HANDLE:", handle) - print ("") - return +def py_callback_pvdata(handle: int = None, pvname: str = "", pvdata: PyCafe.pvdata = None ): + # operations permitted from within handle are getCache, set and close + # open, get and monitorStart are not permitted + try: + print("MonitorID:", cafe.getMonitorIDInCallback(handle), "for handle/pv", handle, pvname) + print("START: MONITOR CALLBACK PVDATA HANDLER INVOKED FOR HANDLE/PV:", handle, pvname) + # Usual action is to get the updated value + print("isConnected?", cafe.isConnected(handle)) + print("Channel=", pvname) + print("Value (native) =", pvdata.value[0]) # native format + # else dt='int', dt='float' + print("Value (str) =", cafe.getCache(handle, dt='str')) + #print ("DbrDataType =", cafe.getDbrDataTypeInCallback(handle) ) + #print ("DataType =", cafe.getDataTypeInCallback(handle) ) + #print ("DbrBase =", cafe.getDbrBaseInCallback(handle) ) + print("----------") + pvdata.showMax(10) # if waveform print only first 10 elements + print("----------") + # alternatively: + print("Value =", pvdata.value[0]) + print("status = %d" % pvdata.status) + print("alarmStatus = %d" % pvdata.alarmStatus) + print("alarmSeverity = %d" % pvdata.alarmSeverity) + print("ts =", pvdata.ts[0], pvdata.ts[1]) + print("tsDate =", pvdata.tsDate[0], pvdata.tsDate[1], + pvdata.tsDate[2], pvdata.tsDate[3], + pvdata.tsDate[4], pvdata.tsDate[5], pvdata.tsDate[6]) + + except PyCafe.CafeException as cafeEx: + + cafeEx.show() + # or + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + except Exception as inst: + print(inst) + + print("END: MONITOR CALLBACK PVDATA HANDLER COMPLETED FOR HANDLE/PV:", handle, pvname) + print("") + return ############################################################## +################################################################# +# A user supplied callback function to be (optionally) used in ctrl monitors. +# This is a variant to the above; it returns a PVCtrl object, handle, and pv name. +################################################################# +def py_callback_pvctrl(handle: int = None, pvname: str = "", pvctrl: PyCafe.pvctrl = None): + # operations permitted from within handle are getCache, set and close + # open, get and monitorStart are not permitted + try: + print("") + print("START: MONITOR CALLBACK CTRL HANDLER INVOKED FOR HANDLE/PV:", handle, pvname) + # Usual action is to get the updated value + print("isConnected?", cafe.isConnected(handle)) + print("Channel=", pvname) + print("Value (native) =", pvctrl.value[0]) # native format + # else dt='int', dt='float' + print("Value (str) =", str(pvctrl.value[0])) + #print ("DbrDataType =", cafe.getDbrDataTypeInCallback(handle) ) + #print ("DataType =", cafe.getDataTypeInCallback(handle) ) + #print ("DbrBase =", cafe.getDbrBaseInCallback(handle) ) + print("----------") + pvctrl.showMax(10) # if waveform print only first 10 elements + print("----------") + + except PyCafe.CafeException as cafeEx: + + cafeEx.show() + # or + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + except Exception as inst: + print(inst) + + print("END: MONITOR CALLBACK CTRL HANDLER COMPLETED FOR HANDLE/PV:", handle, pvname) + print("") + return + + ################################################################# # A user supplied callback function for put operations (optional) ################################################################# def py_callback_put(handle): - print ("Put HANDLER COMPLETED FOR HANDLE:", handle) - return - + print("Channel=", cafe.getPVNameFromHandle(handle)) + print("Old Value from Cache =", cafe.getCache(handle)) # native format + print("Put HANDLER COMPLETED FOR HANDLE:", handle) + return + ################################################################# # A user supplied callback function for get operations (optional) -################################################################# +################################################################# + + def py_callback_get(handle): - print ("Channel=", cafe.getPVNameFromHandle(handle)) - print ("Value =", cafe.getCache(handle)) #native format - print ("Get HANDLER COMPLETED FOR HANDLE:", handle) - return + print("Channel=", cafe.getPVNameFromHandle(handle)) + print("Value =", cafe.getCache(handle)) # native format + print("Get HANDLER COMPLETED FOR HANDLE:", handle) + return ############################################################## ############################################################## -#(1) Establishing connections to EPICS Process Variables (PVs) +# (1) Establishing connections to EPICS Process Variables (PVs) ############################################################## -#Explicitly opening channels is good practice even if only optional +# Explicitly opening channels is good practice even if only optional -print("INFO: pend time for open",cafe.getOpenDefaultPendTime()) -#open a single channel +print("INFO: pend time for open", cafe.getOpenDefaultPendTime()) +# open a single channel + +# Connect callback function is optional try: - handleS=cafe.open(PVS); -except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - -#better practice is to open all channels at once + handleS = cafe.open("test ", cb=py_connect_callback) -start=time.time() +except PyCafe.CafeException as cafeEx: # inst: + print("PyCafe.CafeException") + # if isinstance(inst.args[0], PyCafe.CyCafeException): + # cafeEx=inst.args[0] + cafeEx.show() + # or + cafeEx.reveal() + # or + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + # else: + # print(inst) -cafe.openPrepare() - -try: - #return list of handles - hlist1 =cafe.open(pvlist1) - hlistWF =cafe.open(pvlistWF) - hlistAll=cafe.open(pvlistAll) #Note: only one handle per channel is created except Exception as inst: + print("Exception") + print(inst.args) + print(inst) +# better practice is to open all channels at once - print(inst.args) -cafe.openNowAndWait(0.5) #timeout for channels to connect +start = time.time() -end=time.time() + +# cafe.openPrepare() +# All Chhanels opened only after openAndWait +# Otherwise channels will open after each cafe.open method is executed + +try: + # return list of handles + hlist1 = cafe.open(pvlist1, cb=py_connect_callback) + print(hlist1) + + hlistWF = cafe.open(pvlistWF, cb=py_connect_callback) + print(hlistWF) + + # Note: only one handle per channel is created + hlistAll = cafe.open(pvlistAll, cb=py_connect_callback) + print(hlistAll) + + +except PyCafe.CafeException as cafeEx: + cafeEx.show() + +except Exception as inst: + print(inst.args) + exit(1) + +# cafe.openNowAndWait(0.5) #timeout for channels to connect + +end = time.time() print(end-start) -if cafe.allConnected()==False: - cafe.printDisconnected() - -#Alternatively -if cafe.allConnected()==False: - h,pv=cafe.getDisconnectedHandles() - print("---------------------") - print("DISCONNECTED CHANNELS") - print("---------------------") - for i in range (0,len(h)): - print (h[i], " ", pv[i]) +# cafe.terminate() +# exit(1) -#Alternatively - show all handles -#cafe.printHandles() -h,pv=cafe.getHandles() +if cafe.allConnected() == False: + cafe.printDisconnected() + +# Alternatively +if cafe.allConnected() == False: + h, pv = cafe.getDisconnectedHandles() + print("---------------------") + print("DISCONNECTED CHANNELS") + print("---------------------") + for i in range(0, len(h)): + print(h[i], " ", pv[i]) + +# Alternatively - show all handles +# cafe.printHandles() +h, pv = cafe.getHandles() print("---------------------") print("ALL CHANNELS") print("---------------------") -for i in range (0,len(h)): - print (h[i], " ", pv[i]) -h,pv,state=cafe.getHandleStates() +for i in range(0, len(h)): + print(h[i], " ", pv[i]) +h, pv, state = cafe.getHandleStates() print("---------------------") print("ALL CHANNELS AND CONNECTION STATE") print("---------------------") -for i in range (0,len(h)): - print (h[i], " ", pv[i], " " , state[i]) -print("") -#END (1) Establishing connections to EPICS Process Variables (PVs) +for i in range(0, len(h)): + print(h[i], " ", pv[i], " ", state[i]) +print("") +# END (1) Establishing connections to EPICS Process Variables (PVs) ############################################################## + ############################################################## -#(2) Simple single channel operations +# (2) Simple single channel operations ############################################################## -#Now perform some get/set operations +# Now perform some get/set operations -#input to get method can be the handle to the PV, or the PV name +# input to get method can be the handle to the PV, or the PV name -#If you prefer to check on the value (which will return -#a Python None in the event of a failed operation) rather -#than catch exceptions then it is possible to turn off exceptions: +# If you prefer to check on the value (which will return +# a Python None in the event of a failed operation) rather +# than catch exceptions then it is possible to turn off exceptions: -cafe.withExceptions(False); +cafe.withExceptions(False) +##cafe.enableExceptions = False -#get 'ARIDI-BPM-01SB:SET-ENABLE' by handle -val=cafe.get(hlistAll[8]); -#or -val=cafe.get(PVS); +# get 'ARIDI-BPM-01SB:SET-ENABLE' by handle +val = cafe.get(hlistAll[8]) +# or +val = cafe.get(PVS) if val == None: - #print ErrorCode by calling cafe.getStatus with handle or PVName as input argument - print (cafe.getStatus(hlistAll[8])) - #or - print (cafe.getStatus(PVS)) - #print meaning of error message - cafe.printStatusIfError(hlistAll[8],cafe.getStatus(hlistAll[8])) + # print ErrorCode by calling cafe.getStatus with handle or PVName as input argument + print(cafe.getStatus(hlistAll[8])) + # or + print(cafe.getStatus(PVS)) + # print meaning of error message + cafe.printStatusIfError(hlistAll[8], cafe.getStatus(hlistAll[8])) else: - print ("Value=",val) - + print("Value=", val) + #enumValue=cafe.getEnumFromString(PVS, val) -#print ("enumValue=",enumValue) +#print ("enumValue=",enumValue) #enumString=cafe.getStringFromEnum(PVS, enumValue) -#print ("enumString=",enumString) +#print ("enumString=",enumString) - -#This channel does not exist hence None will be returned -#The status code and error message will indicate that the channel was never connected -val=cafe.get(PV_JOKE) + +# This channel does not exist hence None will be returned +# The status code and error message will indicate that the channel was never connected +val = cafe.get(PV_JOKE) if val == None: - cafe.printStatusIfError(PV_JOKE,cafe.getStatus(PV_JOKE)) + cafe.printStatusIfError(PV_JOKE, cafe.getStatus(PV_JOKE)) else: - print ("Value=", val) - -#Now use exceptions for single channel get/set operations -cafe.withExceptions(True); - -#Now perform some get operations -try: - val=cafe.get(hlistAll[8]) - print ("Channel: ", cafe.getPVNameFromHandle(hlistAll[8])," value=", val) -except Exception as inst: - print ("ERROR IN cafe.get") - print (inst) + print("Value=", val) -#Retrun pvdata struct, i.e., val, alarms, timestamps -try: - pv=cafe.getPV(hlistAll[8]) - pv.show() -except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - cafeEx.reveal() - else: - print (inst) - -#Now perform a get operations on a disconnected channel -#and catche the exception being thrown -try: - val=cafe.get(PV_JOKE) #will throw an exception - print ("Channel: ", PV_JOKE," value=", val) -except Exception as inst: - print ("ERROR IN cafe.get for channel:", PV_JOKE) - - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - else: - print (inst) - -try: - val=cafe.get(hlistAll[3]) - print ("Channel: ", pvlistAll[3]," value=", val) - #or - print ("Channel: ", cafe.getPVNameFromHandle(hlistAll[3])," value=", val) -except Exception as inst: - print ("ERROR IN cafe.get for channel:", PV_JOKE) - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - #cafeEx.show() - cafeEx.reveal() - else: - print (inst) - +# Now use exceptions for single channel get/set operations +##cafe.enableExceptions = True +cafe.withExceptions(True) -#cafe.get on a WF will return first element only (see(3) fro WFs) +# Now perform some get operations try: - val=cafe.get('ARIDI-BPM-01SE:WF-INT-2') #will throw an exception - print ('ARIDI-BPM-01SE:WF-INT-2 has val=',val) + val = cafe.get(hlistAll[8]) + print("Channel: ", cafe.getPVNameFromHandle(hlistAll[8]), " value=", val) + +except PyCafe.CafeException as cafeEx: + cafeEx.show() + except Exception as inst: + print(inst.args) - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) -#Now perform a set operation on a waveform +# Retrun pvdata struct, i.e., val, alarms, timestamps +try: + pv = cafe.getPV(hlistAll[8]) + pv.show() + +except PyCafe.CafeException as cafeEx: + cafeEx.show() + +except Exception as inst: + print(inst.args) + + +# Now perform a get operations on a disconnected channel +# and catche the exception being thrown +try: + val = cafe.get(PV_JOKE) # will throw an exception + print("Channel: ", PV_JOKE, " value=", val) + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() +except Exception as inst: + print(inst) try: - print ("set") - cafe.set(PV1, 1.234) #set by pvname; value can be in any format - print ("get") - val=cafe.get(PV1,dt='native') #dt='native' (defulat) may be omitted - print ("Value (should be 1.234) =", val) #default dt='native' - - cafe.set(hlistAll[0], [4.321]) #set by handle - val=cafe.get(PV1, dt='str') #dt='int', dt='float' are other options - print ("Value (should be 4.321) =", val) - - #get pvdata struct - pv=cafe.getPV(PV1) - pv.show() - #or - print("Value =", pv.value[0]) - print("TS =", pv.ts[0], " " , pv.ts[1]) - print("tsDate =", pv.tsDate[0], pv.tsDate[1], \ - pv.tsDate[2], pv.tsDate[3],\ - pv.tsDate[4], pv.tsDate[5], pv.tsDate[6] ) - print ("") - + val = cafe.get(hlistAll[3]) + print("Channel: ", pvlistAll[3], " value=", val) + # or + print("Channel: ", cafe.getPVNameFromHandle(hlistAll[3]), " value=", val) + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) + print(inst) -#Now perform a set/get operation with user supplied callbacks -try: - cafe.setCallbackGet(hlist1[0],cb=py_callback_get) - cafe.setCallbackPut(hlist1[0],cb=py_callback_put) - - s=cafe.set(hlist1[0],7.777) - v=cafe.get(hlist1[0]) - - print("Can you see if the callback functions were called for set/get?") - print("Value should be 7.777", v) - - print("Waiting 5 seconds to allow data to be viewed") - time.sleep(5) - #return to default callbacks - cafe.setCallbackGet(hlist1[0],cb=None) - cafe.setCallbackPut(hlist1[0],cb=None) - +# cafe.get on a WF will return first element only (see(3) fro WFs) +try: + val = cafe.get('ARIDI-BPM-01SE:WF-INT-2') # will throw an exception + print('ARIDI-BPM-01SE:WF-INT-2 has val=', val) + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + +# Now perform a set operation on a waveform + +try: + print("set") + cafe.set(PV1, 1.234) # set by pvname; value can be in any format + print("get") + val = cafe.get(PV1, dt='native') # dt='native' (defulat) may be omitted + print("Value (should be 1.234) =", val) # default dt='native' + + cafe.set(hlistAll[0], [4.321]) # set by handle + val = cafe.get(PV1, dt='str') # dt='int', dt='float' are other options + print("Value (should be 4.321) =", val) + + # get pvdata struct + pv = cafe.getPV(PV1) + pv.show() + # or + print("Value =", pv.value[0]) + print("TS =", pv.ts[0], " ", pv.ts[1]) + print("tsDate =", pv.tsDate[0], pv.tsDate[1], + pv.tsDate[2], pv.tsDate[3], + pv.tsDate[4], pv.tsDate[5], pv.tsDate[6] ) + print("") + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) - - - -#END (2) Simple single channel operations -############################################################## - -############################################################## -#(3) Waveforms and Arrays -############################################################## -try: - NWF=5000 - print ('setting no of elements for wf to ', cafe.setNelem(PVWF1,4084)) - #time.sleep(5) - - #waveform as Python List - print("Waveform as a Python List and native data type") - start = time.time() - for i in range (0,NWF): - valList=cafe.getList(PVWF1, dt='native'); - end = time.time() - print (end - start) - #print (valList) - #waveform as int and as numpy - print("Waveform as a numpy and dt='float'") - start = time.time() - for i in range (0,NWF): - valNumpy=cafe.getArray(hlistWF[0], dt='native', art='numpy'); #PVWF1, - end = time.time() - print (end - start) - #print (valNumpy) - # - #cafe.setNelem(PVWF1, 5) - - #waveform as a float and as a Python array.array - print("Waveform as a Python array.array and dt='float'") - start = time.time() - for i in range (0,NWF): - valArray=cafe.getArray(hlistWF[0], dt='native', art='array') #PVWF1, - end = time.time() - print (end - start) - #print (valArray) - for i in range (0,min(10,len(valArray))): - #print (valArray[i], " [",i,"] ", sep='', end="") - print (valArray[i], " [",i,"] ",) - print (" ") - #waveform as a and as a Python memoryview - print("Waveform as a Python memoryview and dt='native' (default)") - - start = time.time() - for i in range (0,NWF): - mv=cafe.getArray(hlistWF[0], dt='native', art='memoryview'); - end = time.time() - print (end - start) - - print (type(mv)) - print (type(mv[0])) - print (mv[0]) + print(inst) - #cafe.terminate() - #exit(1) +# Now perform a set/get operation with user supplied callbacks +try: + cafe.setCallbackGet(hlist1[0], cb=py_callback_get) + cafe.setCallbackPut(hlist1[0], cb=py_callback_put) + cafe.setCallbackPut(hlist1[1], cb=py_callback_put) + s = cafe.set(hlist1[0], 3.348) + #cafe.ca_flush_io() + s = cafe.set(hlist1[1], -3.348) + #cafe.ca_flush_io() + s = cafe.set(hlist1[0], 7.777) + #cafe.ca_flush_io() + + v = cafe.get(hlist1[0]) + print("Value should be 7.777", v, s) + #s, sl = cafe.waitForBundledEvents(hlist1[0]) + v = cafe.getCache(hlist1[0]) + s = cafe.getStatus (hlist1[0]) - #ml=memoryview(mv) - #print (type(ml)) - #print (type(ml[0])) - #print (ml[0], ml[1], ml[4]) - #print (ml[2:4].tolist()) - status=cafe.set(hlistWF[0], mv) - #Did set work? Check on first element - print("Value (should be what?)=", cafe.get(PVWF1, dt='float')) + print("Can you see if the callback functions were called for set/get?") + print("Value should be 7.777", v, s) - - ''' - #for PY3 - for i in range (0,len(mv)): - print (mv[i], " ",end="") - print (" ") - ''' + print("Waiting 5 seconds to allow data to be viewed") + time.sleep(5) + # return to default callbacks + cafe.setCallbackGet(hlist1[0], cb=None) + cafe.setCallbackPut(hlist1[0], cb=None) - mv_a=np.ndarray(4) - #mv_a=mv - - for i in range (0,4):#len(mv)): - mv[i]=3.456+i - #print (mv[i], " ", sep="", end="") - mv_a[i]=mv[i] - - print (" ") - - #set first element of wf using memoryview - #mv_a[0]=4.567 - #mv[0]=4.567 - - - status=cafe.set(PVWF1,mv) - #Did set work? Check on first element - print("Value (should be 1.23)=", cafe.get(PVWF1, dt='float')) - - ''' - valArrayI=cafe.getArray(PVWF1, dt='int', art='array') - print (valArrayI) - for i in range (0,min(4,len(valArrayI))): - print (valArrayI[i], " ",) - print (" ") - - - valArrayI=cafe.getArray(PVWF1, dt='int', art='array') - print (valArrayI) - for i in range (0,min(4,len(valArrayI))): - print (valArrayI[i], " ",) - print (" ") - ''' - - print ('nelemCtrl=', cafe.setNelemCtrl(PVWF1, 20) ) - - valC=cafe.getCtrl(PVWF1, dt='int') - print (valC) - #for i in range (0,min(50,len(valC.value))): - #print (valC.value[i], " [",i,"] ", sep='', end="") - #print (valC.value[i], " [",i,"] ",) - #print (" ") - - - - #set wf using array.array - valArray[0]=5.678 - status=cafe.set(PVWF1,valArray) - print("Value (should be 5.678)=", cafe.get(PVWF1, dt='float')) - - #set wf using numpy array - valNumpy[0]=6.543 - status=cafe.set(PVWF1,valNumpy) - print("Value (should be 6)=", cafe.get(PVWF1, dt='int')) - - #set wf using Python List - valList[0]='1.23' - valList[1]='2.10' - status=cafe.set(PVWF1,valList) - - vL=cafe.getList(PVWF1, dt='float') - if vL[0] != None: - print("Values (should be 1.23, 2.1)=", vL[0], vL[1]) - - +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) + print(inst) + +# END (2) Simple single channel operations ############################################################## #cafe.terminate() #exit(1) ############################################################## -#(4) Multiple scalar operations +# (3) Waveforms and Arrays ############################################################## -#Now work with multiple scalars - far far more efficient to get multiple data-sets with one call -#If a channel is not connected (or other error) then it is reported in the ! -#These methods do not throw exceptions +try: + NWF = 10 + print('setting no of elements for wf to ', cafe.setNelem(PVWF1, 4084)) + # time.sleep(5) -valueList,status,statusList=cafe.getScalarList(hlist1,'str') #hlist1 or pvlist1 + # waveform as Python List + print("Waveform as a Python List and native data type") + start = time.time() + for i in range(0, NWF): + valList = cafe.getList(PVWF1, dt='native') + end = time.time() + print(end - start) + + start = time.time() + for i in range(0, NWF): + valList = cafe.getList(PVWF1, dt='int8') + end = time.time() + print(end - start) + + #print (valList) + # waveform as int and as numpy + print("Waveform as a numpy and dt='float'") + start = time.time() + for i in range(0, NWF): + valNumpy = cafe.getArray( + hlistWF[0], dt='native', art='numpy') # PVWF1, + end = time.time() + print(end - start) + #print (valNumpy) + # + #cafe.setNelem(PVWF1, 5) + + # waveform as a float and as a Python array.array + print("Waveform as a Python array.array and dt='float'") + start = time.time() + for i in range(0, NWF): + valArray = cafe.getArray( + hlistWF[0], dt='native', art='array') # PVWF1, + end = time.time() + print(end - start) + #print (valArray) + for i in range(0, min(10, len(valArray))): + #print (valArray[i], " [",i,"] ", sep='', end="") + print(valArray[i], " [", i, "] ",) + print(" ") + # waveform as a and as a Python memoryview + print("Waveform as a Python memoryview and dt='native' (default)") + + start = time.time() + for i in range(0, NWF): + mv = cafe.getArray(hlistWF[0], dt='native', art='memoryview') + end = time.time() + print(end - start) + + print(type(mv)) + print(type(mv[0])) + print(mv[0]) + + time.sleep(5) + # cafe.terminate() + # exit(1) + + # ml=memoryview(mv) + #print (type(ml)) + #print (type(ml[0])) + #print (ml[0], ml[1], ml[4]) + #print (ml[2:4].tolist()) + status = cafe.set(hlistWF[0], mv) + # Did set work? Check on first element + print("Value (should be what?)=", cafe.get(PVWF1, dt='float')) + + ''' + #for PY3 + for i in range (0,len(mv)): + print (mv[i], " ",end="") + print (" ") + ''' + + mv_a = np.ndarray(4) + + # mv_a=mv + + for i in range(0, 4): # len(mv)): + mv[i] = 3.456+i + #print (mv[i], " ", sep="", end="") + mv_a[i] = mv[i] + + print(" ") + + # set first element of wf using memoryview + # mv_a[0]=4.567 + # mv[0]=4.567 + + status = cafe.set(PVWF1, mv) + # Did set work? Check on first element + print("Value (should be 1.23)=", cafe.get(PVWF1, dt='float')) + + ''' + valArrayI=cafe.getArray(PVWF1, dt='int', art='array') + print (valArrayI) + for i in range (0,min(4,len(valArrayI))): + print (valArrayI[i], " ",) + print (" ") + + + valArrayI=cafe.getArray(PVWF1, dt='int', art='array') + print (valArrayI) + for i in range (0,min(4,len(valArrayI))): + print (valArrayI[i], " ",) + print (" ") + ''' + + print('nelemCtrl=', cafe.setNelemCtrl(PVWF1, 20)) + + valC = cafe.getCtrl(PVWF1, dt='int') + print(valC) + # for i in range (0,min(50,len(valC.value))): + #print (valC.value[i], " [",i,"] ", sep='', end="") + #print (valC.value[i], " [",i,"] ",) + #print (" ") + + # set wf using array.array + valArray[0] = 5.678 + status = cafe.set(PVWF1, valArray) + print("Value (should be 5.678)=", cafe.get(PVWF1, dt='float')) + + # set wf using numpy array + valNumpy[0] = 6.543 + status = cafe.set(PVWF1, valNumpy) + print("Value (should be 6)=", cafe.get(PVWF1, dt='int')) + + # set wf using Python List + valList[0] = '1.23' + valList[1] = '2.10' + status = cafe.set(PVWF1, valList) + + vL = cafe.getList(PVWF1, dt='float') + if vL[0] != None: + print("Values (should be 1.23, 2.1)=", vL[0], vL[1]) + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + +except Exception as inst: + print(inst) + + +############################################################## + +# cafe.terminate() +# exit(1) + +############################################################## +# (4) Multiple scalar operations +############################################################## +# Now work with multiple scalars - far far more efficient to get multiple data-sets with one call +# If a channel is not connected (or other error) then it is reported in the ! +# These methods do not throw exceptions + +valueList, status, statusList = cafe.getScalarList( + hlist1, 'str') # hlist1 or pvlist1 if status != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(hlist1,statusList) + cafe.printStatusIfError(hlist1, statusList) + +for i in range(0, len(valueList)): + print(valueList[i], " [", i, "] ",) +print(" ") -for i in range (0, len(valueList)): - print (valueList[i], " [",i,"] ",) -print(" ") if status != cyca.ICAFE_NORMAL: - for i in range (0, len(statusList)): - print (cafe.getStatusCodeAsText(statusList[i]), "[",i,"]") - print(" ") + for i in range(0, len(statusList)): + print(cafe.getStatusCodeAsText(statusList[i]), "[", i, "]") + print(" ") -valueList,status,statusList=cafe.getScalarList(hlistAll,dt='float') #hlistAll or pvlistALL +try: + val = cafe.getPV(hlistAll[8], dt='int') + print(pvlistAll[8], val) + val.show() + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + +except Exception as inst: + print(inst) + + +valueList, status, statusList = cafe.getScalarList( + hlistAll[0:9], dt='double') # hlistAll or pvlistALL print("--------------------------------------------------------") print("valueList from cafe.getScalarList(hlistAll,dt='native') ") print("Note the different data types appearing in the list ") print("If a WF is among the list, only the first element is returned") print("--------------------------------------------------------") -a=float('2') -print ('a=', a) +for i in range(0, len(valueList)): + print(pvlistAll[i], valueList[i], " [", i, "] ", statusList[i]) +print(" ") + if status != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(hlistAll,statusList) + cafe.printStatusIfError(hlistAll, statusList) + + ''' if PY3: for i in range (0, len(valueList)): @@ -645,322 +776,345 @@ if PY3: for i in range (0, len(statusList)): print (cafe.getStatusCodeAsText(statusList[i]), " [",i,"] ",end="") print(" ") -''' +''' -#if PY2: +# if PY2: -for i in range (0, len(valueList)): - print (valueList[i], " [",i,"] ",) - print(type(valueList[i])) -print(" ") +for i in range(0, len(valueList)): + print(valueList[i], " [", i, "] ",) + print(type(valueList[i])) +print(" ") if status != cyca.ICAFE_NORMAL: - for i in range (0, len(statusList)): - print (cafe.getStatusCodeAsText(statusList[i]), " [",i,"] ") - print(" ") -print("--------------------------------------------------------") + for i in range(0, len(statusList)): + print(cafe.getStatusCodeAsText(statusList[i]), " [", i, "] ") + print(" ") +print("--------------------------------------------------------") print("--------------------------------------------------------") print("valueList from cafe.getScalarList(hlist1,dt='float') ") print("Values returned should be 5.6, 6.389, 7.7, 22 ") print("--------------------------------------------------------") -#Note that different data types are allowed within the input List -llist=[5,6.389,'7.7',22] -status,statusList=cafe.setScalarList(hlist1,llist) -valueList,status,statusList=cafe.getScalarList(hlist1,dt='float') #hlist1 or pvlist1 +# Note that different data types are allowed within the input List +llist = [5, 6.389, '7.7', 22] +status, statusList = cafe.setScalarList(hlist1, llist) +valueList, status, statusList = cafe.getScalarList( + hlist1, dt='float') # hlist1 or pvlist1 if status != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(hlist1,statusList) + cafe.printStatusIfError(hlist1, statusList) -for i in range (0, len(valueList)): - print (valueList[i], " [",i,"] ",) -print(" ") -print("--------------------------------------------------------") - -############################################################## +for i in range(0, len(valueList)): + print(valueList[i], " [", i, "] ",) +print(" ") +print("--------------------------------------------------------") ############################################################## -#(5) Mulitple compound operations -############################################################## + +############################################################## +# (5) Mulitple compound operations +############################################################## print("--------------------------------------------------------") print("valueList from cafe.getCompoundList(hlistAll,dt='native') ") print("A WF is returned as a List within the List ") print("--------------------------------------------------------") -val,s,sl=cafe.getCompoundList(hlistAll,dt='native') +val, s, sl = cafe.getCompoundList(hlistAll, dt='native') -print(val) -print(s) -print(sl) + +# print one of the waveforms in above val List +mval = 10 +if len(val) > 4: + if isinstance(val[4], (list)): + mval = len(val[4]) + # print 10 first elements of WF + for i in range(0, min(10, mval)): + print(val[4][i], " [", i, "] ") + print(" ") print("--------------------------------------------------------") print("valueList from cafe.getPVList(hlistAll,dt='native') for comparison to above") print("A WF is returned as a List within the List ") print("--------------------------------------------------------") -pvl,s=cafe.getPVList(hlistAll,dt='native') -for i in range (0, len(pvl)): - print(hlistAll[i], " " , cafe.getPVNameFromHandle(hlistAll[i])) - pvl[i].show() - print(" ") +pvl, s = cafe.getPVList(hlistAll, dt='native') +for i in range(0, len(pvl)): + print(hlistAll[i], " ", cafe.getPVNameFromHandle(hlistAll[i])) + pvl[i].show() + print(" ") print(s) print("--------------------------------------------------------") -#print one of the waveforms in above val List -''' -if PY3: - for i in range (0, len(val[4])): - print (val[4][i], end=" ") - print(" ") -''' -mval=10 -if isinstance(val[4],(list)): - mval=len(val[4]) - - -#print 10 first elements of WF -for i in range (0, min(10,mval)): - print (val[4][i],) -print(" ") - cafe.printStatusIfError(hlistAll, sl) -#or -''' -if PY3: - for i in range (0, len(sl)): - print (cafe.getStatusCodeAsText(sl[i]), " [",i,"] ",end=" ") - print(" ") -''' -val[2]=0.7123 -s,sl=cafe.setCompoundList(hlistAll, val) -if (s != cyca.ICAFE_NORMAL): - cafe.printStatusIfError(hlistAll, sl) - -#readback to check that above set worked -print ("Readback value should be", val[2], " val=", cafe.get(hlistAll[2])) -print("--------------------------------------------------------") -print("--------------------------------------------------------") -############################################################## +if len(val) > 2: + val[2] = 0.7123 + s, sl = cafe.setCompoundList(hlistAll, val) + if (s != cyca.ICAFE_NORMAL): + cafe.printStatusIfError(hlistAll, sl) + +try: + val2 = cafe.get(hlistAll[2]) + + # readback to check that above set worked + print("Readback value should be", val[2], " val=", val2) + print("--------------------------------------------------------") + print("--------------------------------------------------------") + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + +except Exception as inst: + print(inst) ############################################################## -#(6) Synchronous group operations and like -############################################################## + + +############################################################## +# (6) Synchronous group operations and like +############################################################## print("--------------------------------------------------------") print(" Synchronous group operations ") print("--------------------------------------------------------") -#define a group on the fly +gh=cafe.grouping('testg', pvlist1) + +# Return a group of PV structs +pvg = cafe.getPVGroup(gh) +pvg.show() +# or +pvg.showWithPV(pvlist1) + +# define a group on the fly cafe.defineGroup('gBPM', pvlist1) -groupHandle1=cafe.groupOpen('gBPM') -glist=cafe.groupMemberList('gBPM') +groupHandle1 = cafe.groupOpen('gBPM') +glist = cafe.groupMemberList('gBPM') -#Return a group of PV structs -pvg =cafe.getPVGroup(groupHandle1) +# Return a group of PV structs +pvg = cafe.getPVGroup(groupHandle1) pvg.show() -#or +# or pvg.showWithPV(glist) -#or -for i in range (0, pvg.npv): - print(glist[i], " value=", pvg.pvdata[i].value[0],) +# or +for i in range(0, pvg.npv): + print(glist[i], " value=", pvg.pvdata[i].value[0],) print(" ") print("--------------------------------------------------------") -#extract all values from pvgroup into a list -setList=[] -setList=cafe.PVGroupValuesToList(pvg) +# extract all values from pvgroup into a list +setList = [] +setList = cafe.PVGroupValuesToList(pvg) -#modify values -setList[0]=setList[0]+0.1234567 -setList[1]=setList[1]+0.9876543 +# modify values +setList[0] = setList[0]+0.1234567 +setList[1] = setList[1]+0.9876543 -#set new values -s, sL=cafe.setGroup(groupHandle1,setList) +# set new values +s, sL = cafe.setGroup(groupHandle1, setList) -#readback new values -values,s,sl=cafe.getGroup(groupHandle1) #by group handle +# readback new values +values, s, sl = cafe.getGroup(groupHandle1) # by group handle print(values) -values,s,sl=cafe.getGroup('gBPM') #by group name +values, s, sl = cafe.getGroup('gBPM') # by group name print(values) -#Now define another group -cafe.defineGroup('gAll', pvlistAll) +# Now define another group +cafe.defineGroup('gAll', pvlistAll[0:9]) #take out PV-JOKE -groupHandle2=cafe.groupOpen('gAll') -pvg =cafe.getPVGroup(groupHandle2) -#pvg.show() -#or +groupHandle2 = cafe.groupOpen('gAll') +pvg = cafe.getPVGroup(groupHandle2) +# pvg.show() +# or pvg.showWithPV(pvlistAll) -#or -#for i in range (0, pvg.npv): +# or +# for i in range (0, pvg.npv): # print(glist[i], " value=", pvg.pvdata[i].value[0],) -#print(" " +# print(" " print("--------------------------------------------------------") -values,s,sl=cafe.getGroup(groupHandle2) #by group handle -print (values) +values, s, sl = cafe.getGroup(groupHandle2) # by group handle +print(values) if s != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(pvlistAll, sl) + cafe.printStatusIfError(pvlistAll, sl) -#change some values: -values[0]=values[0]+ 0.234 -values[1]=values[1]+ 0.456 -values[8]="monitor" +# change some values: +values[0] = values[0] + 0.234 +values[1] = values[1] + 0.456 +values[8] = "monitor" -s,sl=cafe.setGroup(groupHandle2, values) +s, sl = cafe.setGroup(groupHandle2, values) if s != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(pvlistAll, sl) - -newValues,s,sl=cafe.getGroup(groupHandle2) #by group handle -print (newValues[0], newValues[1]) + cafe.printStatusIfError(pvlistAll, sl) + +newValues, s, sl = cafe.getGroup(groupHandle2) # by group handle +print(newValues[0], newValues[1]) if s != cyca.ICAFE_NORMAL: - cafe.printStatusIfError(pvlistAll, sl) + cafe.printStatusIfError(pvlistAll, sl) 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 = cafe.getCompoundPVGroup('gAll', dt='str') pvg.showWithPV(pvlistAll) -#or -glist=cafe.groupMemberList('gAll') +# or +glist = cafe.groupMemberList('gAll') pvg.showWithPV(glist) -print ("Values of first element:") -for i in range (0, pvg.npv): - print(glist[i], " value=", pvg.pvdata[i].value[0],) + +print("Values of first element:") +for i in range(0, pvg.npv): + print(i, glist[i], " value=", pvg.pvdata[i].value[0],) print(" ") +print("Data from getCompoundPVGroup by groupHandle") +pvg = cafe.getCompoundPVGroup(groupHandle2, dt='float') + -print ("Data from getCompoundPVGroup by groupHandle") -pvg=cafe.getCompoundPVGroup(groupHandle2, dt='float') pvg.showWithPV(pvlistAll) -#or -print ("Values of first element:") -for i in range (0, pvg.npv): - print(pvlistAll[i], " value=", pvg.pvdata[i].value[0],) +# or +print("Values of first element:") +for i in range(0, pvg.npv): + print(pvlistAll[i], " value=", pvg.pvdata[i].value[0],) print(" ") -############################################################## +############################################################## + +############################################################## +# (7) Get Ctrl Parameters +############################################################## + +try: + pvctrl = cafe.getCtrl(hlistAll[8]) +# or from Cache would normally suffice as we are not interested in .value + + pvctrl.show() + + pvctrl = cafe.getCtrlCache(hlistAll[8]) + + print(pvctrl.enumStrings) + print(pvctrl.units) # if any + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + +except Exception as inst: + print(inst) ############################################################## -#(7) Get Ctrl Parameters -############################################################## -pvctrl = cafe.getCtrl (hlistAll[8]) -#or from Cache would normally suffice as we are not interested in .value -pvctrl = cafe.getCtrlCache (hlistAll[8]) -pvctrl.show() - -print (pvctrl.enumStrings) -print (pvctrl.units) #if any - -############################################################## - -cafe.withExceptions(False); +#cafe.enableExceptions = False +cafe.withExceptions(False) ############################################################## -#(8) Monitors -############################################################## -cafe.openMonitorPrepare(); +# (8) Monitors +############################################################## +cafe.openMonitorPrepare() -#user supplied callback -m0 =cafe.monitorStart(hlist1[0], cb=py_callback_pvdata, dbr=cyca.CY_DBR_PLAIN, mask=cyca.CY_DBE_VALUE|cyca.CY_DBE_ALARM) -print(m0) -#default input parameters fro dbr and mask -m1 =cafe.monitorStart(hlist1[0], cb=py_callback ) -print(m1) +# user supplied callback +m0 = cafe.monitorStart(hlist1[0], cb=py_callback_pvdata, + dbr=cyca.CY_DBR_TIME, mask=cyca.CY_DBE_VALUE | cyca.CY_DBE_ALARM) + +m2 = cafe.monitorStart(hlist1[0], cb=py_callback_pvdata, + dbr=cyca.CY_DBR_TIME, mask=cyca.CY_DBE_VALUE | cyca.CY_DBE_ALARM) + +# default input parameters for dbr and mask +m1 = cafe.monitorStart(hlist1[1], cb=py_callback_pvctrl, dbr=cyca.CY_DBR_CTRL) -#optional, getCache methods get from cache without pre-checks, i.e. isChannel Connected + +# optional, getCache methods get from cache without pre-checks, i.e. isChannel Connected #cafe.setGetCacheWaitPolicy(hlist[0], cyca.GET_CACHE_NO_CHECK) #cafe.setGetCacheWaitPolicy(hlist[1], cyca.GET_CACHE_NO_CHECK) -print ("Monitor STARTING ------------------------------------------------------------- ",m0,m1) +print("Monitor STARTING ------------------------------------------------------------- ", m0, m1) -cafe.openMonitorNowAndWait(1.0); +cafe.openMonitorNowAndWait(1.0) -val=-2.0 +val = -2.0 -#watch the callbacks being invoked -for i in range (0,5): - cafe.set(hlist1[0], val+i) - #cafe.set(hlist1[1], val+i+0.373) - time.sleep(2.0) - - #print (" ") - #print ("Latest Value for channel",cafe.getPVNameFromHandle(hlist1[0]), " is", cafe.getCache(hlist1[0], dt='native')) - #print (" ") - +# watch the callbacks being invoked +for i in range(0, 5): + cafe.set(hlist1[0], val+i) + cafe.set(hlist1[2], val+i) + #cafe.set(hlist1[1], val+i+0.373) + time.sleep(2.0) - - - -print ('getNoMonitors ' , cafe.getNoMonitors(hlist1[0])); -cafe.close(hlist1[0]) -time.sleep(2); - -#cafe.monitorStop(hlist1[0], mpid=m0) # mpid=m0 is optional and may be omitted -#cafe.monitorStop(hlist1[0]) + #print (" ") + #print ("Latest Value for channel",cafe.getPVNameFromHandle(hlist1[0]), " is", cafe.getCache(hlist1[0], dt='native')) + #print (" ") -#optional, getCache methods get from cache with pre-checks (back to default) + +print('getNoMonitors ', cafe.getNoMonitors(hlist1[0])) + + +# cafe.monitorStop(hlist1[0], mpid=m0) # mpid=m0 is optional and may be omitted +# cafe.monitorStop(hlist1[0]) + +# optional, getCache methods get from cache with pre-checks (back to default) #cafe.setGetCacheWaitPolicy(hlist[0], cyca.GET_CACHE_WAIT) #cafe.setGetCacheWaitPolicy(hlist[1], cyca.GET_CACHE_WAIT) -#cafe.terminate(); -#exit(1); - - -############################################################## +############################################################## ############################################################## -#(9) Asynchronous interactions and retrieving data from Cache -############################################################## +# (9) Asynchronous interactions and retrieving data from Cache +############################################################## print("--------------------------------------------------------") print("Asynchronous interactions and retrieving data from Cache") print("--------------------------------------------------------") -#Check on return value or status instead of exceptions +# Check on return value or status instead of exceptions -cafe.withExceptions(False); -s=cafe.set(hlistAll[0],1.111789) +##print("Exceptions enabled?", cafe.enableExceptions) +s = cafe.set(hlistAll[0], 1.111789) -s,sl=cafe.getAsyn(hlistAll) -print("status of cafe.getAsyn(hlistAll)",s) +s, sl = cafe.getAsyn(hlistAll) +print("status of cafe.getAsyn(hlistAll)", s) if s != cyca.ICAFE_NORMAL: - print(sl) + print(sl) -#optional - may be omitted -s,sl=cafe.waitForBundledEvents(hlistAll) +# optional - may be omitted +s, sl = cafe.waitForBundledEvents(hlistAll) -#will wait for callback to be invoked if above omitted -v=cafe.getCache(hlistAll[0]) +# will wait for callback to be invoked if above omitted +v = cafe.getCache(hlistAll[0]) if v != None: - print("Value from Cache ", v) + print("Value from Cache ", v) -#get array -v=cafe.getArrayCache(hlistAll[4],art='numpy') +# get array +v = cafe.getArrayCache(hlistAll[4], art='numpy') if v[0] != None: - print("Value from Cache ", v) + print("Value from Cache ", v) -pv=cafe.getPVCache(hlistAll[4]) -print (cafe.getPVNameFromHandle(hlistAll[4]),":") -pv.showMax(4) #show max 4 elements of wf +pv = cafe.getPVCache(hlistAll[4]) +print(cafe.getPVNameFromHandle(hlistAll[4]), ":") +pv.showMax(4) # show max 4 elements of wf -############################################################## +############################################################## ############################################################# -#(10) More on groups -############################################################## -#loads groups defined by virtual accelerator (SF network only) -#SF specific, please delete +# (10) More on groups +############################################################## +# loads groups defined by virtual accelerator (SF network only) +# SF specific, please delete ''' cafe.loadSFGroups() print ("loadSFGroups") @@ -982,77 +1136,82 @@ print ("------------------------///") ''' -#See that a number of groups have been added to the groupList -ll=cafe.groupList() -print ("----------------------------////") -print (ll) -print ("----------------------------////") +# See that a number of groups have been added to the groupList +ll = cafe.groupList() +print("----------------------------////") +print(ll) +print("----------------------------////") try: - cafe.openGroupPrepare() + cafe.openGroupPrepare() - gHandle=cafe.groupOpen(ll[0]) - - if (len(ll) >0): - gHandle2=cafe.groupOpen(ll[1]) - - gl=[] - gl.append(gHandle) - if (len(ll) >0): - gl.append(gHandle2) - cafe.openGroupNowAndWaitForInputGroups(3.0, [ll[0], gHandle2]) # maximum timeout + gHandle = cafe.groupOpen(ll[0]) - cafe.closeDisconnectedChannelsWithinGroup([ll[0], gHandle2]) - #cafe.closeChannelKeepHandle(pvlist1) - - pvg=cafe.getPVGroup(gHandle) - #or - pvg=cafe.getPVGroup(ll[1]) + if (len(ll) > 0): + gHandle2 = cafe.groupOpen(ll[1]) - pvg.showWithPV(cafe.groupMemberList(ll[1])) #'gAll' - + gl = [] + gl.append(gHandle) + if (len(ll) > 0): + gl.append(gHandle2) + cafe.openGroupNowAndWaitForInputGroups( + 3.0, [ll[0], gHandle2]) # maximum timeout - #cafe.terminate() - #exit(0) + pvg = cafe.getPVGroup(gHandle) + pvg.showWithPV(cafe.groupMemberList(ll[0])) - #Start a Collective monitor on all group memebers with the same user supplied cb function - cbf=[] - for i in range (0, len(ll[0])): - cbf.append(py_callback_pvdata) - s,sV=cafe.groupMonitorStartWithCBList(gHandle,cbf) - #or - #s,sV=cafe.groupMonitorStartWithCBList(ll[0],cbf) + cafe.closeDisconnectedChannelsWithinGroup([ll[0], gHandle2]) + # cafe.closeChannelKeepHandle(pvlist1) - #Start a monitor on all group members with default callback - #If a channel is disconnected, then the monitor will start automatically on connection - s,sV=cafe.groupMonitorStart('gAll') + pvg = cafe.getPVGroup(gHandle) + # or + # pvg = cafe.getPVGroup(ll[1]) - val,s,sl=cafe.getGroupCache(gHandle) - #wait a tick for callbacks to complete before sets are done - time.sleep(0.5) - print ("--------------------------------/") - print ("SET to monitored channels") - print ("--------------------------------/") - for i in range (0,len(val)): - val[i]= val[i]+0.9099999 - s,sl = cafe.setGroup(gHandle,val) - time.sleep(0.5) + pvg.showWithPV(cafe.groupMemberList(ll[0])) # 'testg' - s,sV=cafe.groupMonitorStop(gHandle) - s,sV=cafe.groupMonitorStop('gAll') + # cafe.terminate() + # exit(0) - + # Start a Collective monitor on all group memebers with the same user supplied cb function + cbf = [] + for i in range(0, len(cafe.groupMemberList(ll[0]))): + cbf.append(py_callback) # _pvdata) + print(len(cafe.groupMemberList(ll[0])), len(cbf)) + s, sV = cafe.groupMonitorStartWithCBList(gHandle, cbf) + # or + # s,sV=cafe.groupMonitorStartWithCBList(ll[0],cbf) + + # Start a monitor on all group members with default callback + # If a channel is disconnected, then the monitor will start automatically on connection + s, sV = cafe.groupMonitorStart('gAll') + + val, s, sl = cafe.getGroupCache(gHandle) + + # wait a tick for callbacks to complete before sets are done + time.sleep(0.5) + print("--------------------------------/") + print("SET to monitored channels") + print("--------------------------------/") + for i in range(0, len(val)): + val[i] = val[i]+0.9099999 + s, sl = cafe.setGroup(gHandle, val) + time.sleep(0.5) + + s, sV = cafe.groupMonitorStop(gHandle) + s, sV = cafe.groupMonitorStop('gAll') + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) + print(inst) + + +time.sleep(1) ''' @@ -1073,141 +1232,156 @@ for i in range (0, len(BPMdev)): print (i, " " + BPMdev[i], " " , BPMpos[i] ''' + ############################################################## -#(11) Special methods: -############################################################## -#int match(valueToReach, handleMatch, tolerance, timeout, printFlag) -#This method does not do a set, just waits until valueToReach -#for channel hlist1[0] is reached -print (" ") -print ("START cafe.match------------------------------------------------------") +# (11) Special methods: +############################################################## +# int match(valueToReach, handleMatch, tolerance, timeout, printFlag) +# This method does not do a set, just waits until valueToReach +# for channel hlist1[0] is reached +print(" ") +print("START cafe.match------------------------------------------------------") try: - cafe.set(hlist1[0], 2.001) - s=cafe.match(2.34,hlist1[0],0.0011,10.0,True) - #s=cafe.match(cafe.getEnumFromString(PVS,"monitor"),hlist1[0],0.0011,10.0,True) - print ("Status of match method: ", cafe.getStatusCodeAsText(s)) + cafe.set(hlist1[0], 2.001) + print(hlist1[0], "hlist1[0]", type(hlist1[0])) + s = cyca.ICAFE_NORMAL + s = cafe.match(float(2.34), int(hlist1[0]) , float(0.0011), float(10.0), bool(True)) + # s=cafe.match(cafe.getEnumFromString(PVS,"monitor"),hlist1[0],0.0011,10.0,True) + print("Status of match method: ", cafe.getStatusCodeAsText(s)) + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + except Exception as inst: - print ("Exception for cafe match ") - print ("Status of match method: ", cafe.getStatusCodeAsText(cafe.getStatus(hlist1[0]))) -print ("END cafe.match------------------------------------------------------") + print(inst) + print("Exception for cafe match ") + print("Status of match method: ", + cafe.getStatusCodeAsText(cafe.getStatus(hlist1[0]))) +print("END cafe.match------------------------------------------------------") -#int setAndMatch(handlePVtoSet, valueToSet, handlePVtoReadback, tolerance, timeout, printFlag) -#Set Channel1 followed by a readback of Channel 2 \n -#Method verifies whether or not the 2 values agree within the given tolerance and timeout -#Method returns with ECA_NORMAL as soon as a match is reached -print (" ") -print ("START cafe.setAndMatch------------------------------------------------------") +#cafe.terminate() +#exit() + +# int setAndMatch(handlePVtoSet, valueToSet, handlePVtoReadback, tolerance, timeout, printFlag) +# Set Channel1 followed by a readback of Channel 2 \n +# Method verifies whether or not the 2 values agree within the given tolerance and timeout +# Method returns with ECA_NORMAL as soon as a match is reached +print(" ") +print("START cafe.setAndMatch------------------------------------------------------") try: - cafe.set(hlist1[1], 2.0201) - s=cafe.setAndMatch(hlist1[0],2.02,hlist1[1],0.001,10.0,True) - #s=cafe.setAndMatch(hlist1[0],cafe.getEnumFromString(PVS,"monitor"),hlist1[1],0.001,1,True) - print ("Status of set and match method: ", cafe.getStatusCodeAsText(s)) -except Exception as inst: - print ("EXCEPTION AT SET AND MATCH" ) - print ("Status of set and match method: ", cafe.getStatusCodeAsText(cafe.getStatus(hlist1[0]))) -print ("END cafe.setAndMatch------------------------------------------------------") + cafe.set(hlist1[1], 2.0201) + s = cafe.setAndMatch(hlist1[0], 2.02, hlist1[1], 0.001, 10.0, True) + # s=cafe.setAndMatch(hlist1[0],cafe.getEnumFromString(PVS,"monitor"),hlist1[1],0.001,1,True) + print("Status of set and match method: ", cafe.getStatusCodeAsText(s)) -#Throw exception +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + + +except Exception as inst: + print(inst) + print("EXCEPTION AT SET AND MATCH") + print("Status of set and match method: ", + cafe.getStatusCodeAsText(cafe.getStatus(hlist1[0]))) + +print("END cafe.setAndMatch------------------------------------------------------") + +# Throw exception try: - cafe.getEnumFromString(PVS,"Monitor") -except Exception as inst: - print (inst) - -#Set Channels followed by a corresponding readback of Channels \n -#Method verifies whether or not the set/readback values agree within the given tolerance and timeout \n -#Method returns with ECA_NORMAL as soon as a match is reached + cafe.getEnumFromString(PVS, "Monitor") -magnetSetList =['ARIMA-CV-12LB:I-SET', 'ARIMA-CV-12LE:I-SET'] -magnetReadList=['ARIMA-CV-12LB:I-READ','ARIMA-CV-12LE:I-READ'] +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) + +except Exception as inst: + print(inst) + + +# Set Channels followed by a corresponding readback of Channels \n +# Method verifies whether or not the set/readback values agree within the given tolerance and timeout \n +# Method returns with ECA_NORMAL as soon as a match is reached + +magnetSetList = ['ARIMA-CV-12LB:I-SET', 'ARIMA-CV-12LE:I-SET'] +magnetReadList = ['ARIMA-CV-12LB:I-READ', 'ARIMA-CV-12LE:I-READ'] cafe.openPrepare() -mSetHandleList=cafe.open(magnetSetList) -mReadHandleList=cafe.open(magnetReadList) +mSetHandleList = cafe.open(magnetSetList) +mReadHandleList = cafe.open(magnetReadList) cafe.openNowAndWait(0.4) -valInput=[] +valInput = [] valInput.append(3.5) valInput.append(3.6) +# int setAndMatchMany(handlePVArraytoSet, valueArrayToSet, handlePVArraytoReadback, tolerance, timeout, printFlag) +print(" ") +print("START cafe.setAndMatchMany------------------------------------------------------") +try: + s, sL = cafe.setScalarList(mSetHandleList, valInput) + s, sL = cafe.setScalarList(mReadHandleList, [3.501, 3.599]) + s = cafe.setAndMatchMany(mSetHandleList, valInput, + mReadHandleList, 0.002, 10.0, True) + print("Status of set and match method: ", cafe.getStatusCodeAsText(s)) + + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() + # or + print(cafeEx.name, "(handle=", cafeEx.handle, ")") + print(cafeEx.error_code, ":", cafeEx.error_text, cafeEx.error_info) -#int setAndMatchMany(handlePVArraytoSet, valueArrayToSet, handlePVArraytoReadback, tolerance, timeout, printFlag) -print (" ") -print ("START cafe.setAndMatchMany------------------------------------------------------") -try: - s,sL=cafe.setScalarList(mSetHandleList, valInput) - s,sL=cafe.setScalarList(mReadHandleList, [3.501,3.599]) - s=cafe.setAndMatchMany(mSetHandleList,valInput,mReadHandleList,0.002,10.0,True) - print ("Status of set and match method: ", cafe.getStatusCodeAsText(s)) - except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) + print(inst) - - -print ("END cafe.setAndMatch------------------------------------------------------") +print("END cafe.setAndMatch------------------------------------------------------") +# int gameSetAndMatch(handlePVArraytoSet, valueArrayToSet, handlePVActiontoSet, valueActionToSet, handlePVArraytoReadback, tolerance, timeout, printFlag) +print(" ") +print("START cafe.gameSetAndMatch------------------------------------------------------") +try: + s, sL = cafe.setScalarList(mSetHandleList, valInput) + s, sL = cafe.setScalarList(mReadHandleList, [3.501, 3.599]) + s = cafe.gameSetAndMatch( + mSetHandleList, valInput, mReadHandleList[0], "1", mReadHandleList, 0.002, 20.0, True) + print("Status of set and match method: ", cafe.getStatusCodeAsText(s)) + +except PyCafe.CafeException as cafeEx: + cafeEx.reveal() -#int gameSetAndMatch(handlePVArraytoSet, valueArrayToSet, handlePVActiontoSet, valueActionToSet, handlePVArraytoReadback, tolerance, timeout, printFlag) -print (" ") -print ("START cafe.gameSetAndMatch------------------------------------------------------") -try: - s,sL=cafe.setScalarList(mSetHandleList, valInput) - s,sL=cafe.setScalarList(mReadHandleList, [3.501,3.599]) - s=cafe.gameSetAndMatch(mSetHandleList,valInput,mReadHandleList[0],"1",mReadHandleList,0.002,20.0,True) - print ("Status of set and match method: ", cafe.getStatusCodeAsText(s)) - except Exception as inst: - if isinstance(inst.args[0],PyCafe.CyCafeException): - cafeEx=inst.args[0] - cafeEx.show() - #or - cafeEx.reveal() - #or - print (cafeEx.pv,"(handle=", cafeEx.handle,")") - print (cafeEx.errorCode,":", cafeEx.errorText,cafeEx.errorInfo) - else: - print (inst) - - - - -print ("END cafe.gameSetAndMatch------------------------------------------------------") - - - -############################################################## - - -##Test with attaching context (would do this from another thread) -print ( cafe.getStatusCodeAsText(cafe.attachContext(1)) ); -print ( cafe.getStatusCodeAsText(cafe.attachContext(999999))); - -if (cafe.attachContext(1) == cyca.CY_ECA_ISATTACHED): - print (cafe.getStatusCodeAsText(cafe.attachContext(1))); - -if (cafe.attachContext(99999) == cyca.ECAFE_NULLCONTEXT): - print (cafe.getStatusCodeAsText(cafe.attachContext(999))); + print(inst) +print("END cafe.gameSetAndMatch------------------------------------------------------") ############################################################## -#END Gracefully terminate CAFE -############################################################## + + +# Test with attaching context (would do this from another thread) +print(cafe.getStatusCodeAsText(cafe.attachContext(1))) +print(cafe.getStatusCodeAsText(cafe.attachContext(999999))) + +if (cafe.attachContext(1) == cyca.CY_ECA_ISATTACHED): + print(cafe.getStatusCodeAsText(cafe.attachContext(1))) + +if (cafe.attachContext(99999) == cyca.ECAFE_NULLCONTEXT): + print(cafe.getStatusCodeAsText(cafe.attachContext(999))) + + +############################################################## +# END Gracefully terminate CAFE +############################################################## cafe.terminate() -exit(0) -############################################################## - - - - +exit(0) +############################################################## diff --git a/python-3.5/PyCafe.h b/python-3.5/PyCafe.h new file mode 100644 index 0000000..2b55cd1 --- /dev/null +++ b/python-3.5/PyCafe.h @@ -0,0 +1,42 @@ +/* Generated by Cython 0.23.4 */ + +#ifndef __PYX_HAVE__PyCafe +#define __PYX_HAVE__PyCafe + + +#ifndef __PYX_HAVE_API__PyCafe + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#ifndef DL_IMPORT + #define DL_IMPORT(_T) _T +#endif + +__PYX_EXTERN_C DL_IMPORT(void) cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder); +__PYX_EXTERN_C DL_IMPORT(void) cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder); +__PYX_EXTERN_C DL_IMPORT(void) cy_event_handler_wrapper(void *, unsigned int, std::string); +__PYX_EXTERN_C DL_IMPORT(void) cy_connect_handler_wrapper(void *, unsigned int, std::string, int); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_wrapper(PVDataHolder, unsigned int, std::string); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_wrapper(unsigned int); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_monid_wrapper(unsigned int, unsigned long); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_get_wrapper(unsigned int); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_put_wrapper(unsigned int); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_open_wrapper(unsigned int, int); +__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_connect_wrapper(unsigned int, std::string, int); + +#endif /* !__PYX_HAVE_API__PyCafe */ + +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initPyCafe(void); +#else +PyMODINIT_FUNC PyInit_PyCafe(void); +#endif + +#endif /* !__PYX_HAVE__PyCafe */ diff --git a/python-3.5/PyCafeDefs_api.pxi b/python-3.5/PyCafeDefs_api.pxi new file mode 120000 index 0000000..0b66cd4 --- /dev/null +++ b/python-3.5/PyCafeDefs_api.pxi @@ -0,0 +1 @@ +../PyCafeDefs_api.pxi \ No newline at end of file diff --git a/python-3.5/PyCafeDefs_pub.pxi b/python-3.5/PyCafeDefs_pub.pxi new file mode 120000 index 0000000..15a7df8 --- /dev/null +++ b/python-3.5/PyCafeDefs_pub.pxi @@ -0,0 +1 @@ +../PyCafeDefs_pub.pxi \ No newline at end of file diff --git a/python-3.5/README_Py3_release b/python-3.5/README_Py3_release index 7432a63..5ac2338 100644 --- a/python-3.5/README_Py3_release +++ b/python-3.5/README_Py3_release @@ -1,4 +1,4 @@ source /opt/gfa/python 3.5 python setup3.5_release.py build_ext -i -export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib +export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib export LD_LIBRARY_PATH=./ diff --git a/python-3.5/makefile b/python-3.5/makefile index 974244f..7cac8b6 100644 --- a/python-3.5/makefile +++ b/python-3.5/makefile @@ -5,7 +5,7 @@ ##### CHANGE AS APPROPRIATE ################# #Cython Version to install -CYCAFE_VERSION=pycafe-1.8.0 +CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0 #CAFE project base #CAFE_BASE=${EPICS_EXTENSIONS}/CAFE diff --git a/python-3.5/python35_header.pxi b/python-3.5/python35_header.pxi new file mode 120000 index 0000000..ca42de7 --- /dev/null +++ b/python-3.5/python35_header.pxi @@ -0,0 +1 @@ +../python35_header.pxi \ No newline at end of file diff --git a/python-3.5/setup3.5_release.py b/python-3.5/setup3.5_release.py index f482d5e..02ba7f2 100644 --- a/python-3.5/setup3.5_release.py +++ b/python-3.5/setup3.5_release.py @@ -1,3 +1,4 @@ +import sys from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize @@ -13,19 +14,34 @@ setup( '/usr/local/epics/base/include/os/Linux', '/opt/gfa/cafe/boost/boost_1_61_0/include', '/opt/gfa/cafe/boost/boost_1_61_0/include/boost', - '/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/include', + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include', + '/opt/gfa/zmq/curl-7.54.1/include', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include', '.', get_include()], library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', - '/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib', - '/opt/gfa/python-3.5/latest/lib' + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.5/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' ], - runtime_library_dirs=['/usr/local/epics/base/lib/SL6-x86_64', - '/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib', - '/opt/gfa/python-3.5/latest/lib' + runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.5/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' ], - libraries=['ca','Com','dl','cafe']) + libraries=['ca','Com','dl','cafe']) ], annotate=False, compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str', 'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False, - 'remove_unreachable': False}) + 'remove_unreachable': False}, + compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True} + ) ) diff --git a/python-3.7/PyCafe.cpp b/python-3.7/PyCafe.cpp new file mode 100644 index 0000000..99caecc --- /dev/null +++ b/python-3.7/PyCafe.cpp @@ -0,0 +1,171098 @@ +/* Generated by Cython 0.29.2 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost/multi_index_container.hpp", + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost/smart_ptr/shared_ptr.hpp", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/PVCtrlHolder.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/PVDataHolder.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/PVGroup.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/cafe.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/cafeDataType.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/cafeEnum.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/caopCodes.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/channelRegalia.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/defines.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/exceptions.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/handleHelper.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/policies.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/policyHelper.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/statusCodes.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/tmDateMap.h", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include/zbsDataHolders.h", + "/opt/gfa/python-3.7/latest/include/python3.7m/Python.h", + "/opt/gfa/python-3.7/latest/include/python3.7m/pythread.h", + "/opt/gfa/python-3.7/latest/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h", + "/opt/gfa/python-3.7/latest/lib/python3.7/site-packages/numpy/core/include/numpy/ufuncobject.h", + "/usr/local/epics/base/include/cadef.h", + "/usr/local/epics/base/include/caerr.h", + "/usr/local/epics/base/include/caeventmask.h", + "/usr/local/epics/base/include/db_access.h", + "/usr/local/epics/base/include/epicsTime.h" + ], + "include_dirs": [ + "/opt/gfa/python-3.7/latest/include/python3.7m", + "/usr/local/epics/base/include", + "/usr/local/epics/base/include/os/Linux", + "/opt/gfa/cafe/boost/boost_1_61_0/include", + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include", + "/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include", + "/opt/gfa/zmq/curl-7.54.1/include", + "/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include", + ".", + "/opt/gfa/python-3.7/latest/lib/python3.7/site-packages/numpy/core/include" + ], + "language": "c++", + "libraries": [ + "ca", + "Com", + "dl", + "cafe" + ], + "library_dirs": [ + "/usr/local/epics/base/lib/SL6-x86_64", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib", + "/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib", + "/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0", + "/opt/gfa/zmq/curl-7.54.1/lib", + "/opt/gfa/python-3.7/latest/lib", + "/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64", + "/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib" + ], + "name": "PyCafe", + "runtime_library_dirs": [ + "/usr/local/epics/base/lib/SL6-x86_64", + "/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib", + "/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib", + "/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0", + "/opt/gfa/zmq/curl-7.54.1/lib", + "/opt/gfa/python-3.7/latest/lib", + "/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64", + "/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib" + ], + "sources": [ + "PyCafe.pyx" + ] + }, + "module_name": "PyCafe" +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 +#define CYTHON_FUTURE_DIVISION 1 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(U other) { return *ptr == other; } + template bool operator !=(U other) { return *ptr != other; } + private: + T *ptr; +}; + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; // PyThread_create_key reports success always +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif // TSS (Thread Specific Storage) API +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +#define __PYX_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__PyCafe +#define __PYX_HAVE_API__PyCafe +/* Early includes */ +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include +#include +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" +#include "boost/multi_index_container.hpp" +#include "boost/smart_ptr/shared_ptr.hpp" +#include "cadef.h" +#include "defines.h" +#include "caeventmask.h" +#include "time.h" +#include "epicsTime.h" +#include "db_access.h" +#include "caerr.h" +#include "caopCodes.h" +#include "tmDateMap.h" +#include "cafeDataType.h" +#include "cafeEnum.h" +#include "exceptions.h" +#include "channelRegalia.h" +#include "handleHelper.h" +#include "policies.h" +#include "policyHelper.h" +#include "statusCodes.h" +#include "zbsDataHolders.h" +#include "PVDataHolder.h" +#include "PVCtrlHolder.h" +#include "PVGroup.h" +#include "cafe.h" +#include "pythread.h" +#include +#include "pystate.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 1 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING "ascii" +#define __Pyx_PyObject_FromString __Pyx_PyStr_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyStr_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "PyCafeDefs_pub.pxi", + "stringsource", + "PyCafeDefs.pxi", + "PyCafe.pyx", + "__init__.pxd", + "array.pxd", + "type.pxd", + "bool.pxd", + "complex.pxd", +}; +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* MemviewSliceStruct.proto */ +struct __pyx_memoryview_obj; +typedef struct { + struct __pyx_memoryview_obj *memview; + char *data; + Py_ssize_t shape[8]; + Py_ssize_t strides[8]; + Py_ssize_t suboffsets[8]; +} __Pyx_memviewslice; +#define __Pyx_MemoryView_Len(m) (m.shape[0]) + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __pyx_atomic_int_type int +#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\ + !defined(__i386__) + #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0 + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type LONG + #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 + #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using Intel atomics" + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +typedef volatile __pyx_atomic_int_type __pyx_atomic_int; +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ +#ifndef _ARRAYARRAY_H +struct arrayobject; +typedef struct arrayobject arrayobject; +#endif +struct __pyx_obj_6PyCafe_CyCa; +struct __pyx_obj_6PyCafe_channelInfo; +struct __pyx_obj_6PyCafe_pvctrl; +struct __pyx_obj_6PyCafe_CafeException; +struct __pyx_obj_6PyCafe_monitorpolicy; +struct __pyx_obj_6PyCafe_pvdata; +struct __pyx_obj_6PyCafe_pvgroup; +struct __pyx_obj_6PyCafe_bschannel; +struct __pyx_obj_6PyCafe_BSData; +struct __pyx_obj_6PyCafe_SFDBPMData; +struct __pyx_obj_6PyCafe_CyCafe; +struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv; +struct __pyx_array_obj; +struct __pyx_MemviewEnum_obj; +struct __pyx_memoryview_obj; +struct __pyx_memoryviewslice_obj; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; +struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct; +struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct; +struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException; +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle; +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList; +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle; + +/* "PyCafeDefs.pxi":1174 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ +struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafeDefs.pxi":1262 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ +struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafe.pyx":359 + * + * cdef prepareCafeException( + * self, int status, str _METHOD, # <<<<<<<<<<<<<< + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: + */ +struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException { + int __pyx_n; + unsigned int handle; + PyObject *pv_name; +}; + +/* "PyCafe.pyx":1686 + * ############################################################################ + * ### Allow user to choose whether or not to open ##### + * cpdef checkForHandle(self, str pv, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + */ +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle { + int __pyx_n; + int force; +}; + +/* "PyCafe.pyx":1699 + * + * ############################################################################ + * cpdef checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen = 0 + */ +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList { + int __pyx_n; + int force; +}; + +/* "PyCafe.pyx":1720 + * + * ############################################################################ + * cpdef checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + */ +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle { + int __pyx_n; + int force; +}; + +/* "PyCafeDefs.pxi":36 + * ''' + * + * cdef class CyCa: # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBE_VALUE + * cpdef readonly unsigned int CY_DBE_LOG + */ +struct __pyx_obj_6PyCafe_CyCa { + PyObject_HEAD + unsigned int CY_DBE_VALUE; + unsigned int CY_DBE_LOG; + unsigned int CY_DBE_ARCHIVE; + unsigned int CY_DBE_ALARM; + unsigned int CY_DBE_PROPERTY; + unsigned int CY_DBR_PRIMITIVE; + unsigned int CY_DBR_PLAIN; + unsigned int CY_DBR_STS; + unsigned int CY_DBR_TIME; + unsigned int CY_DBR_GR; + unsigned int CY_DBR_CTRL; + unsigned int CY_DBR_PUT; + unsigned int CY_DBR_STSACK; + unsigned int CY_DBR_CLASS; + unsigned int CY_DBR_NONE; + unsigned int CY_DBR_STRING; + unsigned int CY_DBR_SHORT; + unsigned int CY_DBR_INT; + unsigned int CY_DBR_FLOAT; + unsigned int CY_DBR_ENUM; + unsigned int CY_DBR_CHAR; + unsigned int CY_DBR_LONG; + unsigned int CY_DBR_DOUBLE; + unsigned int CY_DBR_STS_STRING; + unsigned int CY_DBR_STS_SHORT; + unsigned int CY_DBR_STS_INT; + unsigned int CY_DBR_STS_FLOAT; + unsigned int CY_DBR_STS_ENUM; + unsigned int CY_DBR_STS_CHAR; + unsigned int CY_DBR_STS_LONG; + unsigned int CY_DBR_STS_DOUBLE; + unsigned int CY_DBR_TIME_STRING; + unsigned int CY_DBR_TIME_SHORT; + unsigned int CY_DBR_TIME_INT; + unsigned int CY_DBR_TIME_FLOAT; + unsigned int CY_DBR_TIME_ENUM; + unsigned int CY_DBR_TIME_CHAR; + unsigned int CY_DBR_TIME_LONG; + unsigned int CY_DBR_TIME_DOUBLE; + unsigned int CY_DBR_GR_STRING; + unsigned int CY_DBR_GR_SHORT; + unsigned int CY_DBR_GR_INT; + unsigned int CY_DBR_GR_FLOAT; + unsigned int CY_DBR_GR_ENUM; + unsigned int CY_DBR_GR_CHAR; + unsigned int CY_DBR_GR_LONG; + unsigned int CY_DBR_GR_DOUBLE; + unsigned int CY_DBR_CTRL_STRING; + unsigned int CY_DBR_CTRL_SHORT; + unsigned int CY_DBR_CTRL_INT; + unsigned int CY_DBR_CTRL_FLOAT; + unsigned int CY_DBR_CTRL_ENUM; + unsigned int CY_DBR_CTRL_CHAR; + unsigned int CY_DBR_CTRL_LONG; + unsigned int CY_DBR_CTRL_DOUBLE; + int CY_ECA_NORMAL; + int CY_ECA_ALLOCMEM; + int CY_ECA_TOLARGE; + int CY_ECA_TIMEOUT; + int CY_ECA_BADTYPE; + int CY_ECA_INTERNAL; + int CY_ECA_GETFAIL; + int CY_ECA_PUTFAIL; + int CY_ECA_BADCOUNT; + int CY_ECA_BADSTR; + int CY_ECA_DISCONN; + int CY_ECA_DBLCHNL; + int CY_ECA_EVDISALLOW; + int CY_ECA_BADMONID; + int CY_ECA_BADMASK; + int CY_ECA_IODONE; + int CY_ECA_IOINPROGRESS; + int CY_ECA_BADSYNCGRP; + int CY_ECA_PUTCBINPROG; + int CY_ECA_NORDACCESS; + int CY_ECA_NOWTACCESS; + int CY_ECA_ANACHRONISM; + int CY_ECA_NOSEARCHADDR; + int CY_ECA_NOCONVERT; + int CY_ECA_BADCHID; + int CY_ECA_BADFUNCPTR; + int CY_ECA_ISATTACHED; + int CY_ECA_UNAVAILINSERV; + int CY_ECA_CHANDESTROY; + int CY_ECA_BADPRIORITY; + int CY_ECA_NOTTHREADED; + int CY_ECA_16KARRAYCLIENT; + int CY_ECA_CONNSEQTMO; + int CY_ECA_UNRESPTMO; + int ICAFE_CS_NEVER_CONN; + int ICAFE_CS_PREV_CONN; + int ICAFE_CS_CONN; + int ICAFE_CS_CLOSED; + int ICAFE_CS_DISCONN; + int ICAFE_CS_UNKNOWN; + int ICAFE_TYPENOTCONN; + int ICAFE_RULE_FALSE; + int ICAFE_BADCOUNT; + int ICAFE_CALLBACK_NOT_YET_INVOKED; + int ICAFE_WAITING_FOR_PREV_CALLBACK; + int ICAFE_CACHE_EMPTY; + int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + int ICAFE_SET_AND_GET_MISMATCH; + int ICAFE_CA_OP_GET; + int ICAFE_CA_OP_PUT; + int ICAFE_CA_OP_CREATE_CHANNEL; + int ICAFE_CA_OP_ADD_EVENT; + int ICAFE_CA_OP_CLEAR_EVENT; + int ICAFE_CA_OP_OTHER; + int ICAFE_CA_OP_CONN_DOWN; + int ICAFE_CA_OP_CONN_UP; + int ICAFE_DAQ_RUN; + int ICAFE_DAQ_PAUSED; + int ICAFE_DAQ_STOPPED; + int ECAFE_LOAD_COLLECTION; + int ECAFE_LOAD_GROUP; + int ICAFE_NORMAL; + int ICAFE_SUCCESS; + int ECAFE_NODATA; + int ECAFE_INVALID_TYPE; + int ECAFE_BADCOUNT; + int ECAFE_BADSTR; + int ECAFE_BADTYPE; + int ECAFE_NO_CONVERT; + int ECAFE_NULLCONTEXT; + int ECAFE_NULLCHID; + int ECAFE_NULLEVID; + int ECAFE_UNKNOWN_COLLECTION; + int ECAFE_EMPTY_COLLECTION; + int ECAFE_COLLECTION_PREV_DEF; + int ECAFE_COLLECTION_INVALID_MEMBER; + int ECAFE_RULE_FALSE; + int ECAFE_UNKNOWN_GROUP; + int ECAFE_EMPTY_GROUP; + int ECAFE_GROUP_PREV_DEF; + int ECAFE_INVALID_HANDLE; + int ECAFE_INVALID_GROUP_HANDLE; + int ECAFE_NORDACCESS; + int ECAFE_NOWTACCESS; + int ECAFE_TIMEOUT; + int ECAFE_CANNOT_OPEN_FILE; + int ECAFE_INVALID_SWITCH_CASE; + int ECAFE_PVALIAS_PREV_DEF; + int ECAFE_PVALIAS_INVALID; + int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS; + int ECAFE_DEVICE_ATTRIB_NOT_FOUND; + int ECAFE_HASH_UNIQUEID_EXISTS; + int ECAFE_WRONG_CA_CONTEXT; + int ECAFE_INVALID_CAFENUM_POLICY_TYPE; + int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + int ECAFE_INVALID_ENUM_INDEX; + int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + int ECAFE_TIMEOUT_SET_AND_MATCH; + int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + int ECAFE_INCONSISTENT_CONTAINER_CORRECTED; + int ECAFE_BPM_DATA_IS_INVALID; + int ECAFE_BITSHUFF_DECOMPRESS; + int ECAFE_BITSHUFF_ALLOCMEM; + int ECAFE_BITSHUFF_REALLOCMEM; + int ECAFE_BITSHUFF_BADCOUNT; + int ECAFE_BSREAD_MULTIPART_MESS_NODATA; + int ECAFE_BSREAD_PARSEFAIL_MAINHEADER; + int ECAFE_BSREAD_PARSEFAIL_DATAHEADER; + int ECAFE_BSREAD_ZMQSTREAM_NULL; + int ERRNO_EINTR; + int ERRNO_EAGAIN; + int ERRNO_EFAULT; + int ERRNO_EINVAL; + int ERRNO_ENOTSOCK; + int ERRNO_EPROTONOSUPPORT; + int SEV_NO_ALARM; + int SEV_MINOR; + int SEV_MAJOR; + int SEV_INVALID; + int STAT_NO_ALARM; + int STAT_READ; + int STAT_WRITE; + int STAT_HIHI; + int STAT_HIGH; + int STAT_LOLO; + int STAT_LOW; + int STAT_STATE; + int STAT_COS; + int STAT_COMM; + int STAT_TIMEOUT; + int STAT_HWLIMIT; + int STAT_CALC; + int STAT_SCAN; + int STAT_LINK; + int STAT_SOFT; + int STAT_BAD_SUB; + int STAT_UDF; + int STAT_DISABLE; + int STAT_SIMM; + int STAT_READ_ACCESS; + int STAT_WRITE_ACCESS; + unsigned int WITHOUT_CALLBACK; + unsigned int WITH_CALLBACK_DEFAULT; + unsigned int WITH_CALLBACK_USER_SUPPLIED; + unsigned int WITH_FLUSH_IO; + unsigned int WITH_PEND_IO; + unsigned int WITH_PEND_EVENT; + unsigned int WITH_POLL; + unsigned int FLUSH_AUTOMATIC; + unsigned int FLUSH_NOW; + unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION; + unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION; + unsigned int FLUSH_AFTER_EACH_MESSAGE; + unsigned int FLUSH_AFTER_EACH_GROUP_CREATION; + unsigned int FLUSH_DESIGNATED_TO_CLIENT; + unsigned int GET_CACHE_NO_CHECK; + unsigned int GET_CACHE_NO_WAIT; + unsigned int GET_CACHE_NOW; + unsigned int GET_CACHE_WAIT; + unsigned int GET_FROM_CACHE; + unsigned int GET_FROM_IOC; + unsigned int NATIVE_DATATYPE; + unsigned int LOWEST_DATATYPE; + unsigned int BLOCKING; + unsigned int WAIT; + unsigned int NON_BLOCKING; + unsigned int NO_WAIT; + unsigned int NO_MESSAGE; + unsigned int PRE_REQUEST; + unsigned int FROM_REQUEST; + unsigned int FROM_PEND; + unsigned int FROM_CALLBACK; + unsigned int FROM_MESSAGE; + unsigned int NOT_INITIATED; + unsigned int PENDING; + unsigned int COMPLETE; + double DEFAULT_TIMEOUT_PEND_EVENT; + double DEFAULT_TIMEOUT_PEND_IO; + std::string INVALID_ENUM_RETURN_STRING; + short INVALID_ENUM_RETURN_VALUE; + unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK; + short BSREAD_ZEROMQ_TIMEOUT_MS; +}; + + +/* "PyCafeDefs.pxi":663 + * + * + * cdef class channelInfo: # <<<<<<<<<<<<<< + * cdef readonly long channelID + * cdef readonly bint connectFlag + */ +struct __pyx_obj_6PyCafe_channelInfo { + PyObject_HEAD + long channelID; + int connectFlag; + std::string hostName; + unsigned int nelem; + int dataType; + std::string dataTypeAsString; + unsigned short accessRead; + unsigned short accessWrite; + std::string className; + int connectionState; + int cafeConnectionState; + std::string connectionStateAsString; + std::string cafeConnectionStateAsString; + CAFEDataTypeCode cdt; + CAFEStatusCode csc; + CAOPCodes caop; +}; + + +/* "PyCafeDefs.pxi":753 + * + * ################################################################################## + * cdef class pvctrl: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ +struct __pyx_obj_6PyCafe_pvctrl { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvctrl *__pyx_vtab; + unsigned int nelem; + int alarmStatus; + int alarmSeverity; + unsigned short precision; + PyObject *units; + unsigned short noEnumStrings; + PyObject *enumStrings; + PyObject *upperDisplayLimit; + PyObject *lowerDisplayLimit; + PyObject *upperAlarmLimit; + PyObject *upperWarningLimit; + PyObject *lowerWarningLimit; + PyObject *lowerAlarmLimit; + PyObject *upperControlLimit; + PyObject *lowerControlLimit; + PyObject *value; + int status; +}; + + +/* "PyCafeDefs.pxi":847 + * ################################################################################## + * + * cdef class CafeException(Exception): # <<<<<<<<<<<<<< + * cdef readonly str type + * cdef readonly str source + */ +struct __pyx_obj_6PyCafe_CafeException { + PyBaseExceptionObject __pyx_base; + PyObject *type; + PyObject *source; + unsigned int handle; + PyObject *name; + int error_code; + PyObject *error_text; + PyObject *error_info; +}; + + +/* "PyCafeDefs.pxi":909 + * + * + * cdef class monitorpolicy: # <<<<<<<<<<<<<< + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType + */ +struct __pyx_obj_6PyCafe_monitorpolicy { + PyObject_HEAD + chtype dataType; + chtype dbrDataType; + DBR_TYPE cafeDbrType; + unsigned int nelem; + unsigned int mask; + unsigned int userArgs; + int status; + unsigned int monid; + int maskHasDBE_PROPERTY; + int maskHasDBE_VALUE; + int maskHasDBE_LOG; + int maskHasDBE_ALARM; +}; + + +/* "PyCafeDefs.pxi":956 + * + * ################################################################################## + * cdef class pvdata: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ +struct __pyx_obj_6PyCafe_pvdata { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvdata *__pyx_vtab; + unsigned int nelem; + int alarmStatus; + int alarmSeverity; + PyObject *alarmStatusAsString; + PyObject *alarmSeverityAsString; + PyObject *ts; + PyObject *tsDate; + PyObject *tsDateAsString; + PyObject *bsDateAsString; + PyObject *value; + int status; + PyObject *statusAsString; + unsigned PY_LONG_LONG pulseID; + int dataType; + PyObject *dataTypeAsString; +}; + + +/* "PyCafeDefs.pxi":1045 + * + * ################################################################################## + * cdef class pvgroup: # <<<<<<<<<<<<<< + * cdef public list pvdata + * cdef public unsigned int npv + */ +struct __pyx_obj_6PyCafe_pvgroup { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvgroup *__pyx_vtab; + PyObject *pvdata; + unsigned int npv; + std::string name; + int groupStatus; + unsigned int groupHandle; + int rule; + int hasAlarm; + int hasTS; +}; + + +/* "PyCafeDefs.pxi":1378 + * + * + * cdef class bschannel: # <<<<<<<<<<<<<< + * cdef readonly string name + * cdef readonly string type + */ +struct __pyx_obj_6PyCafe_bschannel { + PyObject_HEAD + std::string name; + std::string type; + int modulo; + int offset; + unsigned int nelem; + int BSEnabled; +}; + + +/* "PyCafeDefs.pxi":1394 + * self.BSEnabled = False + * + * cdef class BSData: # <<<<<<<<<<<<<< + * cdef readonly string htype + * cdef readonly unsigned long long pulse_id + */ +struct __pyx_obj_6PyCafe_BSData { + PyObject_HEAD + std::string htype; + unsigned PY_LONG_LONG pulse_id; + PyObject *BSChannel; + PyObject *pv; + PyObject *pvIdx; + PyObject *handle; + PyObject *global_timestamp; + PyObject *gtsDate; + int isBS; + unsigned int nPV; + unsigned int nBSEnabled; + unsigned short nhwm; + int timeoutMS; + unsigned int nChannels; + unsigned int nNullData; + float pGoodData; + int status; + PyObject *statusAsString; + int daqStop; + PyObject *hasNewData; + PyObject *pvdata; +}; + + +/* "PyCafeDefs.pxi":1692 + * + * + * cdef class SFDBPMData: # <<<<<<<<<<<<<< + * cdef readonly list x + * cdef readonly list y + */ +struct __pyx_obj_6PyCafe_SFDBPMData { + PyObject_HEAD + PyObject *x; + PyObject *y; + PyObject *q; + PyObject *Energy; + PyObject *xStatus; + PyObject *yStatus; + PyObject *qStatus; + PyObject *EnergyStatus; + int isAllXOK; + int isAllYOK; + int isAllQOK; + int isAllOK; + PyObject *device; + int status; +}; + + +/* "PyCafe.pyx":151 + * + * ################################################################################ + * cdef class CyCafe: # <<<<<<<<<<<<<< + * """ + * Class with associated process variable meta data. + */ +struct __pyx_obj_6PyCafe_CyCafe { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_CyCafe *__pyx_vtab; + CAFE *_c_cafe; + double valFloat; + dbr_long_t valInt; + std::string valStr; + std::vector vFloat; + std::vector vInt; + std::vector vStr; + PyObject *_exception_text; + int _enable_exceptions; + double _min_timeout; + CAFEStatus cs; + CAFEStatusSeverity css; + HandleHelper hh; + PolicyHelper ph; + ChannelRegalia channelInfo; + DBPMKeeper dbpm; + int dbpmInitialized; + int BSInitialized; + int isBSinCAOnly; + BSDataHolder bsd; +}; + + +/* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ +struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv { + PyObject_HEAD + PyObject *__pyx_v_func; +}; + + +/* "View.MemoryView":105 + * + * @cname("__pyx_array") + * cdef class array: # <<<<<<<<<<<<<< + * + * cdef: + */ +struct __pyx_array_obj { + PyObject_HEAD + struct __pyx_vtabstruct_array *__pyx_vtab; + char *data; + Py_ssize_t len; + char *format; + int ndim; + Py_ssize_t *_shape; + Py_ssize_t *_strides; + Py_ssize_t itemsize; + PyObject *mode; + PyObject *_format; + void (*callback_free_data)(void *); + int free_data; + int dtype_is_object; +}; + + +/* "View.MemoryView":279 + * + * @cname('__pyx_MemviewEnum') + * cdef class Enum(object): # <<<<<<<<<<<<<< + * cdef object name + * def __init__(self, name): + */ +struct __pyx_MemviewEnum_obj { + PyObject_HEAD + PyObject *name; +}; + + +/* "View.MemoryView":330 + * + * @cname('__pyx_memoryview') + * cdef class memoryview(object): # <<<<<<<<<<<<<< + * + * cdef object obj + */ +struct __pyx_memoryview_obj { + PyObject_HEAD + struct __pyx_vtabstruct_memoryview *__pyx_vtab; + PyObject *obj; + PyObject *_size; + PyObject *_array_interface; + PyThread_type_lock lock; + __pyx_atomic_int acquisition_count[2]; + __pyx_atomic_int *acquisition_count_aligned_p; + Py_buffer view; + int flags; + int dtype_is_object; + __Pyx_TypeInfo *typeinfo; +}; + + +/* "View.MemoryView":961 + * + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< + * "Internal class for passing memoryview slices to Python" + * + */ +struct __pyx_memoryviewslice_obj { + struct __pyx_memoryview_obj __pyx_base; + __Pyx_memviewslice from_slice; + PyObject *from_object; + PyObject *(*to_object_func)(char *); + int (*to_dtype_func)(char *, PyObject *); +}; + + + +/* "View.MemoryView":105 + * + * @cname("__pyx_array") + * cdef class array: # <<<<<<<<<<<<<< + * + * cdef: + */ + +struct __pyx_vtabstruct_array { + PyObject *(*get_memview)(struct __pyx_array_obj *); +}; +static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; + + +/* "PyCafeDefs.pxi":753 + * + * ################################################################################## + * cdef class pvctrl: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ + +struct __pyx_vtabstruct_6PyCafe_pvctrl { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvctrl *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvctrl *__pyx_vtabptr_6PyCafe_pvctrl; + + +/* "PyCafeDefs.pxi":956 + * + * ################################################################################## + * cdef class pvdata: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ + +struct __pyx_vtabstruct_6PyCafe_pvdata { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvdata *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvdata *__pyx_vtabptr_6PyCafe_pvdata; + + +/* "PyCafeDefs.pxi":1045 + * + * ################################################################################## + * cdef class pvgroup: # <<<<<<<<<<<<<< + * cdef public list pvdata + * cdef public unsigned int npv + */ + +struct __pyx_vtabstruct_6PyCafe_pvgroup { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvgroup *, PyObject *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvgroup *__pyx_vtabptr_6PyCafe_pvgroup; + + +/* "PyCafe.pyx":151 + * + * ################################################################################ + * cdef class CyCafe: # <<<<<<<<<<<<<< + * """ + * Class with associated process variable meta data. + */ + +struct __pyx_vtabstruct_6PyCafe_CyCafe { + PyObject *(*prepareCafeException)(struct __pyx_obj_6PyCafe_CyCafe *, int, PyObject *, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args); + PyObject *(*getMonitorWhenToFlushSendBuffer)(struct __pyx_obj_6PyCafe_CyCafe *); + PyObject *(*checkForHandle)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle *__pyx_optional_args); + PyObject *(*checkForHandleList)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList *__pyx_optional_args); + PyObject *(*checkForGroupHandle)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle *__pyx_optional_args); +}; +static struct __pyx_vtabstruct_6PyCafe_CyCafe *__pyx_vtabptr_6PyCafe_CyCafe; + + +/* "View.MemoryView":330 + * + * @cname('__pyx_memoryview') + * cdef class memoryview(object): # <<<<<<<<<<<<<< + * + * cdef object obj + */ + +struct __pyx_vtabstruct_memoryview { + char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); + PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); +}; +static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; + + +/* "View.MemoryView":961 + * + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< + * "Internal class for passing memoryview slices to Python" + * + */ + +struct __pyx_vtabstruct__memoryviewslice { + struct __pyx_vtabstruct_memoryview __pyx_base; +}; +static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* py_dict_keys.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod0.proto */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CallUnboundCMethod0(cfunc, self)\ + (likely((cfunc)->func) ?\ + (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ + (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ + (PY_VERSION_HEX >= 0x030700A0 ?\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)) +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ + (likely(is_tuple || PyTuple_Check(tuple)) ?\ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ + (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* BuildPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char); + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); + +/* IncludeStringH.proto */ +#include + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* PyObjectFormat.proto */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); +#else +#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +#endif + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* SetItemInt.proto */ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck); + +/* dict_getitem_default.proto */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); + +/* CallUnboundCMethod1.proto */ +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/* CallUnboundCMethod2.proto */ +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char); + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_unsigned_int(unsigned int value, Py_ssize_t width, char padding_char, char format_char); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); + +/* SliceTupleAndList.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/* CythonFunction.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) +static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* decode_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + return __Pyx_decode_c_bytes( + PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), + start, stop, encoding, errors, decode_func); +} + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +/* MemviewSliceInit.proto */ +#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d +#define __Pyx_MEMVIEW_DIRECT 1 +#define __Pyx_MEMVIEW_PTR 2 +#define __Pyx_MEMVIEW_FULL 4 +#define __Pyx_MEMVIEW_CONTIG 8 +#define __Pyx_MEMVIEW_STRIDED 16 +#define __Pyx_MEMVIEW_FOLLOW 32 +#define __Pyx_IS_C_CONTIG 1 +#define __Pyx_IS_F_CONTIG 2 +static int __Pyx_init_memviewslice( + struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference); +static CYTHON_INLINE int __pyx_add_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); +static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); +#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p) +#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview)) +#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) +#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__) +static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* py_dict_values.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* py_dict_clear.proto */ +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + +/* PyUnicodeContains.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { + int result = PyUnicode_Contains(text, substring); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* None.proto */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); + +/* UnaryNegOverflows.proto */ +#define UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ +/* decode_c_string.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +/* ListExtend.proto */ +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* None.proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long); + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* PatchModuleWithCoroutine.proto */ +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); + +/* PatchInspect.proto */ +static PyObject* __Pyx_patch_inspect(PyObject* module); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +/* MemviewSliceIsContig.proto */ +static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); + +/* OverlappingSlices.proto */ +static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize); + +/* Capsule.proto */ +static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); + +/* ArrayAPI.proto */ +#ifndef _ARRAYARRAY_H +#define _ARRAYARRAY_H +typedef struct arraydescr { + int typecode; + int itemsize; + PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); + int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); +#if PY_MAJOR_VERSION >= 3 + char *formats; +#endif +} arraydescr; +struct arrayobject { + PyObject_HEAD + Py_ssize_t ob_size; + union { + char *ob_item; + float *as_floats; + double *as_doubles; + int *as_ints; + unsigned int *as_uints; + unsigned char *as_uchars; + signed char *as_schars; + char *as_chars; + unsigned long *as_ulongs; + long *as_longs; +#if PY_MAJOR_VERSION >= 3 + unsigned long long *as_ulonglongs; + long long *as_longlongs; +#endif + short *as_shorts; + unsigned short *as_ushorts; + Py_UNICODE *as_pyunicodes; + void *as_voidptr; + } data; + Py_ssize_t allocated; + struct arraydescr *ob_descr; + PyObject *weakreflist; +#if PY_MAJOR_VERSION >= 3 + int ob_exports; +#endif +}; +#ifndef NO_NEWARRAY_INLINE +static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr) { + arrayobject *op; + size_t nbytes; + if (size < 0) { + PyErr_BadInternalCall(); + return NULL; + } + nbytes = size * descr->itemsize; + if (nbytes / descr->itemsize != (size_t)size) { + return PyErr_NoMemory(); + } + op = (arrayobject *) type->tp_alloc(type, 0); + if (op == NULL) { + return NULL; + } + op->ob_descr = descr; + op->allocated = size; + op->weakreflist = NULL; + op->ob_size = size; + if (size <= 0) { + op->data.ob_item = NULL; + } + else { + op->data.ob_item = PyMem_NEW(char, nbytes); + if (op->data.ob_item == NULL) { + Py_DECREF(op); + return PyErr_NoMemory(); + } + } + return (PyObject *) op; +} +#else +PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr); +#endif +static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + self->ob_size = n; + self->allocated = n; + return 0; +} +static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + Py_ssize_t newsize; + if (n < self->allocated && n*4 > self->allocated) { + self->ob_size = n; + return 0; + } + newsize = n + (n / 2) + 1; + if (newsize <= n) { + PyErr_NoMemory(); + return -1; + } + PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + self->ob_size = n; + self->allocated = newsize; + return 0; +} +#endif + +/* None.proto */ +#include + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value); + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(ChannelWhenToFlushSendBufferPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_char_t(dbr_char_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_enum_t(dbr_enum_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int16_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int16_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int8(npy_int8 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int8_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int8_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint8_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint8_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int32_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int32_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint32_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint32_t(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_ERROR_STATE(CAFE_ERROR_STATE value); + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); + +/* MemviewSliceCopyTemplate.proto */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* TypeInfoCompare.proto */ +static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); + +/* MemviewSliceValidateAndInit.proto */ +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *, int writable_flag); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + +static PyObject *__pyx_f_6PyCafe_6pvctrl_showPrint(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6pvdata_showPrint(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto*/ +static PyObject *__pyx_f_6PyCafe_7pvgroup_showPrint(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_npv, PyObject *__pyx_v_grouplist); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_prepareCafeException(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_status, PyObject *__pyx_v__METHOD, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libcpp.string' */ + +/* Module declarations from 'libcpp.vector' */ + +/* Module declarations from 'libcpp.utility' */ + +/* Module declarations from 'libcpp.map' */ + +/* Module declarations from 'libcpp.pair' */ + +/* Module declarations from 'cython.view' */ + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython.version' */ + +/* Module declarations from 'cpython.exc' */ + +/* Module declarations from 'cpython.module' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'cpython.tuple' */ + +/* Module declarations from 'cpython.list' */ + +/* Module declarations from 'cpython.sequence' */ + +/* Module declarations from 'cpython.mapping' */ + +/* Module declarations from 'cpython.iterator' */ + +/* Module declarations from 'cpython.number' */ + +/* Module declarations from 'cpython.int' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.bool' */ +static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; + +/* Module declarations from 'cpython.long' */ + +/* Module declarations from 'cpython.float' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.complex' */ +static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; + +/* Module declarations from 'cpython.string' */ + +/* Module declarations from 'cpython.unicode' */ + +/* Module declarations from 'cpython.dict' */ + +/* Module declarations from 'cpython.instance' */ + +/* Module declarations from 'cpython.function' */ + +/* Module declarations from 'cpython.method' */ + +/* Module declarations from 'cpython.weakref' */ + +/* Module declarations from 'cpython.getargs' */ + +/* Module declarations from 'cpython.pythread' */ + +/* Module declarations from 'cpython.pystate' */ + +/* Module declarations from 'cpython.cobject' */ + +/* Module declarations from 'cpython.oldbuffer' */ + +/* Module declarations from 'cpython.set' */ + +/* Module declarations from 'cpython.bytes' */ + +/* Module declarations from 'cpython.pycapsule' */ + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ + +/* Module declarations from 'array' */ + +/* Module declarations from 'cpython.array' */ +static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0; +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'PyCafe' */ +static PyTypeObject *__pyx_ptype_6PyCafe_CyCa = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_channelInfo = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvctrl = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CafeException = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_monitorpolicy = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvdata = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvgroup = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_bschannel = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_BSData = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_SFDBPMData = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CyCafe = 0; +static PyTypeObject *__pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv = 0; +static PyTypeObject *__pyx_array_type = 0; +static PyTypeObject *__pyx_MemviewEnum_type = 0; +static PyTypeObject *__pyx_memoryview_type = 0; +static PyTypeObject *__pyx_memoryviewslice_type = 0; +static PyObject *__pyx_v_6PyCafe_py_cb = 0; +static PyObject *__pyx_v_6PyCafe_openCallbackDictGlobal = 0; +static PyObject *__pyx_v_6PyCafe_hmd = 0; +static PyObject *__pyx_v_6PyCafe_handleMonDictGlobal = 0; +static PyObject *__pyx_v_6PyCafe_monDictGlobal = 0; +static PyObject *__pyx_v_6PyCafe_openDictGlobal = 0; +static PyObject *__pyx_v_6PyCafe_getDictGlobal = 0; +static PyObject *__pyx_v_6PyCafe_putDictGlobal = 0; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_MED; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_LOW; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_NONE; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL; +static PyObject *__pyx_v_6PyCafe_py_cb_handle = 0; +static PyObject *__pyx_v_6PyCafe_py_cb_handle_open = 0; +static PyObject *__pyx_v_6PyCafe_cbobjt = 0; +static PyObject *generic = 0; +static PyObject *strided = 0; +static PyObject *indirect = 0; +static PyObject *contiguous = 0; +static PyObject *indirect_contiguous = 0; +static int __pyx_memoryview_thread_locks_used; +static PyThread_type_lock __pyx_memoryview_thread_locks[8]; +__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder); /*proto*/ +__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder); /*proto*/ +__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string); /*proto*/ +__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int); /*proto*/ +__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string); /*proto*/ +__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int); /*proto*/ +__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int); /*proto*/ +static PyObject *__pyx_f_6PyCafe_getMatchedDataType(PyObject *, PyObject *); /*proto*/ +static struct __pyx_obj_6PyCafe_pvdata *__pyx_f_6PyCafe_PVDataHolderToStruct(PVDataHolder, struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct *__pyx_optional_args); /*proto*/ +static struct __pyx_obj_6PyCafe_pvctrl *__pyx_f_6PyCafe_PVCtrlHolderToStruct(PVCtrlHolder, struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct *__pyx_optional_args); /*proto*/ +static struct __pyx_obj_6PyCafe_channelInfo *__pyx_f_6PyCafe_channelRegaliaToStruct(ChannelRegalia); /*proto*/ +static struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_f_6PyCafe_dbpmHolderToStruct(DBPMKeeper); /*proto*/ +static PyObject *__pyx_f_6PyCafe_BSDataHolderToStruct(BSDataHolder); /*proto*/ +static PyObject *__pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(struct __pyx_obj_6PyCafe_CafeException *, PyObject *); /*proto*/ +static std::string __pyx_convert_string_from_py_std__in_string(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_unsigned_int(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_pair_to_py_float____std_3a__3a_string(std::pair const &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_float(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_unsigned_short(const std::vector &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_int(PyObject *); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_int(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_dbr_long_t(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_double(const std::vector &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_double(PyObject *); /*proto*/ +static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/ +static void *__pyx_align_pointer(void *, size_t); /*proto*/ +static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/ +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ +static PyObject *_unellipsify(PyObject *, int); /*proto*/ +static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ +static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ +static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ +static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ +static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ +static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/ +static int __pyx_memoryview_err(PyObject *, char *); /*proto*/ +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ +static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t = { "int16_t", NULL, sizeof(__pyx_t_5numpy_int16_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int16_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int16_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int8_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +#define __Pyx_MODULE_NAME "PyCafe" +extern int __pyx_module_is_main_PyCafe; +int __pyx_module_is_main_PyCafe = 0; + +/* Implementation of 'PyCafe' */ +static PyObject *__pyx_builtin_print; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_hex; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_UnicodeDecodeError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_MemoryError; +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_UserWarning; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin_ImportError; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_Ellipsis; +static PyObject *__pyx_builtin_id; +static PyObject *__pyx_builtin_IndexError; +static const char __pyx_k_0[] = "({0})"; +static const char __pyx_k_1[] = "============//1//"; +static const char __pyx_k_C[] = "C"; +static const char __pyx_k_O[] = "O"; +static const char __pyx_k_c[] = "c"; +static const char __pyx_k_d[] = "d"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_h[] = "h"; +static const char __pyx_k_s[] = "[%s]"; +static const char __pyx_k_BS[] = "BS"; +static const char __pyx_k_CA[] = "CA"; +static const char __pyx_k_PV[] = "PV ="; +static const char __pyx_k_VA[] = "VA"; +static const char __pyx_k__3[] = ""; +static const char __pyx_k__4[] = " ("; +static const char __pyx_k__5[] = ")"; +static const char __pyx_k_cb[] = "cb"; +static const char __pyx_k_dt[] = "dt"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_mv[] = "mv"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_pv[] = "pv= "; +static const char __pyx_k_ts[] = "ts ="; +static const char __pyx_k_wf[] = "wf"; +static const char __pyx_k__10[] = " "; +static const char __pyx_k__15[] = "------------------------------------------------------------------------"; +static const char __pyx_k__23[] = "!!"; +static const char __pyx_k__24[] = "---------------------------------"; +static const char __pyx_k__26[] = "--------------------------------------------"; +static const char __pyx_k__36[] = " ["; +static const char __pyx_k__46[] = "{} {} \n{}"; +static const char __pyx_k__47[] = ","; +static const char __pyx_k__48[] = "{} {} {}"; +static const char __pyx_k__49[] = "{} {} \n{} {}"; +static const char __pyx_k__50[] = "{} {} {} {} {} {}"; +static const char __pyx_k__51[] = ":"; +static const char __pyx_k__53[] = "{} {} \n{} {} {} \n{}"; +static const char __pyx_k_art[] = "art"; +static const char __pyx_k_d_2[] = "[%d]"; +static const char __pyx_k_dbr[] = "dbr"; +static const char __pyx_k_end[] = "end"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_has[] = "has"; +static const char __pyx_k_hex[] = "hex"; +static const char __pyx_k_int[] = "int"; +static const char __pyx_k_new[] = "__new__"; +static const char __pyx_k_obj[] = "obj"; +static const char __pyx_k_pyx[] = "{} {}.pyx: {} \n{}"; +static const char __pyx_k_sec[] = " sec. "; +static const char __pyx_k_set[] = "set"; +static const char __pyx_k_str[] = "str"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_wpk[] = "wpk"; +static const char __pyx_k_zip[] = "zip"; +static const char __pyx_k_BSCA[] = "BSCA"; +static const char __pyx_k_BS_2[] = "] BS"; +static const char __pyx_k_CA_2[] = "] CA"; +static const char __pyx_k_CyCa[] = "CyCa"; +static const char __pyx_k_None[] = "None"; +static const char __pyx_k_PV_2[] = "PV="; +static const char __pyx_k_PV_3[] = " PV="; +static const char __pyx_k_PV_4[] = "PV"; +static const char __pyx_k__111[] = "============"; +static const char __pyx_k__114[] = "======================================================"; +static const char __pyx_k__118[] = "=============="; +static const char __pyx_k__121[] = "["; +static const char __pyx_k__122[] = "]"; +static const char __pyx_k__138[] = " : "; +static const char __pyx_k__173[] = "."; +static const char __pyx_k_args[] = "args"; +static const char __pyx_k_base[] = "base"; +static const char __pyx_k_bool[] = "bool"; +static const char __pyx_k_byte[] = "byte"; +static const char __pyx_k_cafe[] = "cafe"; +static const char __pyx_k_copy[] = "copy"; +static const char __pyx_k_dict[] = "__dict__"; +static const char __pyx_k_from[] = " from "; +static const char __pyx_k_func[] = "func"; +static const char __pyx_k_init[] = "init"; +static const char __pyx_k_int8[] = "int8"; +static const char __pyx_k_intc[] = "intc"; +static const char __pyx_k_intp[] = "intp"; +static const char __pyx_k_keys[] = "keys"; +static const char __pyx_k_len1[] = "len1"; +static const char __pyx_k_len2[] = "len2"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mask[] = "mask ="; +static const char __pyx_k_mode[] = "mode"; +static const char __pyx_k_mpid[] = "mpid"; +static const char __pyx_k_name[] = "name ="; +static const char __pyx_k_ndim[] = "ndim"; +static const char __pyx_k_nsec[] = " nsec"; +static const char __pyx_k_open[] = "open"; +static const char __pyx_k_pack[] = "pack"; +static const char __pyx_k_pv_2[] = "pv = "; +static const char __pyx_k_pv_3[] = "pv"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_show[] = "show"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_step[] = "step"; +static const char __pyx_k_stop[] = "stop"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_time[] = "time"; +static const char __pyx_k_ts_2[] = "ts"; +static const char __pyx_k_type[] = "_type"; +static const char __pyx_k_uint[] = "uint"; +static const char __pyx_k_utf8[] = "utf8"; +static const char __pyx_k_wait[] = "wait"; +static const char __pyx_k_when[] = "when"; +static const char __pyx_k_wmpk[] = "wmpk"; +static const char __pyx_k_ASCII[] = "ASCII"; +static const char __pyx_k_Array[] = "Array"; +static const char __pyx_k_UTF_8[] = "UTF-8"; +static const char __pyx_k_array[] = "array"; +static const char __pyx_k_bool8[] = "bool8"; +static const char __pyx_k_cName[] = "cName"; +static const char __pyx_k_c_int[] = "c_int"; +static const char __pyx_k_cache[] = "cache"; +static const char __pyx_k_cinit[] = "__cinit__"; +static const char __pyx_k_class[] = "__class__"; +static const char __pyx_k_close[] = "close"; +static const char __pyx_k_cname[] = "cname"; +static const char __pyx_k_ctype[] = "ctype"; +static const char __pyx_k_dtype[] = "dtype"; +static const char __pyx_k_empty[] = "empty"; +static const char __pyx_k_error[] = "error"; +static const char __pyx_k_flags[] = "flags"; +static const char __pyx_k_float[] = "float"; +static const char __pyx_k_force[] = "force"; +static const char __pyx_k_gName[] = "gName"; +static const char __pyx_k_getPV[] = "getPV"; +static const char __pyx_k_gname[] = "gname"; +static const char __pyx_k_iElem[] = "iElem"; +static const char __pyx_k_index[] = "index"; +static const char __pyx_k_int16[] = "int16"; +static const char __pyx_k_int32[] = "int32"; +static const char __pyx_k_int64[] = "int64"; +static const char __pyx_k_int_2[] = "int_"; +static const char __pyx_k_items[] = "items"; +static const char __pyx_k_monid[] = "monid ="; +static const char __pyx_k_nPV_d[] = "nPV = %d"; +static const char __pyx_k_nelem[] = "nelem ="; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_order[] = "order"; +static const char __pyx_k_print[] = "print"; +static const char __pyx_k_pvIdx[] = "pvIdx = "; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_setBS[] = "setBS"; +static const char __pyx_k_shape[] = "shape"; +static const char __pyx_k_short[] = "short"; +static const char __pyx_k_sleep[] = "sleep"; +static const char __pyx_k_split[] = "split"; +static const char __pyx_k_start[] = "start"; +static const char __pyx_k_str_2[] = "str_"; +static const char __pyx_k_ubyte[] = "ubyte"; +static const char __pyx_k_uchar[] = "uchar"; +static const char __pyx_k_uint8[] = "uint8"; +static const char __pyx_k_uintc[] = "uintc"; +static const char __pyx_k_uintp[] = "uintp"; +static const char __pyx_k_utf_8[] = "utf_8"; +static const char __pyx_k_value[] = "value = "; +static const char __pyx_k_BSData[] = "BSData"; +static const char __pyx_k_CyCafe[] = "CyCafe"; +static const char __pyx_k_Cython[] = "Cython"; +static const char __pyx_k_Handle[] = "Handle="; +static const char __pyx_k_Member[] = "Member: "; +static const char __pyx_k_Number[] = "Number"; +static const char __pyx_k_PyCafe[] = "PyCafe"; +static const char __pyx_k_append[] = "append"; +static const char __pyx_k_asDict[] = "asDict"; +static const char __pyx_k_attrib[] = "attrib"; +static const char __pyx_k_bool_2[] = "bool_"; +static const char __pyx_k_bsFlag[] = "bsFlag"; +static const char __pyx_k_c_bool[] = "c_bool"; +static const char __pyx_k_c_byte[] = "c_byte"; +static const char __pyx_k_c_char[] = "c_char"; +static const char __pyx_k_c_int8[] = "c_int8"; +static const char __pyx_k_c_long[] = "c_long"; +static const char __pyx_k_c_uint[] = "c_uint"; +static const char __pyx_k_ctypes[] = "ctypes"; +static const char __pyx_k_decode[] = "decode"; +static const char __pyx_k_double[] = "double"; +static const char __pyx_k_encode[] = "encode"; +static const char __pyx_k_format[] = "format"; +static const char __pyx_k_handle[] = "_handle"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_isBS_d[] = "isBS = %d"; +static const char __pyx_k_isEnum[] = "isEnum"; +static const char __pyx_k_kwargs[] = "kwargs"; +static const char __pyx_k_mask_2[] = "mask"; +static const char __pyx_k_method[] = "method"; +static const char __pyx_k_modulo[] = "modulo"; +static const char __pyx_k_name_2[] = ".name ="; +static const char __pyx_k_name_3[] = "name"; +static const char __pyx_k_name_4[] = "__name__"; +static const char __pyx_k_native[] = "native"; +static const char __pyx_k_netrfc[] = "netrfc"; +static const char __pyx_k_nhwm_d[] = "nhwm = %d"; +static const char __pyx_k_np_int[] = "np.int_"; +static const char __pyx_k_np_str[] = "np.str"; +static const char __pyx_k_offset[] = "offset"; +static const char __pyx_k_pickle[] = "pickle"; +static const char __pyx_k_pvList[] = "pvList"; +static const char __pyx_k_pvctrl[] = "pvctrl"; +static const char __pyx_k_pvdata[] = "pvdata"; +static const char __pyx_k_pvlist[] = "_pvlist"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_single[] = "single"; +static const char __pyx_k_source[] = "_source"; +static const char __pyx_k_status[] = "status ="; +static const char __pyx_k_string[] = "string"; +static const char __pyx_k_struct[] = "struct"; +static const char __pyx_k_timeit[] = "timeit"; +static const char __pyx_k_tsDate[] = "tsDate ="; +static const char __pyx_k_type_2[] = ".type ="; +static const char __pyx_k_type_3[] = "type"; +static const char __pyx_k_uint16[] = "uint16"; +static const char __pyx_k_uint32[] = "uint32"; +static const char __pyx_k_uint64[] = "uint64"; +static const char __pyx_k_unpack[] = "unpack"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_ushort[] = "ushort"; +static const char __pyx_k_valSet[] = "valSet"; +static const char __pyx_k_values[] = "values"; +static const char __pyx_k_widget[] = "widget"; +static const char __pyx_k_Channel[] = "Channel"; +static const char __pyx_k_appname[] = "_appname"; +static const char __pyx_k_c_float[] = "c_float"; +static const char __pyx_k_c_int16[] = "c_int16"; +static const char __pyx_k_c_int32[] = "c_int32"; +static const char __pyx_k_c_int64[] = "c_int64"; +static const char __pyx_k_c_short[] = "c_short"; +static const char __pyx_k_c_ubyte[] = "c_ubyte"; +static const char __pyx_k_c_uint8[] = "c_uint8"; +static const char __pyx_k_c_ulong[] = "c_ulong"; +static const char __pyx_k_c_voidp[] = "c_voidp"; +static const char __pyx_k_c_wchar[] = "c_wchar"; +static const char __pyx_k_dbrBase[] = "dbrBase"; +static const char __pyx_k_float16[] = "float16"; +static const char __pyx_k_float32[] = "float32"; +static const char __pyx_k_float64[] = "float64"; +static const char __pyx_k_float_2[] = "float_"; +static const char __pyx_k_fortran[] = "fortran"; +static const char __pyx_k_getAsyn[] = "getAsyn"; +static const char __pyx_k_getList[] = "getList"; +static const char __pyx_k_gtsDate[] = "gtsDate = "; +static const char __pyx_k_inspect[] = "inspect"; +static const char __pyx_k_isValid[] = "isValid"; +static const char __pyx_k_latin_1[] = "latin-1"; +static const char __pyx_k_memview[] = "memview"; +static const char __pyx_k_monid_2[] = "_monid"; +static const char __pyx_k_ndarray[] = "ndarray"; +static const char __pyx_k_nelem_2[] = "nelem"; +static const char __pyx_k_nelem_d[] = "nelem = %d"; +static const char __pyx_k_np_bool[] = "np.bool_"; +static const char __pyx_k_np_byte[] = "np.byte"; +static const char __pyx_k_np_int8[] = "np.int8"; +static const char __pyx_k_np_intc[] = "np.intc"; +static const char __pyx_k_np_long[] = "np.long"; +static const char __pyx_k_numbers[] = "numbers"; +static const char __pyx_k_pulseID[] = "pulseID ="; +static const char __pyx_k_pv_name[] = "_pv_name"; +static const char __pyx_k_pvgroup[] = "pvgroup"; +static const char __pyx_k_showMax[] = "showMax"; +static const char __pyx_k_timeout[] = "timeout"; +static const char __pyx_k_unicode[] = "unicode"; +static const char __pyx_k_units_s[] = "units = %s"; +static const char __pyx_k_utf_8_2[] = "utf-8"; +static const char __pyx_k_valList[] = "valList"; +static const char __pyx_k_value_2[] = "value ="; +static const char __pyx_k_value_3[] = "value\t = "; +static const char __pyx_k_value_4[] = "value = {} ({})"; +static const char __pyx_k_value_5[] = "value\t = "; +static const char __pyx_k_value_6[] = "value"; +static const char __pyx_k_wrapper[] = "wrapper"; +static const char __pyx_k_Ellipsis[] = "Ellipsis"; +static const char __pyx_k_Handle_2[] = "Handle= "; +static const char __pyx_k_cMembers[] = "cMembers"; +static const char __pyx_k_c_char_p[] = "c_char_p"; +static const char __pyx_k_c_double[] = "c_double"; +static const char __pyx_k_c_size_t[] = "c_size_t"; +static const char __pyx_k_c_uint16[] = "c_uint16"; +static const char __pyx_k_c_uint32[] = "c_uint32"; +static const char __pyx_k_c_uint64[] = "c_uint64"; +static const char __pyx_k_c_ushort[] = "c_ushort"; +static const char __pyx_k_c_void_p[] = "c_void_p"; +static const char __pyx_k_dataType[] = "dataType = "; +static const char __pyx_k_datatype[] = "datatype ="; +static const char __pyx_k_deepcopy[] = "deepcopy"; +static const char __pyx_k_dictFlag[] = "dictFlag"; +static const char __pyx_k_getArray[] = "getArray"; +static const char __pyx_k_getCache[] = "getCache"; +static const char __pyx_k_getGroup[] = "getGroup"; +static const char __pyx_k_getUnits[] = "getUnits"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_handlePV[] = "handlePV"; +static const char __pyx_k_handle_2[] = "( handle ="; +static const char __pyx_k_handle_3[] = ".handle ="; +static const char __pyx_k_handle_4[] = "handle = "; +static const char __pyx_k_handle_5[] = "handle"; +static const char __pyx_k_itemsize[] = "itemsize"; +static const char __pyx_k_longlong[] = "longlong"; +static const char __pyx_k_np_float[] = "np.float_"; +static const char __pyx_k_np_int16[] = "np.int16"; +static const char __pyx_k_np_int32[] = "np.int32"; +static const char __pyx_k_np_int64[] = "np.int64"; +static const char __pyx_k_np_short[] = "np.short"; +static const char __pyx_k_np_str_2[] = "np.str_"; +static const char __pyx_k_np_uint8[] = "np.uint8"; +static const char __pyx_k_np_ulong[] = "np.ulong"; +static const char __pyx_k_pv_value[] = "pv_value"; +static const char __pyx_k_pymodule[] = "_pymodule"; +static const char __pyx_k_pyx_type[] = "__pyx_type"; +static const char __pyx_k_setNelem[] = "setNelem"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_source_2[] = ".source ="; +static const char __pyx_k_status_2[] = "status = "; +static const char __pyx_k_status_3[] = "status"; +static const char __pyx_k_status_4[] = "status="; +static const char __pyx_k_status_d[] = "status = %d"; +static const char __pyx_k_string_2[] = "string_"; +static const char __pyx_k_tsDate_2[] = "tsDate"; +static const char __pyx_k_userArgs[] = "userArgs ="; +static const char __pyx_k_waveform[] = "waveform"; +static const char __pyx_k_BSEnabled[] = "BSEnabled"; +static const char __pyx_k_CafeError[] = "CafeError"; +static const char __pyx_k_Parameter[] = "Parameter:"; +static const char __pyx_k_SIGNATURE[] = "SIGNATURE:"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_bschannel[] = "bschannel"; +static const char __pyx_k_c_ssize_t[] = "c_ssize_t"; +static const char __pyx_k_c_wchar_p[] = "c_wchar_p"; +static const char __pyx_k_cacheFlag[] = "cacheFlag"; +static const char __pyx_k_enumValue[] = "enumValue"; +static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_getPVList[] = "getPVList"; +static const char __pyx_k_getSFdbpm[] = "getSFdbpm"; +static const char __pyx_k_getStatus[] = "getStatus"; +static const char __pyx_k_groupOpen[] = "groupOpen"; +static const char __pyx_k_handlesPV[] = "handlesPV"; +static const char __pyx_k_has_error[] = " has error: "; +static const char __pyx_k_monitorid[] = "monitorid"; +static const char __pyx_k_np_string[] = "np.string"; +static const char __pyx_k_np_uint16[] = "np.uint16"; +static const char __pyx_k_np_uint32[] = "np.uint32"; +static const char __pyx_k_np_uint64[] = "np.uint64"; +static const char __pyx_k_np_ushort[] = "np.ushort"; +static const char __pyx_k_printFlag[] = "printFlag"; +static const char __pyx_k_pulseID_2[] = "pulseID"; +static const char __pyx_k_pv_name_2[] = "pv_name"; +static const char __pyx_k_pyx_state[] = "__pyx_state"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_signature[] = "signature"; +static const char __pyx_k_timeoutMS[] = "timeoutMS"; +static const char __pyx_k_tolerance[] = "tolerance"; +static const char __pyx_k_ulonglong[] = "ulonglong"; +static const char __pyx_k_unicode_2[] = "unicode_"; +static const char __pyx_k_valAction[] = "valAction"; +static const char __pyx_k_ENUM_value[] = "ENUM value:"; +static const char __pyx_k_GROUP_NAME[] = "GROUP NAME = "; +static const char __pyx_k_IndexError[] = "IndexError"; +static const char __pyx_k_No_Members[] = "No. Members = "; +static const char __pyx_k_PyCafe_pyx[] = "PyCafe.pyx"; +static const char __pyx_k_SFDBPMData[] = "SFDBPMData"; +static const char __pyx_k_ValueError[] = "ValueError"; +static const char __pyx_k_bufferSize[] = "bufferSize"; +static const char __pyx_k_c_longlong[] = "c_longlong"; +static const char __pyx_k_dataType_2[] = "dataType"; +static const char __pyx_k_enumString[] = "enumString"; +static const char __pyx_k_error_code[] = "_error_code"; +static const char __pyx_k_error_info[] = "_error_info"; +static const char __pyx_k_error_text[] = "_error_text"; +static const char __pyx_k_exceptions[] = "exceptions"; +static const char __pyx_k_getContext[] = "getContext"; +static const char __pyx_k_getDbrBase[] = "getDbrBase"; +static const char __pyx_k_getPVCache[] = "getPVCache"; +static const char __pyx_k_getPVGroup[] = "getPVGroup"; +static const char __pyx_k_handleList[] = "handleList"; +static const char __pyx_k_hostName_s[] = "hostName = %s"; +static const char __pyx_k_memoryview[] = "memoryview"; +static const char __pyx_k_monitor_id[] = "monitor id"; +static const char __pyx_k_np_float16[] = "np.float16"; +static const char __pyx_k_np_float32[] = "np.float32"; +static const char __pyx_k_np_float64[] = "np.float64"; +static const char __pyx_k_np_ndarray[] = "np.ndarray"; +static const char __pyx_k_np_unicode[] = "np.unicode"; +static const char __pyx_k_openNoWait[] = "openNoWait"; +static const char __pyx_k_parameters[] = "parameters"; +static const char __pyx_k_pulse_id_d[] = "pulse_id = %d"; +static const char __pyx_k_pyx_result[] = "__pyx_result"; +static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static const char __pyx_k_scalarOnly[] = "scalarOnly"; +static const char __pyx_k_setDbrBase[] = "setDbrBase"; +static const char __pyx_k_statusList[] = "statusList"; +static const char __pyx_k_vectorList[] = "vectorList"; +static const char __pyx_k_0_1_2_3_4_5[] = "{0} {1} \n{2} {3} {4} \n{5}"; +static const char __pyx_k_CafePVError[] = "CafePVError"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_MemoryError[] = "MemoryError"; +static const char __pyx_k_OrderedDict[] = "OrderedDict"; +static const char __pyx_k_PickleError[] = "PickleError"; +static const char __pyx_k_SIGNATURE_2[] = "SIGNATURE//2//:"; +static const char __pyx_k_UserWarning[] = "UserWarning"; +static const char __pyx_k_alarmStatus[] = "alarmStatus = "; +static const char __pyx_k_array_array[] = "array.array"; +static const char __pyx_k_c_ulonglong[] = "c_ulonglong"; +static const char __pyx_k_cafeDbrType[] = "cafeDbrType="; +static const char __pyx_k_channelID_s[] = "channelID = %s"; +static const char __pyx_k_channelInfo[] = "channelInfo"; +static const char __pyx_k_className_s[] = "className = %s"; +static const char __pyx_k_collections[] = "collections"; +static const char __pyx_k_dbrDataType[] = "dbrDataType="; +static const char __pyx_k_enumStrings[] = "enumStrings ="; +static const char __pyx_k_gHandleName[] = "gHandleName"; +static const char __pyx_k_ghandleName[] = "ghandleName"; +static const char __pyx_k_handlePVSet[] = "handlePVSet"; +static const char __pyx_k_isConnected[] = "isConnected"; +static const char __pyx_k_monitorStop[] = "monitorStop"; +static const char __pyx_k_nChannels_d[] = "nChannels = %d"; +static const char __pyx_k_nNullData_d[] = "nNullData = %d"; +static const char __pyx_k_np_string_2[] = "np.string_"; +static const char __pyx_k_of_which_BS[] = "of which BS = "; +static const char __pyx_k_openPrepare[] = "openPrepare"; +static const char __pyx_k_pGoodData_f[] = "pGoodData = %f"; +static const char __pyx_k_precision_d[] = "precision = %d"; +static const char __pyx_k_printHandle[] = "printHandle"; +static const char __pyx_k_timeoutMS_d[] = "timeoutMS = %d"; +static const char __pyx_k_GROUP_HANDLE[] = "GROUP HANDLE = "; +static const char __pyx_k_GROUP_STATUS[] = "GROUP STATUS = "; +static const char __pyx_k_ICAFE_NORMAL[] = "ICAFE_NORMAL"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_accessRead_d[] = "accessRead = %d"; +static const char __pyx_k_c_longdouble[] = "c_longdouble"; +static const char __pyx_k_closeHandles[] = "closeHandles"; +static const char __pyx_k_error_code_2[] = "error_code:"; +static const char __pyx_k_error_code_3[] = ".error_code ="; +static const char __pyx_k_error_info_2[] = "error_info:"; +static const char __pyx_k_error_info_3[] = ".error_info ="; +static const char __pyx_k_error_text_2[] = "error_text:"; +static const char __pyx_k_error_text_3[] = ".error_text ="; +static const char __pyx_k_getCtrlCache[] = "getCtrlCache"; +static const char __pyx_k_getPrecision[] = "getPrecision"; +static const char __pyx_k_getTimeStamp[] = "getTimeStamp"; +static const char __pyx_k_groupHandles[] = "groupHandles"; +static const char __pyx_k_monitorStart[] = "monitorStart"; +static const char __pyx_k_np_unicode_2[] = "np.unicode_"; +static const char __pyx_k_pvhandleList[] = "pvhandleList"; +static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; +static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_version_info[] = "version_info"; +static const char __pyx_k_CAFEException[] = "CAFEException"; +static const char __pyx_k_CafeException[] = "------CafeException-----------------------------------------------------"; +static const char __pyx_k_Invalid_input[] = "Invalid input:"; +static const char __pyx_k_accessWrite_d[] = "accessWrite = %d"; +static const char __pyx_k_alarmSeverity[] = "alarmSeverity = "; +static const char __pyx_k_alarmStatus_2[] = "alarmStatus"; +static const char __pyx_k_alarmStatus_d[] = "alarmStatus = %d"; +static const char __pyx_k_attachContext[] = "attachContext"; +static const char __pyx_k_connectFlag_d[] = "connectFlag = %d"; +static const char __pyx_k_getArrayCache[] = "getArrayCache"; +static const char __pyx_k_getScalarList[] = "getScalarList"; +static const char __pyx_k_getWFAsString[] = "getWFAsString"; +static const char __pyx_k_handlePVMatch[] = "handlePVMatch"; +static const char __pyx_k_keepGroupName[] = "keepGroupName"; +static const char __pyx_k_monitorpolicy[] = "monitorpolicy"; +static const char __pyx_k_not_connected[] = " not connected"; +static const char __pyx_k_numpy_ndarray[] = "numpy.ndarray"; +static const char __pyx_k_of_which_CA_d[] = "of which CA = %d"; +static const char __pyx_k_overallStatus[] = "overallStatus = "; +static const char __pyx_k_printHandlesV[] = "printHandlesV"; +static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_setScalarList[] = "setScalarList"; +static const char __pyx_k_bsDateAsString[] = "bsDateAsString"; +static const char __pyx_k_checkForHandle[] = "checkForHandle"; +static const char __pyx_k_getChannelInfo[] = "getChannelInfo"; +static const char __pyx_k_getDescription[] = "getDescription"; +static const char __pyx_k_getEnumStrings[] = "getEnumStrings"; +static const char __pyx_k_getNonBlocking[] = "getNonBlocking"; +static const char __pyx_k_handlePVAction[] = "handlePVAction"; +static const char __pyx_k_hasDescription[] = "hasDescription"; +static const char __pyx_k_maskHasDBE_LOG[] = "maskHasDBE_LOG ="; +static const char __pyx_k_monitorStopAll[] = "monitorStopAll()"; +static const char __pyx_k_not_recognized[] = "not recognized! "; +static const char __pyx_k_openMonitorNow[] = "openMonitorNow"; +static const char __pyx_k_openNowAndWait[] = "openNowAndWait"; +static const char __pyx_k_pymodule_parts[] = "_pymodule_parts"; +static const char __pyx_k_python_version[] = "_python_version"; +static const char __pyx_k_setCallbackGet[] = "setCallbackGet"; +static const char __pyx_k_setCallbackPut[] = "setCallbackPut"; +static const char __pyx_k_statusAsString[] = "statusAsString"; +static const char __pyx_k_tsDateAsString[] = "tsDateAsString"; +static const char __pyx_k_CafeException_2[] = "CafeException"; +static const char __pyx_k_View_MemoryView[] = "View.MemoryView"; +static const char __pyx_k_alarmSeverity_2[] = "alarmSeverity"; +static const char __pyx_k_alarmSeverity_d[] = "alarmSeverity = %d"; +static const char __pyx_k_allocate_buffer[] = "allocate_buffer"; +static const char __pyx_k_connectionState[] = "connectionState = "; +static const char __pyx_k_devicePositionV[] = "devicePositionV"; +static const char __pyx_k_dtype_is_object[] = "dtype_is_object"; +static const char __pyx_k_getCompoundList[] = "getCompoundList"; +static const char __pyx_k_getHandleFromPV[] = "getHandleFromPV"; +static const char __pyx_k_getPVGroupCache[] = "getPVGroupCache"; +static const char __pyx_k_get_handlePV_dt[] = "get(handlePV, dt)"; +static const char __pyx_k_memoryviewslice[] = "memoryviewslice"; +static const char __pyx_k_noEnumStrings_d[] = "noEnumStrings = %d"; +static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_verify_handlepv[] = "verify_handlepv"; +static const char __pyx_k_waitForGetEvent[] = "waitForGetEvent"; +static const char __pyx_k_Error_in_Element[] = "Error in Element "; +static const char __pyx_k_dataTypeAsString[] = "dataTypeAsString"; +static const char __pyx_k_getChannelDevice[] = "getChannelDevice"; +static const char __pyx_k_global_timestamp[] = "global_timestamp = "; +static const char __pyx_k_maskHasDBE_ALARM[] = "maskHasDBE_ALARM ="; +static const char __pyx_k_maskHasDBE_VALUE[] = "maskHasDBE_VALUE ="; +static const char __pyx_k_setNelemToNative[] = "setNelemToNative"; +static const char __pyx_k_supplementHandle[] = "supplementHandle"; +static const char __pyx_k_Assuming_DBR_TIME[] = "Assuming DBR_TIME"; +static const char __pyx_k_ENUM_string_value[] = "ENUM string value:"; +static const char __pyx_k_ICAFE_TYPENOTCONN[] = "ICAFE_TYPENOTCONN"; +static const char __pyx_k_PY_VERSION_HEX_is[] = "PY_VERSION_HEX is "; +static const char __pyx_k_def_getScalarList[] = "def getScalarList:"; +static const char __pyx_k_getDataTypeNative[] = "getDataTypeNative"; +static const char __pyx_k_getEnumFromString[] = "getEnumFromString"; +static const char __pyx_k_getStringFromEnum[] = "getStringFromEnum"; +static const char __pyx_k_groupMonitorStart[] = "groupMonitorStart"; +static const char __pyx_k_lowerAlarmLimit_f[] = "lowerAlarmLimit = %f"; +static const char __pyx_k_memoryviewslice_2[] = "_memoryviewslice"; +static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum"; +static const char __pyx_k_supplementHandles[] = "supplementHandles"; +static const char __pyx_k_upperAlarmLimit_f[] = "upperAlarmLimit = %f"; +static const char __pyx_k_with_error_status[] = "with error status="; +static const char __pyx_k_Possible_types_are[] = "'. Possible types are:"; +static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError"; +static const char __pyx_k_ca_pend_io_timeout[] = "ca_pend_io(timeout)"; +static const char __pyx_k_checkForHandleList[] = "checkForHandleList"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_def_getScalarArray[] = "def getScalarArray:"; +static const char __pyx_k_getCompoundPVGroup[] = "getCompoundPVGroup"; +static const char __pyx_k_getDataTypeRequest[] = "getDataTypeRequest"; +static const char __pyx_k_getTimeStampAsDate[] = "getTimeStampAsDate"; +static const char __pyx_k_openMonitorPrepare[] = "openMonitorPrepare"; +static const char __pyx_k_printStatusIfError[] = "printStatusIfError"; +static const char __pyx_k_strided_and_direct[] = ""; +static const char __pyx_k_supplementHandlesV[] = "supplementHandlesV"; +static const char __pyx_k_Exception_raised_in[] = "Exception raised in"; +static const char __pyx_k_ICAFE_CS_NEVER_CONN[] = "ICAFE_CS_NEVER_CONN"; +static const char __pyx_k_alarmStatusAsString[] = "alarmStatusAsString"; +static const char __pyx_k_cafeConnectionState[] = "cafeConnectionState = "; +static const char __pyx_k_checkForGroupHandle[] = "checkForGroupHandle"; +static const char __pyx_k_getChannelAttribute[] = "getChannelAttribute"; +static const char __pyx_k_getChannelDataStore[] = "getChannelDataStore"; +static const char __pyx_k_getHandleFromPVName[] = "getHandleFromPVName"; +static const char __pyx_k_lowerControlLimit_f[] = "lowerControlLimit = %f"; +static const char __pyx_k_lowerDisplayLimit_f[] = "lowerDisplayLimit = %f"; +static const char __pyx_k_lowerWarningLimit_f[] = "lowerWarningLimit = %f"; +static const char __pyx_k_maskHasDBE_PROPERTY[] = "maskHasDBE_PROPERTY="; +static const char __pyx_k_notify_milliseconds[] = "notify_milliseconds"; +static const char __pyx_k_set_handlePV_valSet[] = "set(handlePV, valSet)"; +static const char __pyx_k_upperControlLimit_f[] = "upperControlLimit = %f"; +static const char __pyx_k_upperDisplayLimit_f[] = "upperDisplayLimit = %f"; +static const char __pyx_k_upperWarningLimit_f[] = "upperWarningLimit = %f"; +static const char __pyx_k_Analysing_statusList[] = "Analysing statusList[]..."; +static const char __pyx_k_Percentage_with_data[] = " (Percentage with data = "; +static const char __pyx_k_Returning_memoryview[] = "Returning memoryview"; +static const char __pyx_k_getDbrBaseInCallback[] = "getDbrBaseInCallback"; +static const char __pyx_k_groupOpen_char_gname[] = "groupOpen(char * gname)"; +static const char __pyx_k_initCallbackComplete[] = "initCallbackComplete"; +static const char __pyx_k_setPulseIDBufferSize[] = "setPulseIDBufferSize"; +static const char __pyx_k_setPyCallbackConnect[] = "setPyCallbackConnect"; +static const char __pyx_k_strided_and_indirect[] = ""; +static const char __pyx_k_Allowed_DBR_TYPEs_are[] = "Allowed DBR_TYPEs are:"; +static const char __pyx_k_ICAFE_CA_OP_CONN_DOWN[] = "ICAFE_CA_OP_CONN_DOWN"; +static const char __pyx_k_The_value_entered_was[] = "The value entered was"; +static const char __pyx_k_alarmSeverityAsString[] = "alarmSeverityAsString"; +static const char __pyx_k_ca_pend_event_timeout[] = "ca_pend_event(timeout)"; +static const char __pyx_k_contiguous_and_direct[] = ""; +static const char __pyx_k_getDataTypeInCallback[] = "getDataTypeInCallback"; +static const char __pyx_k_is_not_a_valid_option[] = "is not a valid option. "; +static const char __pyx_k_of_which_CA_d_i_e_all[] = "of which CA = %d (i.e., all)"; +static const char __pyx_k_setGetCacheWaitPolicy[] = "setGetCacheWaitPolicy"; +static const char __pyx_k_Entering_0_for_element[] = "Entering 0 for element"; +static const char __pyx_k_MemoryView_of_r_object[] = ""; +static const char __pyx_k_No_of_group_members_is[] = "No of group members is "; +static const char __pyx_k_closeChannelKeepHandle[] = "closeChannelKeepHandle"; +static const char __pyx_k_getAlarmStatusSeverity[] = "getAlarmStatusSeverity"; +static const char __pyx_k_getMonitorIDInCallback[] = "getMonitorIDInCallback"; +static const char __pyx_k_getMonitorIDs_handlePV[] = "getMonitorIDs(handlePV)"; +static const char __pyx_k_getNoMonitors_handlePV[] = "getNoMonitors(handlePV)"; +static const char __pyx_k_groupClose_gHandleName[] = "groupClose(gHandleName)"; +static const char __pyx_k_hasAlarmStatusSeverity[] = "hasAlarmStatusSeverity"; +static const char __pyx_k_setPyConnectCallbackFn[] = "setPyConnectCallbackFn"; +static const char __pyx_k_Cython_Compiler_Options[] = "Cython.Compiler.Options"; +static const char __pyx_k_MemoryView_of_r_at_0x_x[] = ""; +static const char __pyx_k_contiguous_and_indirect[] = ""; +static const char __pyx_k_getChannelInfo_handlePV[] = "getChannelInfo(handlePV)"; +static const char __pyx_k_hence_assuming_DBR_TIME[] = "hence assuming DBR_TIME"; +static const char __pyx_k_members_while_group_has[] = "members while group has"; +static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'"; +static const char __pyx_k_Idx_must_be_non_negative[] = "Idx must be non-negative!"; +static const char __pyx_k_and_thus_assume_a_string[] = " and thus assume a string"; +static const char __pyx_k_getDbrDataTypeInCallback[] = "getDbrDataTypeInCallback"; +static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d."; +static const char __pyx_k_getHandlesFromWithinGroup[] = "getHandlesFromWithinGroup"; +static const char __pyx_k_groupDefineFromCollection[] = "groupDefineFromCollection"; +static const char __pyx_k_Error_in_def_getScalarList[] = "Error in def getScalarList: "; +static const char __pyx_k_Failed_to_instantiate_CAFE[] = "Failed to instantiate CAFE()"; +static const char __pyx_k_Idx_must_be_non_negative_2[] = " Idx must be non-negative!"; +static const char __pyx_k_etNelemToRetrieveFromCache[] = "etNelemToRetrieveFromCache"; +static const char __pyx_k_pyx_unpickle_CafeException[] = "__pyx_unpickle_CafeException"; +static const char __pyx_k_setChannelRequestPolicyGet[] = "setChannelRequestPolicyGet"; +static const char __pyx_k_ERROR_GROUP_MEMBER_MISMATCH[] = "ERROR: GROUP MEMBER MISMATCH!!"; +static const char __pyx_k_Error_in_def_getScalarArray[] = "Error in def getScalarArray: "; +static const char __pyx_k_as_channel_is_not_connected[] = "as channel is not connected!"; +static const char __pyx_k_in_PyCafe_def_getScalarList[] = " in PyCafe def getScalarList"; +static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array"; +static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; +static const char __pyx_k_reports_the_following_error[] = ") reports the following error:"; +static const char __pyx_k_Error_in_def_getCompoundList[] = "Error in def getCompoundList: "; +static const char __pyx_k_dbr_mask_notify_milliseconds[] = "dbr, mask, notify_milliseconds)"; +static const char __pyx_k_groupMonitorStop_ghandleName[] = "groupMonitorStop(ghandleName)"; +static const char __pyx_k_in_PyCafe_def_getCompundList[] = " in PyCafe def getCompundList"; +static const char __pyx_k_in_PyCafe_def_getScalarArray[] = " in PyCafe def getScalarArray"; +static const char __pyx_k_memoryview_numpy_array_ctypes[] = "memoryview, numpy, array, ctypes"; +static const char __pyx_k_openMonitorNowAndWait_timeout[] = "openMonitorNowAndWait(timeout)"; +static const char __pyx_k_setGetActionWhenMonitorPolicy[] = "setGetActionWhenMonitorPolicy"; +static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; +static const char __pyx_k_Error_Warning_from_def_getAsyn[] = "Error/Warning from def getAsyn: "; +static const char __pyx_k_Exception_raised_in_PyCafe_pyx[] = "Exception raised in PyCafe.pyx:"; +static const char __pyx_k_List_does_not_contain_handle_0[] = "List does not contain handle {0}"; +static const char __pyx_k_Warning_from_groupMonitorStart[] = "***Warning*** from groupMonitorStart for handle(orPV)="; +static const char __pyx_k_getCtrl_handlePV_str_dt_native[] = "getCtrl(handlePV, str dt='native')"; +static const char __pyx_k_groupMemberList_self_str_gname[] = "groupMemberList(self, str gname)"; +static const char __pyx_k_monitorStop_handlePV_mpid_None[] = "monitorStop(handlePV, mpid=None)"; +static const char __pyx_k_py_cb_handle_open_wrapper_OPEN[] = " py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:"; +static const char __pyx_k_strided_and_direct_or_indirect[] = ""; +static const char __pyx_k_verify_handlepv_locals_wrapper[] = "verify_handlepv..wrapper"; +static const char __pyx_k_while_list_of_callback_objects[] = " while list of callback objects is"; +static const char __pyx_k_Error_in_def_grouping_for_group[] = "Error in def grouping for group named"; +static const char __pyx_k_Execute_getEnumStrings_handlePV[] = "Execute getEnumStrings(handlePV) to view enumerated values"; +static const char __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1[] = "GET_FROM_CACHE (0), GET_FROM_IOC (1)"; +static const char __pyx_k_Second_input_argument_should_be[] = "Second input argument should be of of type "; +static const char __pyx_k_TIMEOUT_in_getGroup_swithing_to[] = "TIMEOUT in getGroup; swithing to getCompoundPVGroup"; +static const char __pyx_k_ThandlePVSet_list_member_should[] = "ThandlePVSet list member should be of type if handle, else if PV"; +static const char __pyx_k_The_pv_name_entered_within_list[] = "The pv name entered within list should be of type or "; +static const char __pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE[] = "USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS"; +static const char __pyx_k_Valid_input_parameters_for_data[] = "Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'"; +static const char __pyx_k_Warning_from_groupMonitorStartW[] = "***Warning*** from groupMonitorStartWithCBList for handle(orPV)="; +static const char __pyx_k_Warning_from_monitorStart_for_h[] = "***Warning*** from monitorStart for handle="; +static const char __pyx_k_does_not_match_the_length_of_da[] = " does not match the length of data list "; +static const char __pyx_k_getCache_handlePV_str_dt_native[] = "getCache(handlePV, str dt='native')"; +static const char __pyx_k_getScalarList_handleList_str_dt[] = "getScalarList(handleList, str dt, bint cacheFlag)"; +static const char __pyx_k_monitorStart_handlePV_object_cb[] = "monitorStart(handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_offset_input_argument_cannot_be[] = "offset input argument cannot be negative!"; +static const char __pyx_k_py_cb_handle_connect_wrapper_CO[] = " py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:"; +static const char __pyx_k_py_cb_handle_monid_wrapper_MONI[] = " py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:"; +static const char __pyx_k_py_cb_handle_wrapper_HANDLE_Han[] = " py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :"; +static const char __pyx_k_py_cb_wrapper_PVDATA_Handle_PVN[] = " py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :"; +static const char __pyx_k_setCompoundList_handleList_list[] = "setCompoundList(handleList, list vectorList)"; +static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; +static const char __pyx_k_A_handle_can_never_hold_a_negati[] = "A handle can never hold a negative value! "; +static const char __pyx_k_Allowed_ChannelGetActionWhenMoni[] = "Allowed ChannelGetActionWhenMonitorPolicyKind are:"; +static const char __pyx_k_Allowed_ChannelGetCacheWaitPolic[] = "Allowed ChannelGetCacheWaitPolicyKind are:"; +static const char __pyx_k_Anomoly_in_BSData_deepcopy_Unequ[] = "Anomoly in BSData deepcopy. Unequal lengths. Take minimum value"; +static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; +static const char __pyx_k_CALLBACK_NOT_FOUND_FOR_handle_mo[] = "CALLBACK NOT FOUND FOR handle/monid"; +static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; +static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview"; +static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview"; +static const char __pyx_k_Cython_interface_to_the_C_CAFE_l[] = "Cython interface to the C++ CAFE library. |br|\nTo import the resulting Python module and instantiate the Cython class:\n::\n\n import PyCafe\n cafe = PyCafe.CyCafe()\n cyca = PyCafe.CyCa()\n\n"; +static const char __pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2[] = "DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)"; +static const char __pyx_k_Data_to_be_presented_in_native_d[] = "Data to be presented in native data type"; +static const char __pyx_k_Datatype_unknown_returning_value[] = "Datatype unknown, returning value 0"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g[] = "EXCEPTION RAISED IN PyCafe def getScalarArray. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m[] = "EXCEPTION RAISED IN PyCafe def monitorStop. \n monitorPolicy ID (mpid) should be of type "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s[] = "EXCEPTION RAISED IN PyCafe def setScalarList. \n First input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w[] = "EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g[] = "EXCEPTION RAISED in PyCafe def getChannelDataStore"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m[] = "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s[] = "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d"; +static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; +static const char __pyx_k_Error_in_PyCafe_def_getPVGroupCa[] = "Error in PyCafe def getPVGroupCache. Status = %d"; +static const char __pyx_k_Error_in_PyCafe_def_getPVGroup_S[] = "Error in PyCafe def getPVGroup. Status = %d"; +static const char __pyx_k_Error_in_def_waitForBundledEvent[] = "Error in def waitForBundledEvents: "; +static const char __pyx_k_Exception_raised_from_CyCafe_met[] = "Exception raised from CyCafe method:"; +static const char __pyx_k_First_Input_argument_should_be_o[] = "First Input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_if_not_list[] = "First input argument (if not list), should be of type if group handle, else if group name"; +static const char __pyx_k_First_input_argument_should_be_a[] = "First input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_First_input_argument_should_be_c[] = "First input argument should be for group name"; +static const char __pyx_k_First_input_argument_should_be_o[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; +static const char __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N[] = "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1),GET_CACHE_WAIT (2)"; +static const char __pyx_k_GET_CALLBACK_NOT_FOUND_FOR_handl[] = "GET CALLBACK NOT FOUND FOR handle"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x8a[] = "Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))"; +static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported"; +static const char __pyx_k_Input_argument_if_given_should_b[] = "Input argument, if given, should be if list of handles or PVs, else of type if handle or if PV. If no input argument, then all channels are supplemented."; +static const char __pyx_k_Input_argument_pv_should_be_of_t[] = "Input argument, pv, should be of type "; +static const char __pyx_k_Input_argument_should_be_of_type[] = "Input argument, should be of type if handle, else if pv name"; +static const char __pyx_k_Input_data_whether_within_a_list[] = "Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \nor not) should be of of type , or "; +static const char __pyx_k_Invalid_handle_of_type_class_int[] = "Invalid handle of type . If handle is not known, \nsuggest using PV name of type as input argument instead. "; +static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s"; +static const char __pyx_k_List_input_arguments_should_be_o[] = "List input arguments, should be of type if group handle, else if group name"; +static const char __pyx_k_List_input_arguments_should_be_t[] = "List input arguments, should be < type 'int' >if handle, else < type 'str' > if pv name"; +static const char __pyx_k_Message_from_getBS_BS_stream_not[] = "Message from getBS: BS stream not initialized;cafe.setBS(pvList) has first to be called."; +static const char __pyx_k_Message_from_setBS_ONLY_A_SINGLE[] = "Message from setBS: ONLY A SINGLE STREAM IS ALLOWED"; +static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; +static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)"; +static const char __pyx_k_PUT_CALLBACK_NOT_FOUND_FOR_handl[] = "PUT CALLBACK NOT FOUND FOR handle"; +static const char __pyx_k_PyCafe_def_setGroup_Unusual_data[] = "PyCafe def setGroup: Unusual data type for element"; +static const char __pyx_k_PyCafe_def_set_WARNING_DATA_TYPE[] = "PyCafe def set WARNING: DATA TYPE NOT SUPPORTED"; +static const char __pyx_k_PyCafe_pyx_We_do_not_cater_for_t[] = "PyCafe.pyx: We do not cater for type "; +static const char __pyx_k_PyCafe_pyx_getArray_array_type_d[] = "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list"; +static const char __pyx_k_Second_input_argument_if_not_a_l[] = "Second input argument (if not a list), should be of type if group handle, else if group name"; +static const char __pyx_k_TIMEOUT_in_getGroup_switching_to[] = "TIMEOUT in getGroup; switching to getCompoundList"; +static const char __pyx_k_The_signature_of_the_monitor_cal[] = "The signature of the monitor callback function is not supported. \t\t\t\t\t\tSupported fns are: 1) callback(handle) or 2) callback(pvdata, handle, pv_name) "; +static const char __pyx_k_Third_input_argument_should_be_o[] = "Third input argument, should be of type else of "; +static const char __pyx_k_This_line_in_PyCafe_def_getAsLis[] = "This line in PyCafe def getAsList should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_getCache[] = "This line in PyCafe def getCache should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_get_shou[] = "This line in PyCafe def get should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_setCompo[] = "This line in PyCafe def setCompoundList should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_setScala[] = "This line in PyCafe def setScalarList should never appear!"; +static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; +static const char __pyx_k_Unknow_array_type_in_user_reques[] = "Unknow array type in user request for art='"; +static const char __pyx_k_Unknown_array_type_in_user_reque[] = "Unknown array type in user request for art='"; +static const char __pyx_k_WARNING_PyCafe_def_setDbrBase_ha[] = "WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)"; +static const char __pyx_k_WARNING_PyCafe_def_setGetActionW[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicy"; +static const char __pyx_k_WARNING_PyCafe_def_setGetCacheWa[] = "WARNING: PyCafe def setGetCacheWaitPolicy(handle/PV, ChannelGetCacheWaitPolicyKind)"; +static const char __pyx_k_closeDisconnectedChannelsWithinG[] = "closeDisconnectedChannelsWithinGroup"; +static const char __pyx_k_dbr_base_type_should_be_one_of_D[] = "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL"; +static const char __pyx_k_diff_in_reading_BSDataHolderToSt[] = "diff in reading BSDataHolderToStruc"; +static const char __pyx_k_gameSetAndMatch_list_handlePVSet[] = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_getCompoundList_handleList_str_d[] = "getCompoundList(handleList, str dt='native')"; +static const char __pyx_k_getCompoundPVGroup_ghandleName_s[] = "getCompoundPVGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getCtrlCache_handlePV_str_dt_nat[] = "getCtrlCache(handlePV, str dt='native')"; +static const char __pyx_k_getDictionary_handleList_dt_cach[] = "getDictionary(handleList, dt, cacheFlag )"; +static const char __pyx_k_getGroupCache_self_ghandleName_s[] = "getGroupCache(self, ghandleName, str dt='native')"; +static const char __pyx_k_getGroup_ghandleName_str_dt_nati[] = "getGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getHandleFromPVWithinGroup_pv_gh[] = "getHandleFromPVWithinGroup(pv. ghandleName)"; +static const char __pyx_k_getPVCache_handlePV_str_dt_nativ[] = "getPVCache(handlePV, str dt='native'"; +static const char __pyx_k_getPVGroup_ghandleName_str_dt_na[] = "getPVGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getScalarArray_handleList_str_dt[] = "getScalarArray(handleList, str dt, bint cacheFlag)"; +static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)"; +static const char __pyx_k_groupMonitorStartWithCBList_ghan[] = "groupMonitorStartWithCBList(ghandleName, cb,"; +static const char __pyx_k_groupMonitorStart_ghandleName_cb[] = "groupMonitorStart(ghandleName, cb, dbr, mask)"; +static const char __pyx_k_grouping_char_gname_list__pvlist[] = "grouping(char * gname, list _pvlist)"; +static const char __pyx_k_handleMatch_list_member_should_b[] = "handleMatch list member should be of type if handle, else if PV"; +static const char __pyx_k_handlePVAction_list_member_shoul[] = "handlePVAction list member should be of type if handle, else if PV"; +static const char __pyx_k_hence_assuming_default_value_GET[] = "hence assuming default value GET_CACHE_WAIT"; +static const char __pyx_k_input_argument_timeout_must_be_a[] = "input argument, timeout, must be a positive number!\ntimeout reset to:"; +static const char __pyx_k_matchMany_list_valSet_list_handl[] = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_match_double_valSet_handlePVMatc[] = "match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_modulo_input_arg_should_be_of_ty[] = "modulo input arg, should be of type , else {pv_name : modulo}"; +static const char __pyx_k_modulo_input_argument_must_be_po[] = "modulo input argument must be positive!"; +static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; +static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static const char __pyx_k_offset_input_arg_should_be_of_ty[] = "offset input arg, should be of type , else {pv_name : offset} "; +static const char __pyx_k_openGroupNowAndWaitForInputGroup[] = "openGroupNowAndWaitForInputGroups"; +static const char __pyx_k_setAndMatchMany_list_handlePVSet[] = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_setAndMatch_handlePVSet_double_v[] = "setAndMatch(handlePVSet, double valSet,handlePVMatch, double tolerance,double timeout, bint printFlag)"; +static const char __pyx_k_setGroup_self_ghandleName_list_v[] = "setGroup(self, ghandleName, list vectorList)"; +static const char __pyx_k_setNelemCtrl_handlePV_unsigned_i[] = "setNelemCtrl(handlePV, unsigned int nelem)"; +static const char __pyx_k_setNelemToRetrieveFromCacheToOne[] = "setNelemToRetrieveFromCacheToOne"; +static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; +static const char __pyx_k_waitForBundledEvents_self_handle[] = "waitForBundledEvents(self, handleList)"; +static const char __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2[] = " GET_FROM_CACHE (0), GET_FROM_IOC (1)"; +static const char __pyx_k_Second_input_argument_should_be_2[] = "Second input argument should be a of of type "; +static const char __pyx_k_does_not_match_the_length_of_da_2[] = " does not match the length of data list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2[] = "EXCEPTION RAISED IN PyCafe def getScalarArray. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument should be of handles or PVs\nelse for CAFE 'group' name"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8[] = "EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \nFirst input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9[] = "EXCEPTION RAISED IN PyCafe def getCache. \n\t\t\t\tFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2[] = "EXCEPTION RAISED IN PyCafe def matchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2[] = "EXCEPTION RAISED IN PyCafe def setScalarList. Length of handle list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. Length of handle list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nUnknown data input; should be one of of type , , , "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7[] = "EXCEPTION RAISED IN PyCafe def setGroup. \nUnknown data input; should be one of of type , , , "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and second (valSet) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2[] = "EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2[] = "EXCEPTION RAISED in PyCafe def getNonBlocking. Status = {0}"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3[] = "EXCEPTION RAISED in PyCafe def getCache. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4[] = "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2[] = "EXCEPTION RAISED in PyCafe def matchMany. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3[] = "EXCEPTION RAISED in PyCafe def match. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2[] = "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3[] = "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne"; +static const char __pyx_k_First_Input_argument_should_be_o_2[] = "First Input argument should be of type if handle else if PV."; +static const char __pyx_k_First_input_argument_if_not_list_2[] = "First input argument (if not list), should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_a_2[] = "First input argument should be a 'list' of of type if handles, else if PVs"; +static const char __pyx_k_First_input_argument_should_be_a_3[] = "First input argument, should be a 'list' of of type if handles, else if PVs"; +static const char __pyx_k_First_input_argument_should_be_a_4[] = "First input argument should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_First_input_argument_should_be_o_2[] = "First input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_3[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_4[] = "First input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_5[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_6[] = "First input argument, should be of type if handle,else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_7[] = "First input argument, should be of type if group handle,else if group name"; +static const char __pyx_k_First_input_argument_should_be_o_8[] = "First input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_First_input_argument_should_be_o_9[] = "First input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; +static const char __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2[] = "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), GET_CACHE_WAIT (2)"; +static const char __pyx_k_Input_argument_should_be_of_type_2[] = "Input argument should be of type if handle,else if pvname"; +static const char __pyx_k_List_input_arguments_should_be_o_2[] = "List input arguments, should be of type if handleelse if pvname"; +static const char __pyx_k_The_signature_of_the_monitor_cal_2[] = "The signature of the monitor callback function \t\t given by the user is not supported. Valid fns are: 1) callback(handle) or 2) callback(pvdata, handle, pv_name) "; +static const char __pyx_k_Third_input_argument_should_be_o_2[] = "Third input argument, should be of type if handle,else if PV"; +static const char __pyx_k_WARNING_PyCafe_def_setGetActionW_2[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles"; +static const char __pyx_k_WARNING_PyCafe_def_setGetCacheWa_2[] = "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( ChannelGetCacheWaitPolicyKind)"; +static const char __pyx_k_dbr_base_type_should_be_one_of_D_2[] = "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL"; +static const char __pyx_k_hence_assuming_default_value_GET_2[] = "hence assuming default value GET_FROM_IOC"; +static const char __pyx_k_input_argument_timeout_must_be_a_2[] = "input argument, timeout, must be a positive number!\ntimeout reset to CAFE default:"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10[] = "EXCEPTION RAISED IN PyCafe def getPVCache. \n \t\t\tFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11[] = "EXCEPTION RAISED IN PyCafe def getCtrl. \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12[] = "EXCEPTION RAISED IN PyCafe def getCtrlCache. \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13[] = "EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nInput cb should be of type and give the list of cb objects"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nNo of group members doe not match the length of callback object list"; +static const char __pyx_k_First_input_argument_should_be_o_10[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_11[] = "First input argument should be of type if group handle, else if group name"; +static PyObject *__pyx_kp_u_0; +static PyObject *__pyx_kp_u_0_1_2_3_4_5; +static PyObject *__pyx_kp_u_1; +static PyObject *__pyx_n_s_ASCII; +static PyObject *__pyx_kp_u_A_handle_can_never_hold_a_negati; +static PyObject *__pyx_kp_u_Allowed_ChannelGetActionWhenMoni; +static PyObject *__pyx_kp_u_Allowed_ChannelGetCacheWaitPolic; +static PyObject *__pyx_kp_u_Allowed_DBR_TYPEs_are; +static PyObject *__pyx_kp_u_Analysing_statusList; +static PyObject *__pyx_kp_u_Anomoly_in_BSData_deepcopy_Unequ; +static PyObject *__pyx_n_s_Array; +static PyObject *__pyx_kp_u_Assuming_DBR_TIME; +static PyObject *__pyx_n_u_BS; +static PyObject *__pyx_n_s_BSCA; +static PyObject *__pyx_n_s_BSData; +static PyObject *__pyx_n_s_BSEnabled; +static PyObject *__pyx_kp_u_BS_2; +static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; +static PyObject *__pyx_n_u_C; +static PyObject *__pyx_n_u_CA; +static PyObject *__pyx_n_u_CAFEException; +static PyObject *__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo; +static PyObject *__pyx_kp_u_CA_2; +static PyObject *__pyx_n_u_CafeError; +static PyObject *__pyx_kp_u_CafeException; +static PyObject *__pyx_n_s_CafeException_2; +static PyObject *__pyx_n_u_CafePVError; +static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; +static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor; +static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi; +static PyObject *__pyx_kp_s_Cannot_index_with_type_s; +static PyObject *__pyx_n_u_Channel; +static PyObject *__pyx_n_s_CyCa; +static PyObject *__pyx_n_s_CyCafe; +static PyObject *__pyx_n_s_Cython; +static PyObject *__pyx_n_s_Cython_Compiler_Options; +static PyObject *__pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2; +static PyObject *__pyx_kp_u_Data_to_be_presented_in_native_d; +static PyObject *__pyx_kp_u_Datatype_unknown_returning_value; +static PyObject *__pyx_kp_u_ENUM_string_value; +static PyObject *__pyx_kp_u_ENUM_value; +static PyObject *__pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3; +static PyObject *__pyx_n_s_Ellipsis; +static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr; +static PyObject *__pyx_kp_u_Entering_0_for_element; +static PyObject *__pyx_kp_u_Error_Warning_from_def_getAsyn; +static PyObject *__pyx_kp_u_Error_in_Element; +static PyObject *__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa; +static PyObject *__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S; +static PyObject *__pyx_kp_u_Error_in_def_getCompoundList; +static PyObject *__pyx_kp_u_Error_in_def_getScalarArray; +static PyObject *__pyx_kp_u_Error_in_def_getScalarList; +static PyObject *__pyx_kp_u_Error_in_def_grouping_for_group; +static PyObject *__pyx_kp_u_Error_in_def_waitForBundledEvent; +static PyObject *__pyx_kp_u_Exception_raised_from_CyCafe_met; +static PyObject *__pyx_kp_u_Exception_raised_in; +static PyObject *__pyx_kp_u_Exception_raised_in_PyCafe_pyx; +static PyObject *__pyx_kp_u_Execute_getEnumStrings_handlePV; +static PyObject *__pyx_kp_u_Failed_to_instantiate_CAFE; +static PyObject *__pyx_kp_u_First_Input_argument_should_be_o; +static PyObject *__pyx_kp_u_First_Input_argument_should_be_o_2; +static PyObject *__pyx_kp_u_First_input_argument_if_not_list; +static PyObject *__pyx_kp_u_First_input_argument_if_not_list_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_3; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_4; +static PyObject *__pyx_kp_u_First_input_argument_should_be_c; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_10; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_11; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_3; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_4; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_5; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_6; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_7; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_8; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_9; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; +static PyObject *__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N; +static PyObject *__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2; +static PyObject *__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl; +static PyObject *__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1; +static PyObject *__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2; +static PyObject *__pyx_kp_u_GROUP_HANDLE; +static PyObject *__pyx_kp_u_GROUP_NAME; +static PyObject *__pyx_kp_u_GROUP_STATUS; +static PyObject *__pyx_kp_u_Handle; +static PyObject *__pyx_kp_u_Handle_2; +static PyObject *__pyx_n_u_ICAFE_CA_OP_CONN_DOWN; +static PyObject *__pyx_n_u_ICAFE_CS_NEVER_CONN; +static PyObject *__pyx_n_u_ICAFE_NORMAL; +static PyObject *__pyx_n_u_ICAFE_TYPENOTCONN; +static PyObject *__pyx_kp_u_Idx_must_be_non_negative; +static PyObject *__pyx_kp_u_Idx_must_be_non_negative_2; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x8a; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0; +static PyObject *__pyx_n_s_IndexError; +static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte; +static PyObject *__pyx_kp_u_Input_argument_if_given_should_b; +static PyObject *__pyx_kp_u_Input_argument_pv_should_be_of_t; +static PyObject *__pyx_kp_u_Input_argument_should_be_of_type; +static PyObject *__pyx_kp_u_Input_argument_should_be_of_type_2; +static PyObject *__pyx_kp_u_Input_data_whether_within_a_list; +static PyObject *__pyx_kp_u_Invalid_handle_of_type_class_int; +static PyObject *__pyx_kp_u_Invalid_input; +static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr; +static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d; +static PyObject *__pyx_kp_u_List_does_not_contain_handle_0; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_o; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_o_2; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_t; +static PyObject *__pyx_kp_u_Member; +static PyObject *__pyx_n_s_MemoryError; +static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x; +static PyObject *__pyx_kp_s_MemoryView_of_r_object; +static PyObject *__pyx_kp_u_Message_from_getBS_BS_stream_not; +static PyObject *__pyx_kp_u_Message_from_setBS_ONLY_A_SINGLE; +static PyObject *__pyx_kp_u_No_Members; +static PyObject *__pyx_kp_u_No_of_group_members_is; +static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; +static PyObject *__pyx_kp_u_None; +static PyObject *__pyx_n_s_Number; +static PyObject *__pyx_n_b_O; +static PyObject *__pyx_n_s_OrderedDict; +static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a; +static PyObject *__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl; +static PyObject *__pyx_kp_u_PV; +static PyObject *__pyx_kp_u_PV_2; +static PyObject *__pyx_kp_u_PV_3; +static PyObject *__pyx_n_u_PV_4; +static PyObject *__pyx_kp_u_PY_VERSION_HEX_is; +static PyObject *__pyx_kp_u_Parameter; +static PyObject *__pyx_kp_u_Percentage_with_data; +static PyObject *__pyx_n_s_PickleError; +static PyObject *__pyx_kp_u_Possible_types_are; +static PyObject *__pyx_n_s_PyCafe; +static PyObject *__pyx_kp_u_PyCafe_def_setGroup_Unusual_data; +static PyObject *__pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE; +static PyObject *__pyx_kp_s_PyCafe_pyx; +static PyObject *__pyx_kp_u_PyCafe_pyx; +static PyObject *__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t; +static PyObject *__pyx_kp_u_PyCafe_pyx_getArray_array_type_d; +static PyObject *__pyx_kp_u_Returning_memoryview; +static PyObject *__pyx_n_s_RuntimeError; +static PyObject *__pyx_n_s_SFDBPMData; +static PyObject *__pyx_kp_u_SIGNATURE; +static PyObject *__pyx_kp_u_SIGNATURE_2; +static PyObject *__pyx_kp_u_Second_input_argument_if_not_a_l; +static PyObject *__pyx_kp_u_Second_input_argument_should_be; +static PyObject *__pyx_kp_u_Second_input_argument_should_be_2; +static PyObject *__pyx_kp_u_TIMEOUT_in_getGroup_switching_to; +static PyObject *__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to; +static PyObject *__pyx_kp_u_ThandlePVSet_list_member_should; +static PyObject *__pyx_kp_u_The_pv_name_entered_within_list; +static PyObject *__pyx_kp_u_The_signature_of_the_monitor_cal; +static PyObject *__pyx_kp_u_The_signature_of_the_monitor_cal_2; +static PyObject *__pyx_kp_u_The_value_entered_was; +static PyObject *__pyx_kp_u_Third_input_argument_should_be_o; +static PyObject *__pyx_kp_u_Third_input_argument_should_be_o_2; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_getAsLis; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_getCache; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_get_shou; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_setCompo; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_setScala; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_n_u_TypeError; +static PyObject *__pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE; +static PyObject *__pyx_kp_u_UTF_8; +static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; +static PyObject *__pyx_n_s_UnicodeDecodeError; +static PyObject *__pyx_kp_u_Unknow_array_type_in_user_reques; +static PyObject *__pyx_kp_u_Unknown_array_type_in_user_reque; +static PyObject *__pyx_n_s_UserWarning; +static PyObject *__pyx_n_u_VA; +static PyObject *__pyx_kp_u_Valid_input_parameters_for_data; +static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_n_s_View_MemoryView; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetActionW; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2; +static PyObject *__pyx_kp_u_Warning_from_groupMonitorStart; +static PyObject *__pyx_kp_u_Warning_from_groupMonitorStartW; +static PyObject *__pyx_kp_u_Warning_from_monitorStart_for_h; +static PyObject *__pyx_kp_u__10; +static PyObject *__pyx_kp_u__111; +static PyObject *__pyx_kp_u__114; +static PyObject *__pyx_kp_u__118; +static PyObject *__pyx_kp_u__121; +static PyObject *__pyx_kp_u__122; +static PyObject *__pyx_kp_u__138; +static PyObject *__pyx_kp_u__15; +static PyObject *__pyx_kp_u__173; +static PyObject *__pyx_kp_u__23; +static PyObject *__pyx_kp_u__24; +static PyObject *__pyx_kp_u__26; +static PyObject *__pyx_kp_u__3; +static PyObject *__pyx_kp_u__36; +static PyObject *__pyx_kp_u__4; +static PyObject *__pyx_kp_u__46; +static PyObject *__pyx_kp_u__47; +static PyObject *__pyx_kp_u__48; +static PyObject *__pyx_kp_u__49; +static PyObject *__pyx_kp_u__5; +static PyObject *__pyx_kp_u__50; +static PyObject *__pyx_kp_u__51; +static PyObject *__pyx_kp_u__53; +static PyObject *__pyx_kp_u_accessRead_d; +static PyObject *__pyx_kp_u_accessWrite_d; +static PyObject *__pyx_kp_u_alarmSeverity; +static PyObject *__pyx_n_s_alarmSeverityAsString; +static PyObject *__pyx_n_s_alarmSeverity_2; +static PyObject *__pyx_kp_u_alarmSeverity_d; +static PyObject *__pyx_kp_u_alarmStatus; +static PyObject *__pyx_n_s_alarmStatusAsString; +static PyObject *__pyx_n_s_alarmStatus_2; +static PyObject *__pyx_kp_u_alarmStatus_d; +static PyObject *__pyx_n_s_allocate_buffer; +static PyObject *__pyx_kp_u_and_thus_assume_a_string; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_n_s_appname; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_array; +static PyObject *__pyx_n_u_array; +static PyObject *__pyx_kp_u_array_array; +static PyObject *__pyx_n_s_art; +static PyObject *__pyx_n_s_asDict; +static PyObject *__pyx_kp_u_as_channel_is_not_connected; +static PyObject *__pyx_n_u_attachContext; +static PyObject *__pyx_n_s_attrib; +static PyObject *__pyx_n_s_base; +static PyObject *__pyx_n_u_bool; +static PyObject *__pyx_n_s_bool8; +static PyObject *__pyx_n_s_bool_2; +static PyObject *__pyx_n_s_bsDateAsString; +static PyObject *__pyx_n_s_bsFlag; +static PyObject *__pyx_n_s_bschannel; +static PyObject *__pyx_n_s_bufferSize; +static PyObject *__pyx_n_s_byte; +static PyObject *__pyx_n_u_byte; +static PyObject *__pyx_n_s_c; +static PyObject *__pyx_n_u_c; +static PyObject *__pyx_n_s_cMembers; +static PyObject *__pyx_n_s_cName; +static PyObject *__pyx_n_s_c_bool; +static PyObject *__pyx_n_s_c_byte; +static PyObject *__pyx_n_s_c_char; +static PyObject *__pyx_n_s_c_char_p; +static PyObject *__pyx_n_s_c_double; +static PyObject *__pyx_n_s_c_float; +static PyObject *__pyx_n_s_c_int; +static PyObject *__pyx_n_s_c_int16; +static PyObject *__pyx_n_s_c_int32; +static PyObject *__pyx_n_s_c_int64; +static PyObject *__pyx_n_s_c_int8; +static PyObject *__pyx_n_s_c_long; +static PyObject *__pyx_n_s_c_longdouble; +static PyObject *__pyx_n_s_c_longlong; +static PyObject *__pyx_n_s_c_short; +static PyObject *__pyx_n_s_c_size_t; +static PyObject *__pyx_n_s_c_ssize_t; +static PyObject *__pyx_n_s_c_ubyte; +static PyObject *__pyx_n_s_c_uint; +static PyObject *__pyx_n_s_c_uint16; +static PyObject *__pyx_n_s_c_uint32; +static PyObject *__pyx_n_s_c_uint64; +static PyObject *__pyx_n_s_c_uint8; +static PyObject *__pyx_n_s_c_ulong; +static PyObject *__pyx_n_s_c_ulonglong; +static PyObject *__pyx_n_s_c_ushort; +static PyObject *__pyx_n_s_c_void_p; +static PyObject *__pyx_n_s_c_voidp; +static PyObject *__pyx_n_s_c_wchar; +static PyObject *__pyx_n_s_c_wchar_p; +static PyObject *__pyx_kp_u_ca_pend_event_timeout; +static PyObject *__pyx_kp_u_ca_pend_io_timeout; +static PyObject *__pyx_n_s_cache; +static PyObject *__pyx_n_s_cacheFlag; +static PyObject *__pyx_n_u_cafe; +static PyObject *__pyx_kp_u_cafeConnectionState; +static PyObject *__pyx_kp_u_cafeDbrType; +static PyObject *__pyx_n_s_cb; +static PyObject *__pyx_kp_u_channelID_s; +static PyObject *__pyx_n_s_channelInfo; +static PyObject *__pyx_n_s_checkForGroupHandle; +static PyObject *__pyx_n_s_checkForHandle; +static PyObject *__pyx_n_s_checkForHandleList; +static PyObject *__pyx_n_u_cinit; +static PyObject *__pyx_n_s_class; +static PyObject *__pyx_kp_u_className_s; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_u_close; +static PyObject *__pyx_n_u_closeChannelKeepHandle; +static PyObject *__pyx_n_u_closeDisconnectedChannelsWithinG; +static PyObject *__pyx_n_u_closeHandles; +static PyObject *__pyx_n_s_cname; +static PyObject *__pyx_n_s_collections; +static PyObject *__pyx_kp_u_connectFlag_d; +static PyObject *__pyx_kp_u_connectionState; +static PyObject *__pyx_kp_s_contiguous_and_direct; +static PyObject *__pyx_kp_s_contiguous_and_indirect; +static PyObject *__pyx_n_s_copy; +static PyObject *__pyx_n_u_ctype; +static PyObject *__pyx_n_s_ctypes; +static PyObject *__pyx_n_u_ctypes; +static PyObject *__pyx_n_u_d; +static PyObject *__pyx_kp_u_d_2; +static PyObject *__pyx_kp_u_dataType; +static PyObject *__pyx_n_s_dataTypeAsString; +static PyObject *__pyx_n_s_dataType_2; +static PyObject *__pyx_kp_u_datatype; +static PyObject *__pyx_n_s_dbr; +static PyObject *__pyx_n_s_dbrBase; +static PyObject *__pyx_kp_u_dbrDataType; +static PyObject *__pyx_kp_u_dbr_base_type_should_be_one_of_D; +static PyObject *__pyx_kp_u_dbr_base_type_should_be_one_of_D_2; +static PyObject *__pyx_kp_u_dbr_mask_notify_milliseconds; +static PyObject *__pyx_n_s_decode; +static PyObject *__pyx_n_s_deepcopy; +static PyObject *__pyx_kp_u_def_getScalarArray; +static PyObject *__pyx_kp_u_def_getScalarList; +static PyObject *__pyx_n_u_devicePositionV; +static PyObject *__pyx_n_s_dict; +static PyObject *__pyx_n_s_dictFlag; +static PyObject *__pyx_kp_u_diff_in_reading_BSDataHolderToSt; +static PyObject *__pyx_kp_u_does_not_match_the_length_of_da; +static PyObject *__pyx_kp_u_does_not_match_the_length_of_da_2; +static PyObject *__pyx_n_s_double; +static PyObject *__pyx_n_u_double; +static PyObject *__pyx_n_s_dt; +static PyObject *__pyx_n_s_dtype; +static PyObject *__pyx_n_s_dtype_is_object; +static PyObject *__pyx_n_s_empty; +static PyObject *__pyx_n_s_encode; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_enumString; +static PyObject *__pyx_kp_u_enumStrings; +static PyObject *__pyx_n_s_enumValue; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_error; +static PyObject *__pyx_n_s_error_code; +static PyObject *__pyx_kp_u_error_code_2; +static PyObject *__pyx_kp_u_error_code_3; +static PyObject *__pyx_n_s_error_info; +static PyObject *__pyx_kp_u_error_info_2; +static PyObject *__pyx_kp_u_error_info_3; +static PyObject *__pyx_n_s_error_text; +static PyObject *__pyx_kp_u_error_text_2; +static PyObject *__pyx_kp_u_error_text_3; +static PyObject *__pyx_n_u_etNelemToRetrieveFromCache; +static PyObject *__pyx_n_s_exceptions; +static PyObject *__pyx_n_u_f; +static PyObject *__pyx_n_s_flags; +static PyObject *__pyx_n_u_float; +static PyObject *__pyx_n_s_float16; +static PyObject *__pyx_n_u_float16; +static PyObject *__pyx_n_s_float32; +static PyObject *__pyx_n_u_float32; +static PyObject *__pyx_n_s_float64; +static PyObject *__pyx_n_u_float64; +static PyObject *__pyx_n_s_float_2; +static PyObject *__pyx_n_u_float_2; +static PyObject *__pyx_n_s_force; +static PyObject *__pyx_n_s_format; +static PyObject *__pyx_n_s_fortran; +static PyObject *__pyx_n_u_fortran; +static PyObject *__pyx_kp_u_from; +static PyObject *__pyx_n_s_func; +static PyObject *__pyx_n_s_gHandleName; +static PyObject *__pyx_n_s_gName; +static PyObject *__pyx_kp_u_gameSetAndMatch_list_handlePVSet; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_s_getAlarmStatusSeverity; +static PyObject *__pyx_n_s_getArray; +static PyObject *__pyx_n_u_getArray; +static PyObject *__pyx_n_s_getArrayCache; +static PyObject *__pyx_n_u_getArrayCache; +static PyObject *__pyx_n_u_getAsyn; +static PyObject *__pyx_n_s_getCache; +static PyObject *__pyx_kp_u_getCache_handlePV_str_dt_native; +static PyObject *__pyx_n_u_getChannelAttribute; +static PyObject *__pyx_n_u_getChannelDataStore; +static PyObject *__pyx_n_u_getChannelDevice; +static PyObject *__pyx_n_s_getChannelInfo; +static PyObject *__pyx_kp_u_getChannelInfo_handlePV; +static PyObject *__pyx_n_s_getCompoundList; +static PyObject *__pyx_kp_u_getCompoundList_handleList_str_d; +static PyObject *__pyx_n_s_getCompoundPVGroup; +static PyObject *__pyx_kp_u_getCompoundPVGroup_ghandleName_s; +static PyObject *__pyx_n_u_getContext; +static PyObject *__pyx_n_s_getCtrlCache; +static PyObject *__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat; +static PyObject *__pyx_kp_u_getCtrl_handlePV_str_dt_native; +static PyObject *__pyx_n_u_getDataTypeInCallback; +static PyObject *__pyx_n_u_getDataTypeNative; +static PyObject *__pyx_n_u_getDataTypeRequest; +static PyObject *__pyx_n_s_getDbrBase; +static PyObject *__pyx_n_u_getDbrBaseInCallback; +static PyObject *__pyx_n_u_getDbrDataTypeInCallback; +static PyObject *__pyx_n_s_getDescription; +static PyObject *__pyx_kp_u_getDictionary_handleList_dt_cach; +static PyObject *__pyx_n_s_getEnumFromString; +static PyObject *__pyx_n_u_getEnumFromString; +static PyObject *__pyx_n_s_getEnumStrings; +static PyObject *__pyx_n_s_getGroup; +static PyObject *__pyx_kp_u_getGroupCache_self_ghandleName_s; +static PyObject *__pyx_kp_u_getGroup_ghandleName_str_dt_nati; +static PyObject *__pyx_n_s_getHandleFromPV; +static PyObject *__pyx_n_s_getHandleFromPVName; +static PyObject *__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh; +static PyObject *__pyx_n_s_getHandlesFromWithinGroup; +static PyObject *__pyx_n_u_getHandlesFromWithinGroup; +static PyObject *__pyx_n_s_getList; +static PyObject *__pyx_n_u_getList; +static PyObject *__pyx_n_u_getMonitorIDInCallback; +static PyObject *__pyx_kp_u_getMonitorIDs_handlePV; +static PyObject *__pyx_kp_u_getNoMonitors_handlePV; +static PyObject *__pyx_n_s_getNonBlocking; +static PyObject *__pyx_n_s_getPV; +static PyObject *__pyx_n_u_getPV; +static PyObject *__pyx_n_s_getPVCache; +static PyObject *__pyx_kp_u_getPVCache_handlePV_str_dt_nativ; +static PyObject *__pyx_n_s_getPVGroup; +static PyObject *__pyx_n_u_getPVGroupCache; +static PyObject *__pyx_kp_u_getPVGroup_ghandleName_str_dt_na; +static PyObject *__pyx_n_s_getPVList; +static PyObject *__pyx_n_u_getPVList; +static PyObject *__pyx_n_s_getPrecision; +static PyObject *__pyx_n_u_getSFdbpm; +static PyObject *__pyx_kp_u_getScalarArray_handleList_str_dt; +static PyObject *__pyx_n_s_getScalarList; +static PyObject *__pyx_kp_u_getScalarList_handleList_str_dt; +static PyObject *__pyx_n_s_getStatus; +static PyObject *__pyx_n_s_getStringFromEnum; +static PyObject *__pyx_n_u_getStringFromEnum; +static PyObject *__pyx_n_s_getTimeStamp; +static PyObject *__pyx_n_s_getTimeStampAsDate; +static PyObject *__pyx_n_s_getUnits; +static PyObject *__pyx_n_s_getWFAsString; +static PyObject *__pyx_n_u_getWFAsString; +static PyObject *__pyx_kp_u_get_handlePV_dt; +static PyObject *__pyx_n_s_getstate; +static PyObject *__pyx_n_s_ghandleName; +static PyObject *__pyx_kp_u_global_timestamp; +static PyObject *__pyx_n_s_gname; +static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi; +static PyObject *__pyx_kp_u_groupClose_gHandleName; +static PyObject *__pyx_n_u_groupDefineFromCollection; +static PyObject *__pyx_n_s_groupHandles; +static PyObject *__pyx_kp_u_groupMemberList_self_str_gname; +static PyObject *__pyx_n_s_groupMonitorStart; +static PyObject *__pyx_kp_u_groupMonitorStartWithCBList_ghan; +static PyObject *__pyx_kp_u_groupMonitorStart_ghandleName_cb; +static PyObject *__pyx_kp_u_groupMonitorStop_ghandleName; +static PyObject *__pyx_n_s_groupOpen; +static PyObject *__pyx_kp_u_groupOpen_char_gname; +static PyObject *__pyx_kp_u_grouping_char_gname_list__pvlist; +static PyObject *__pyx_kp_u_gtsDate; +static PyObject *__pyx_n_u_h; +static PyObject *__pyx_n_s_handle; +static PyObject *__pyx_n_s_handleList; +static PyObject *__pyx_kp_u_handleMatch_list_member_should_b; +static PyObject *__pyx_n_s_handlePV; +static PyObject *__pyx_n_s_handlePVAction; +static PyObject *__pyx_kp_u_handlePVAction_list_member_shoul; +static PyObject *__pyx_n_s_handlePVMatch; +static PyObject *__pyx_n_s_handlePVSet; +static PyObject *__pyx_kp_u_handle_2; +static PyObject *__pyx_kp_u_handle_3; +static PyObject *__pyx_kp_u_handle_4; +static PyObject *__pyx_n_s_handle_5; +static PyObject *__pyx_n_s_handlesPV; +static PyObject *__pyx_n_u_has; +static PyObject *__pyx_n_s_hasAlarmStatusSeverity; +static PyObject *__pyx_n_s_hasDescription; +static PyObject *__pyx_kp_u_has_error; +static PyObject *__pyx_kp_u_hence_assuming_DBR_TIME; +static PyObject *__pyx_kp_u_hence_assuming_default_value_GET; +static PyObject *__pyx_kp_u_hence_assuming_default_value_GET_2; +static PyObject *__pyx_n_s_hex; +static PyObject *__pyx_kp_u_hostName_s; +static PyObject *__pyx_n_s_iElem; +static PyObject *__pyx_n_s_id; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_kp_u_in_PyCafe_def_getCompundList; +static PyObject *__pyx_kp_u_in_PyCafe_def_getScalarArray; +static PyObject *__pyx_kp_u_in_PyCafe_def_getScalarList; +static PyObject *__pyx_n_s_index; +static PyObject *__pyx_n_u_init; +static PyObject *__pyx_n_s_initCallbackComplete; +static PyObject *__pyx_n_u_initCallbackComplete; +static PyObject *__pyx_kp_u_input_argument_timeout_must_be_a; +static PyObject *__pyx_kp_u_input_argument_timeout_must_be_a_2; +static PyObject *__pyx_n_s_inspect; +static PyObject *__pyx_n_u_int; +static PyObject *__pyx_n_s_int16; +static PyObject *__pyx_n_u_int16; +static PyObject *__pyx_n_s_int32; +static PyObject *__pyx_n_u_int32; +static PyObject *__pyx_n_s_int64; +static PyObject *__pyx_n_u_int64; +static PyObject *__pyx_n_s_int8; +static PyObject *__pyx_n_u_int8; +static PyObject *__pyx_n_s_int_2; +static PyObject *__pyx_n_u_int_2; +static PyObject *__pyx_n_s_intc; +static PyObject *__pyx_n_s_intp; +static PyObject *__pyx_kp_u_isBS_d; +static PyObject *__pyx_n_s_isConnected; +static PyObject *__pyx_n_u_isConnected; +static PyObject *__pyx_n_s_isEnum; +static PyObject *__pyx_n_s_isValid; +static PyObject *__pyx_kp_u_is_not_a_valid_option; +static PyObject *__pyx_n_s_items; +static PyObject *__pyx_n_s_itemsize; +static PyObject *__pyx_kp_s_itemsize_0_for_cython_array; +static PyObject *__pyx_n_s_keepGroupName; +static PyObject *__pyx_n_s_keys; +static PyObject *__pyx_n_s_kwargs; +static PyObject *__pyx_kp_u_latin_1; +static PyObject *__pyx_n_u_len1; +static PyObject *__pyx_n_u_len2; +static PyObject *__pyx_n_s_longlong; +static PyObject *__pyx_kp_u_lowerAlarmLimit_f; +static PyObject *__pyx_kp_u_lowerControlLimit_f; +static PyObject *__pyx_kp_u_lowerDisplayLimit_f; +static PyObject *__pyx_kp_u_lowerWarningLimit_f; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_kp_u_mask; +static PyObject *__pyx_kp_u_maskHasDBE_ALARM; +static PyObject *__pyx_kp_u_maskHasDBE_LOG; +static PyObject *__pyx_kp_u_maskHasDBE_PROPERTY; +static PyObject *__pyx_kp_u_maskHasDBE_VALUE; +static PyObject *__pyx_n_s_mask_2; +static PyObject *__pyx_kp_u_matchMany_list_valSet_list_handl; +static PyObject *__pyx_kp_u_match_double_valSet_handlePVMatc; +static PyObject *__pyx_kp_u_members_while_group_has; +static PyObject *__pyx_n_s_memoryview; +static PyObject *__pyx_n_u_memoryview; +static PyObject *__pyx_kp_u_memoryview_numpy_array_ctypes; +static PyObject *__pyx_n_u_memoryviewslice; +static PyObject *__pyx_n_u_memoryviewslice_2; +static PyObject *__pyx_n_s_memview; +static PyObject *__pyx_n_s_method; +static PyObject *__pyx_n_s_mode; +static PyObject *__pyx_n_s_modulo; +static PyObject *__pyx_kp_u_modulo_input_arg_should_be_of_ty; +static PyObject *__pyx_kp_u_modulo_input_argument_must_be_po; +static PyObject *__pyx_kp_u_monid; +static PyObject *__pyx_n_s_monid_2; +static PyObject *__pyx_n_s_monitorStart; +static PyObject *__pyx_kp_u_monitorStart_handlePV_object_cb; +static PyObject *__pyx_n_s_monitorStop; +static PyObject *__pyx_kp_u_monitorStopAll; +static PyObject *__pyx_kp_u_monitorStop_handlePV_mpid_None; +static PyObject *__pyx_kp_u_monitor_id; +static PyObject *__pyx_n_u_monitorid; +static PyObject *__pyx_n_s_monitorpolicy; +static PyObject *__pyx_n_s_mpid; +static PyObject *__pyx_n_u_mv; +static PyObject *__pyx_kp_u_nChannels_d; +static PyObject *__pyx_kp_u_nNullData_d; +static PyObject *__pyx_kp_u_nPV_d; +static PyObject *__pyx_kp_u_name; +static PyObject *__pyx_kp_u_name_2; +static PyObject *__pyx_n_s_name_3; +static PyObject *__pyx_n_s_name_4; +static PyObject *__pyx_n_u_native; +static PyObject *__pyx_n_s_ndarray; +static PyObject *__pyx_n_u_ndarray; +static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; +static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; +static PyObject *__pyx_n_s_ndim; +static PyObject *__pyx_kp_u_nelem; +static PyObject *__pyx_n_s_nelem_2; +static PyObject *__pyx_kp_u_nelem_d; +static PyObject *__pyx_n_s_netrfc; +static PyObject *__pyx_n_s_new; +static PyObject *__pyx_kp_u_nhwm_d; +static PyObject *__pyx_kp_u_noEnumStrings_d; +static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; +static PyObject *__pyx_kp_u_not_connected; +static PyObject *__pyx_kp_u_not_recognized; +static PyObject *__pyx_n_s_notify_milliseconds; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_u_np; +static PyObject *__pyx_kp_u_np_bool; +static PyObject *__pyx_kp_u_np_byte; +static PyObject *__pyx_kp_u_np_float; +static PyObject *__pyx_kp_u_np_float16; +static PyObject *__pyx_kp_u_np_float32; +static PyObject *__pyx_kp_u_np_float64; +static PyObject *__pyx_kp_u_np_int; +static PyObject *__pyx_kp_u_np_int16; +static PyObject *__pyx_kp_u_np_int32; +static PyObject *__pyx_kp_u_np_int64; +static PyObject *__pyx_kp_u_np_int8; +static PyObject *__pyx_kp_u_np_intc; +static PyObject *__pyx_kp_u_np_long; +static PyObject *__pyx_kp_u_np_ndarray; +static PyObject *__pyx_kp_u_np_short; +static PyObject *__pyx_kp_u_np_str; +static PyObject *__pyx_kp_u_np_str_2; +static PyObject *__pyx_kp_u_np_string; +static PyObject *__pyx_kp_u_np_string_2; +static PyObject *__pyx_kp_u_np_uint16; +static PyObject *__pyx_kp_u_np_uint32; +static PyObject *__pyx_kp_u_np_uint64; +static PyObject *__pyx_kp_u_np_uint8; +static PyObject *__pyx_kp_u_np_ulong; +static PyObject *__pyx_kp_u_np_unicode; +static PyObject *__pyx_kp_u_np_unicode_2; +static PyObject *__pyx_kp_u_np_ushort; +static PyObject *__pyx_kp_u_nsec; +static PyObject *__pyx_n_s_numbers; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_n_u_numpy; +static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_kp_u_numpy_ndarray; +static PyObject *__pyx_n_s_obj; +static PyObject *__pyx_kp_u_of_which_BS; +static PyObject *__pyx_kp_u_of_which_CA_d; +static PyObject *__pyx_kp_u_of_which_CA_d_i_e_all; +static PyObject *__pyx_n_s_offset; +static PyObject *__pyx_kp_u_offset_input_arg_should_be_of_ty; +static PyObject *__pyx_kp_u_offset_input_argument_cannot_be; +static PyObject *__pyx_n_s_open; +static PyObject *__pyx_n_u_open; +static PyObject *__pyx_n_u_openGroupNowAndWaitForInputGroup; +static PyObject *__pyx_n_s_openMonitorNow; +static PyObject *__pyx_kp_u_openMonitorNowAndWait_timeout; +static PyObject *__pyx_n_s_openMonitorPrepare; +static PyObject *__pyx_n_s_openNoWait; +static PyObject *__pyx_n_s_openNowAndWait; +static PyObject *__pyx_n_u_openNowAndWait; +static PyObject *__pyx_n_s_openPrepare; +static PyObject *__pyx_n_s_order; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_kp_u_overallStatus; +static PyObject *__pyx_kp_u_pGoodData_f; +static PyObject *__pyx_n_s_pack; +static PyObject *__pyx_n_s_parameters; +static PyObject *__pyx_n_s_pickle; +static PyObject *__pyx_kp_u_precision_d; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_printFlag; +static PyObject *__pyx_n_s_printHandle; +static PyObject *__pyx_n_u_printHandlesV; +static PyObject *__pyx_n_u_printStatusIfError; +static PyObject *__pyx_kp_u_pulseID; +static PyObject *__pyx_n_s_pulseID_2; +static PyObject *__pyx_kp_u_pulse_id_d; +static PyObject *__pyx_kp_u_pv; +static PyObject *__pyx_kp_u_pvIdx; +static PyObject *__pyx_n_s_pvList; +static PyObject *__pyx_kp_u_pv_2; +static PyObject *__pyx_n_s_pv_3; +static PyObject *__pyx_n_s_pv_name; +static PyObject *__pyx_n_s_pv_name_2; +static PyObject *__pyx_n_s_pv_value; +static PyObject *__pyx_n_s_pvctrl; +static PyObject *__pyx_n_s_pvdata; +static PyObject *__pyx_n_s_pvgroup; +static PyObject *__pyx_n_s_pvhandleList; +static PyObject *__pyx_n_s_pvlist; +static PyObject *__pyx_kp_u_py_cb_handle_connect_wrapper_CO; +static PyObject *__pyx_kp_u_py_cb_handle_monid_wrapper_MONI; +static PyObject *__pyx_kp_u_py_cb_handle_open_wrapper_OPEN; +static PyObject *__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han; +static PyObject *__pyx_kp_u_py_cb_wrapper_PVDATA_Handle_PVN; +static PyObject *__pyx_n_s_pymodule; +static PyObject *__pyx_n_s_pymodule_parts; +static PyObject *__pyx_n_s_python_version; +static PyObject *__pyx_kp_u_pyx; +static PyObject *__pyx_n_s_pyx_PickleError; +static PyObject *__pyx_n_s_pyx_checksum; +static PyObject *__pyx_n_s_pyx_getbuffer; +static PyObject *__pyx_n_s_pyx_result; +static PyObject *__pyx_n_s_pyx_state; +static PyObject *__pyx_n_s_pyx_type; +static PyObject *__pyx_n_s_pyx_unpickle_CafeException; +static PyObject *__pyx_n_s_pyx_unpickle_Enum; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_reduce; +static PyObject *__pyx_n_s_reduce_cython; +static PyObject *__pyx_n_s_reduce_ex; +static PyObject *__pyx_kp_u_reports_the_following_error; +static PyObject *__pyx_kp_u_s; +static PyObject *__pyx_n_s_scalarOnly; +static PyObject *__pyx_kp_u_sec; +static PyObject *__pyx_n_s_self; +static PyObject *__pyx_n_s_set; +static PyObject *__pyx_kp_u_setAndMatchMany_list_handlePVSet; +static PyObject *__pyx_kp_u_setAndMatch_handlePVSet_double_v; +static PyObject *__pyx_n_u_setBS; +static PyObject *__pyx_n_u_setCallbackGet; +static PyObject *__pyx_n_u_setCallbackPut; +static PyObject *__pyx_n_u_setChannelRequestPolicyGet; +static PyObject *__pyx_kp_u_setCompoundList_handleList_list; +static PyObject *__pyx_n_s_setDbrBase; +static PyObject *__pyx_n_s_setGetActionWhenMonitorPolicy; +static PyObject *__pyx_n_s_setGetCacheWaitPolicy; +static PyObject *__pyx_kp_u_setGroup_self_ghandleName_list_v; +static PyObject *__pyx_n_u_setNelem; +static PyObject *__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i; +static PyObject *__pyx_n_u_setNelemToNative; +static PyObject *__pyx_n_u_setNelemToRetrieveFromCacheToOne; +static PyObject *__pyx_n_u_setPulseIDBufferSize; +static PyObject *__pyx_n_s_setPyCallbackConnect; +static PyObject *__pyx_n_s_setPyConnectCallbackFn; +static PyObject *__pyx_n_u_setScalarList; +static PyObject *__pyx_kp_u_set_handlePV_valSet; +static PyObject *__pyx_n_s_setstate; +static PyObject *__pyx_n_s_setstate_cython; +static PyObject *__pyx_n_s_shape; +static PyObject *__pyx_n_s_short; +static PyObject *__pyx_n_u_short; +static PyObject *__pyx_n_s_show; +static PyObject *__pyx_n_s_showMax; +static PyObject *__pyx_n_s_signature; +static PyObject *__pyx_n_s_single; +static PyObject *__pyx_n_s_size; +static PyObject *__pyx_n_s_sleep; +static PyObject *__pyx_n_s_source; +static PyObject *__pyx_kp_u_source_2; +static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_start; +static PyObject *__pyx_kp_u_status; +static PyObject *__pyx_n_s_statusAsString; +static PyObject *__pyx_n_s_statusList; +static PyObject *__pyx_kp_u_status_2; +static PyObject *__pyx_n_s_status_3; +static PyObject *__pyx_kp_u_status_4; +static PyObject *__pyx_kp_u_status_d; +static PyObject *__pyx_n_s_step; +static PyObject *__pyx_n_s_stop; +static PyObject *__pyx_n_u_str; +static PyObject *__pyx_n_s_str_2; +static PyObject *__pyx_n_u_str_2; +static PyObject *__pyx_kp_s_strided_and_direct; +static PyObject *__pyx_kp_s_strided_and_direct_or_indirect; +static PyObject *__pyx_kp_s_strided_and_indirect; +static PyObject *__pyx_n_u_string; +static PyObject *__pyx_n_u_string_2; +static PyObject *__pyx_kp_s_stringsource; +static PyObject *__pyx_n_s_struct; +static PyObject *__pyx_n_s_supplementHandle; +static PyObject *__pyx_n_u_supplementHandles; +static PyObject *__pyx_n_s_supplementHandlesV; +static PyObject *__pyx_n_u_supplementHandlesV; +static PyObject *__pyx_n_s_sys; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_time; +static PyObject *__pyx_n_s_timeit; +static PyObject *__pyx_n_s_timeout; +static PyObject *__pyx_n_s_timeoutMS; +static PyObject *__pyx_kp_u_timeoutMS_d; +static PyObject *__pyx_n_s_tolerance; +static PyObject *__pyx_kp_u_ts; +static PyObject *__pyx_kp_u_tsDate; +static PyObject *__pyx_n_s_tsDateAsString; +static PyObject *__pyx_n_s_tsDate_2; +static PyObject *__pyx_n_s_ts_2; +static PyObject *__pyx_n_s_type; +static PyObject *__pyx_kp_u_type_2; +static PyObject *__pyx_n_s_type_3; +static PyObject *__pyx_n_s_ubyte; +static PyObject *__pyx_n_u_uchar; +static PyObject *__pyx_n_s_uint; +static PyObject *__pyx_n_u_uint; +static PyObject *__pyx_n_s_uint16; +static PyObject *__pyx_n_u_uint16; +static PyObject *__pyx_n_s_uint32; +static PyObject *__pyx_n_u_uint32; +static PyObject *__pyx_n_s_uint64; +static PyObject *__pyx_n_u_uint64; +static PyObject *__pyx_n_s_uint8; +static PyObject *__pyx_n_u_uint8; +static PyObject *__pyx_n_s_uintc; +static PyObject *__pyx_n_s_uintp; +static PyObject *__pyx_n_s_ulonglong; +static PyObject *__pyx_kp_s_unable_to_allocate_array_data; +static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str; +static PyObject *__pyx_n_u_unicode; +static PyObject *__pyx_n_s_unicode_2; +static PyObject *__pyx_n_u_unicode_2; +static PyObject *__pyx_kp_u_units_s; +static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; +static PyObject *__pyx_n_s_unpack; +static PyObject *__pyx_n_s_update; +static PyObject *__pyx_kp_u_upperAlarmLimit_f; +static PyObject *__pyx_kp_u_upperControlLimit_f; +static PyObject *__pyx_kp_u_upperDisplayLimit_f; +static PyObject *__pyx_kp_u_upperWarningLimit_f; +static PyObject *__pyx_kp_u_userArgs; +static PyObject *__pyx_n_s_ushort; +static PyObject *__pyx_n_u_ushort; +static PyObject *__pyx_n_u_utf8; +static PyObject *__pyx_n_u_utf_8; +static PyObject *__pyx_kp_u_utf_8_2; +static PyObject *__pyx_n_s_valAction; +static PyObject *__pyx_n_s_valList; +static PyObject *__pyx_n_s_valSet; +static PyObject *__pyx_kp_u_value; +static PyObject *__pyx_kp_u_value_2; +static PyObject *__pyx_kp_u_value_3; +static PyObject *__pyx_kp_u_value_4; +static PyObject *__pyx_kp_u_value_5; +static PyObject *__pyx_n_s_value_6; +static PyObject *__pyx_n_s_values; +static PyObject *__pyx_n_s_vectorList; +static PyObject *__pyx_n_s_verify_handlepv; +static PyObject *__pyx_n_s_verify_handlepv_locals_wrapper; +static PyObject *__pyx_n_s_version_info; +static PyObject *__pyx_n_s_wait; +static PyObject *__pyx_kp_u_waitForBundledEvents_self_handle; +static PyObject *__pyx_n_s_waitForGetEvent; +static PyObject *__pyx_n_u_waveform; +static PyObject *__pyx_n_s_wf; +static PyObject *__pyx_n_s_when; +static PyObject *__pyx_kp_u_while_list_of_callback_objects; +static PyObject *__pyx_n_s_widget; +static PyObject *__pyx_kp_u_with_error_status; +static PyObject *__pyx_n_s_wmpk; +static PyObject *__pyx_n_s_wpk; +static PyObject *__pyx_n_s_wrapper; +static PyObject *__pyx_n_s_zip; +static int __pyx_pf_6PyCafe_4CyCa___cinit__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_4WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_7PENDING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_11channelInfo___cinit__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_2show(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9channelID___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8hostName___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_5nelem___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8dataType___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9className___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_6pvctrl___cinit__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_2show(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_4showMax(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5nelem___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_9precision___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5units___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5value___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6status___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_13CafeException___init__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv_name, PyObject *__pyx_v__error_code, PyObject *__pyx_v__error_text, PyObject *__pyx_v__error_info); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_2show(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4reveal(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4type___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6source___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6handle___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4name___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_code___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_text___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_info___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_13monitorpolicy___cinit__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_2show(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6status___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata___cinit__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_2show(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_4showMax(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_5nelem___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_2ts___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6tsDate___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_5value___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6status___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_6status_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_7pulseID___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_8dataType___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup___cinit__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_2show(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4showWithPV(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_glist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6showMax(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v__npv); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_3npv___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4name___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4rule___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_9bschannel___cinit__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_4name___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_4type___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_6modulo___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_6offset___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_5nelem___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_9BSEnabled___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_9bschannel_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_6BSData___cinit__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_2__copy__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_4__deepcopy__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_6compare(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v__pvdata); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_8getIdxFromPVName(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v__name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_10getDaqStop(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_12setDaqStop(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, int __pyx_v_ds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_14getVal(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_iElem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_16getPV(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_iElem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_18show(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_BSCA, int __pyx_v_wf); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_20showAll(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, int __pyx_v_wf); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_5htype___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_8pulse_id___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_9BSChannel___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_2pv___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_5pvIdx___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_6handle___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_16global_timestamp___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_7gtsDate___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_4isBS___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_3nPV___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_10nBSEnabled___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_4nhwm___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_9timeoutMS___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_9nChannels___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_9nNullData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_9pGoodData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_6status___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_14statusAsString___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_7daqStop___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6BSData_7daqStop_2__set__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_10hasNewData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_6pvdata___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_BSData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6BSData_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_10SFDBPMData___cinit__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1x___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1y___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1q___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6Energy___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7xStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7yStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7qStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_12EnergyStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllXOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllYOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllQOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7isAllOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6device___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6status___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15verify_handlepv_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_6PyCafe_verify_handlepv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */ +static int __pyx_pf_6PyCafe_6CyCafe___cinit__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static void __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_4setPyConnectCallbackFn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_6setPyCallbackConnect(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_enable); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12isValid(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14removeWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16addWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_18getWidgets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_24openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_26openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_30getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_32openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_34openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_handlesPV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38openGroupNowAndWaitForInputGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_groupHandles); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_42openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_44openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_46ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_52ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_54setChannelRequestPolicyGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when, ChannelWaitForResponsePolicyKind __pyx_v_wait, ChannelRequestPolicyKind __pyx_v_method, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56initCallbackComplete(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_60setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_62setTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_64getTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_66getTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getSGTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getSGTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76setSGSelfGoverningTimeout(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_78getContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_80attachContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82collectionDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84defineCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_86collectionList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88collectionMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90loadCollectionsFromXML(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92loadGroupsFromXML(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_94devicePositionMap(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_96devicePositionV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_100getDataTypeNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_102getDataTypeRequest(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_104getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_106getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_108getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_110getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_112getHandlesFromWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_114close(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_116closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_118closeHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_120closeDisconnectedChannelsWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_122closeChannelKeepHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_124reconnect(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_126allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_128isConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_130supplementHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_132supplementHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134supplementHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_136printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_138printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_140printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_142printHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_144printHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_146getDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_148getHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_asDict); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_150getHandleStates(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_152getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_154getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_156getStatusCodeAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_158getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_160getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_162getStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_164getChannelDevice(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_166getChannelAttribute(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_168getDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_170hasDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_172getUnits(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_174getPrecision(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_176hasAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_178getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_180getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_182getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_184checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_186checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_188checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_190getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_192getHandleFromPVName(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_194getPVFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_196getHandleFromPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_198getChannelDataStore(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_200getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_202getChannelList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_listStrings); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_204getWFAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cache); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_206getWFAsStringCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_208isEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_210getEnumStrings(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_212getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_214getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned short __pyx_v_enumValue); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_216loadSFGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_218loadSFGroupsWithBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_VA); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_220setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_222getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_234getStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_236getInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_238getFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_240caget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_242caput(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_pv_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244get(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_246getIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_248getFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_250getStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_252getList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_254getStrArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_256getIntArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_258getFloatArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_260getArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_262getPVInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_264getPVFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_266getPVStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_268getPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_270getPVStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_272getPVIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_276getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_statusList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_280getAsyn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_286getScalarArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_294getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, CYTHON_UNUSED PyObject *__pyx_v_dictFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_296getDictionary(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvhandleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, PyObject *__pyx_v_scalarOnly); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_298getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_302getStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_304getIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_306getFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_308getCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316getArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_324getPVCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_326getCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v__monid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_334groupMonitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_342getGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_344getGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_348getGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_350getGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_358getPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_364groupMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_366grouping(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gname, char const *__pyx_v_cname, PyObject *__pyx_v_attrib); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_370groupDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_372defineGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_374groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_376groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName, int __pyx_v_keepGroupName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_378isGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_380isCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_384getMonitorIDs(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_386monitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_388monitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_390monitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_mpid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_392monitorStopAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_394set(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_valSet); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_396setScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_valList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_398setCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_400setGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_402gameSetAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVAction, PyObject *__pyx_v_valAction, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_404setAndMatchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_406setAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_408matchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_410match(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_412setNelemCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_414setNelem(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_416setNelemToNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_418setNelemToRetrieveFromCacheToOne(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_420setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_netrfc); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_422terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_424prepareSFdbpm(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_426setSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_bsFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_428resetSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_430closeSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_432readSFdbpmOffsets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_434getSFdbpm(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_436getSFdbpmOffs_x(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_438getSFdbpmOffs_y(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_440setBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_modulo, PyObject *__pyx_v_offset, int __pyx_v_timeoutMS); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_442initBSwithCA(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_444setBS2CA(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_446getBSSlim(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_448getBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_450closeBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_452getTimeoutMSBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_454setTimeoutMSBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_timeoutMS); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_456reconnectBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_458flushBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_460monitorPulseID(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_462monitorStopPulseID(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_464setPulseIDBufferSize(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_bufferSize); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_466setPulseIDBufferSizeAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_bufferSize); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_468setBSInit(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_470__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_472__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */ +static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_6PyCafe_CyCa(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_channelInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvctrl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_CafeException(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_monitorpolicy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvdata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvgroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_bschannel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_BSData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_SFDBPMData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_CyCafe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0}; +static PyObject *__pyx_float_0_1; +static PyObject *__pyx_float_0_2; +static PyObject *__pyx_float_0_01; +static PyObject *__pyx_float_0_02; +static PyObject *__pyx_float_0_05; +static PyObject *__pyx_float_0_001; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_6; +static PyObject *__pyx_int_40; +static PyObject *__pyx_int_50792432; +static PyObject *__pyx_int_145648516; +static PyObject *__pyx_int_184977713; +static PyObject *__pyx_int_neg_1; +static DBR_TYPE __pyx_k__99; +static unsigned int __pyx_k__100; +static DBR_TYPE __pyx_k__101; +static unsigned int __pyx_k__102; +static DBR_TYPE __pyx_k__107; +static unsigned int __pyx_k__108; +static DBR_TYPE __pyx_k__123; +static unsigned int __pyx_k__124; +static DBR_TYPE __pyx_k__125; +static unsigned int __pyx_k__126; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__18; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__22; +static PyObject *__pyx_tuple__25; +static PyObject *__pyx_tuple__27; +static PyObject *__pyx_tuple__28; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__32; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__34; +static PyObject *__pyx_tuple__35; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__38; +static PyObject *__pyx_tuple__39; +static PyObject *__pyx_tuple__40; +static PyObject *__pyx_tuple__41; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__44; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__52; +static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__55; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__59; +static PyObject *__pyx_tuple__60; +static PyObject *__pyx_tuple__61; +static PyObject *__pyx_tuple__62; +static PyObject *__pyx_tuple__63; +static PyObject *__pyx_tuple__64; +static PyObject *__pyx_tuple__65; +static PyObject *__pyx_tuple__66; +static PyObject *__pyx_tuple__67; +static PyObject *__pyx_tuple__68; +static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__70; +static PyObject *__pyx_tuple__71; +static PyObject *__pyx_tuple__72; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__74; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__76; +static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__78; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__80; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__82; +static PyObject *__pyx_tuple__83; +static PyObject *__pyx_tuple__84; +static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__86; +static PyObject *__pyx_tuple__87; +static PyObject *__pyx_tuple__88; +static PyObject *__pyx_tuple__89; +static PyObject *__pyx_tuple__90; +static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__92; +static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__94; +static PyObject *__pyx_tuple__95; +static PyObject *__pyx_tuple__96; +static PyObject *__pyx_tuple__97; +static PyObject *__pyx_tuple__98; +static PyObject *__pyx_slice__169; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__104; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__106; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__110; +static PyObject *__pyx_tuple__112; +static PyObject *__pyx_tuple__113; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__116; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__120; +static PyObject *__pyx_tuple__127; +static PyObject *__pyx_tuple__128; +static PyObject *__pyx_tuple__129; +static PyObject *__pyx_tuple__130; +static PyObject *__pyx_tuple__131; +static PyObject *__pyx_tuple__132; +static PyObject *__pyx_tuple__133; +static PyObject *__pyx_tuple__134; +static PyObject *__pyx_tuple__135; +static PyObject *__pyx_tuple__136; +static PyObject *__pyx_tuple__137; +static PyObject *__pyx_tuple__139; +static PyObject *__pyx_tuple__140; +static PyObject *__pyx_tuple__141; +static PyObject *__pyx_tuple__142; +static PyObject *__pyx_tuple__143; +static PyObject *__pyx_tuple__144; +static PyObject *__pyx_tuple__145; +static PyObject *__pyx_tuple__146; +static PyObject *__pyx_tuple__147; +static PyObject *__pyx_tuple__148; +static PyObject *__pyx_tuple__149; +static PyObject *__pyx_tuple__150; +static PyObject *__pyx_tuple__151; +static PyObject *__pyx_tuple__152; +static PyObject *__pyx_tuple__153; +static PyObject *__pyx_tuple__154; +static PyObject *__pyx_tuple__155; +static PyObject *__pyx_tuple__156; +static PyObject *__pyx_tuple__157; +static PyObject *__pyx_tuple__158; +static PyObject *__pyx_tuple__159; +static PyObject *__pyx_tuple__160; +static PyObject *__pyx_tuple__161; +static PyObject *__pyx_tuple__162; +static PyObject *__pyx_tuple__163; +static PyObject *__pyx_tuple__164; +static PyObject *__pyx_tuple__165; +static PyObject *__pyx_tuple__166; +static PyObject *__pyx_tuple__167; +static PyObject *__pyx_tuple__168; +static PyObject *__pyx_tuple__170; +static PyObject *__pyx_tuple__171; +static PyObject *__pyx_tuple__172; +static PyObject *__pyx_tuple__174; +static PyObject *__pyx_tuple__175; +static PyObject *__pyx_tuple__177; +static PyObject *__pyx_tuple__179; +static PyObject *__pyx_tuple__180; +static PyObject *__pyx_tuple__181; +static PyObject *__pyx_tuple__182; +static PyObject *__pyx_tuple__183; +static PyObject *__pyx_tuple__184; +static PyObject *__pyx_codeobj__42; +static PyObject *__pyx_codeobj__176; +static PyObject *__pyx_codeobj__178; +static PyObject *__pyx_codeobj__185; +/* Late includes */ + +/* "PyCafeDefs_pub.pxi":10 + * # For when with pvdata + * + * cdef public void cy_data_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +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; + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_data_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":20 + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) + * + * cdef pvdata data = PVDataHolderToStruct(pvd) # <<<<<<<<<<<<<< + * #data.show() + * py_cb = ( callback) + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":22 + * cdef pvdata data = PVDataHolderToStruct(pvd) + * #data.show() + * py_cb = ( callback) # <<<<<<<<<<<<<< + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname) + * #print( py_cb) + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":34 + * cbobjt(handle, pvname, data) + * ''' + * if callback: # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname) + */ + __pyx_t_2 = (__pyx_v_callback != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs_pub.pxi":35 + * ''' + * if callback: + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname) + * cbobjt(handle, pvname, data) + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":37 + * cbobjt= ( callback) + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname) + * cbobjt(handle, pvname, data) # <<<<<<<<<<<<<< + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(4)= Handle/PVNAME :", handle, pvname) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_v_data)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, ((PyObject *)__pyx_v_data)); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":34 + * cbobjt(handle, pvname, data) + * ''' + * if callback: # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname) + */ + } + + /* "PyCafeDefs_pub.pxi":10 + * # For when with pvdata + * + * cdef public void cy_data_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_WriteUnraisable("PyCafe.cy_data_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_data); + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":45 + * + * + * cdef public void cy_ctrl_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +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; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_ctrl_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":51 + * + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":52 + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * cbobjt(handle, pvname, data) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":53 + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_data)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data)); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":54 + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":55 + * cbobjt(handle, pvname, data) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void cy_event_handler_wrapper(void * callback, + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":54 + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":45 + * + * + * cdef public void cy_ctrl_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.cy_ctrl_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_data); + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":57 + * return + * + * cdef public void cy_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname) with gil: + */ + +void cy_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":62 + * #print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname) + * + * cbobjt= callback # <<<<<<<<<<<<<< + * cbobjt(handle, pvname) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_callback); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":63 + * + * cbobjt= callback + * cbobjt(handle, pvname) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":64 + * cbobjt= callback + * cbobjt(handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":65 + * cbobjt(handle, pvname) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void cy_connect_handler_wrapper(void * callback, + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":64 + * cbobjt= callback + * cbobjt(handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":57 + * return + * + * cdef public void cy_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname) with gil: + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.cy_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":67 + * return + * + * cdef public void cy_connect_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +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; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_connect_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":74 + * #print(" callback is ", callback) + * + * if callback: # <<<<<<<<<<<<<< + * #print(" callback is not None ") + * cbobjt= callback + */ + __pyx_t_1 = (__pyx_v_callback != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs_pub.pxi":76 + * if callback: + * #print(" callback is not None ") + * cbobjt= callback # <<<<<<<<<<<<<< + * + * cbobjt(handle, pvname, status) + */ + __pyx_t_2 = ((PyObject *)__pyx_v_callback); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_cbobjt = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":78 + * cbobjt= callback + * + * cbobjt(handle, pvname, status) # <<<<<<<<<<<<<< + * #print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++ SUCCESS") + * #else: + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_6 = __pyx_v_cbobjt; __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":74 + * #print(" callback is ", callback) + * + * if callback: # <<<<<<<<<<<<<< + * #print(" callback is not None ") + * cbobjt= callback + */ + } + + /* "PyCafeDefs_pub.pxi":85 + * # cbobjt(handle, pvname, status) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":86 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs_pub.pxi":85 + * # cbobjt(handle, pvname, status) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs_pub.pxi":67 + * return + * + * cdef public void cy_connect_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_WriteUnraisable("PyCafe.cy_connect_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":88 + * return + * + * cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) + */ + +void py_cb_wrapper(PVDataHolder __pyx_v_pvd, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) { + CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pv1 = 0; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":89 + * + * cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + * print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) # <<<<<<<<<<<<<< + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_py_cb_wrapper_PVDATA_Handle_PVN); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_wrapper_PVDATA_Handle_PVN); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_py_cb_wrapper_PVDATA_Handle_PVN); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":90 + * cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: + * print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pv1 = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":118 + * cbobjt(pv1, handle, pvname) + * ''' + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":119 + * ''' + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":118 + * cbobjt(pv1, handle, pvname) + * ''' + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":88 + * return + * + * cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname) + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("PyCafe.py_cb_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_pv1); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":122 + * + * + * cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + */ + +void py_cb_ctrl_wrapper(PVCtrlHolder __pyx_v_pvc, CYTHON_UNUSED unsigned int __pyx_v_handle, CYTHON_UNUSED std::string __pyx_v_pvname) { + CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_c1 = 0; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_ctrl_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":124 + * cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: + * #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) # <<<<<<<<<<<<<< + * ''' + * global handleMonDictGlobal + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_c1 = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":132 + * cbobjt(c1, handle, pvname) + * ''' + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":133 + * ''' + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":132 + * cbobjt(c1, handle, pvname) + * ''' + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":122 + * + * + * cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_WriteUnraisable("PyCafe.py_cb_ctrl_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c1); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":135 + * return + * + * cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + * py_cb_handle(handle) + */ + +void py_cb_handle_wrapper(unsigned int __pyx_v_handle) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":136 + * + * cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) # <<<<<<<<<<<<<< + * py_cb_handle(handle) + * with nogil: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":137 + * cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + * py_cb_handle(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_6PyCafe_py_cb_handle); + __pyx_t_3 = __pyx_v_6PyCafe_py_cb_handle; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":138 + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + * py_cb_handle(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":139 + * py_cb_handle(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":138 + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + * py_cb_handle(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":135 + * return + * + * cdef public void py_cb_handle_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle) + * py_cb_handle(handle) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":143 + * + * # Default + * cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) + * + */ + +void py_cb_handle_monid_wrapper(unsigned int __pyx_v_handle, unsigned long __pyx_v_monid) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_monid_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":144 + * # Default + * cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: + * print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_py_cb_handle_monid_wrapper_MONI); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_monid_wrapper_MONI); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_monid_wrapper_MONI); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":154 + * # if monDictGlobal.has_key(monid): + * global monDictGlobal + * if monid in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = monDictGlobal[monid] + * cbobjt(handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 154, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs_pub.pxi":155 + * global monDictGlobal + * if monid in monDictGlobal.keys(): + * cbobjt = monDictGlobal[monid] # <<<<<<<<<<<<<< + * cbobjt(handle) + * else: + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 155, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":156 + * if monid in monDictGlobal.keys(): + * cbobjt = monDictGlobal[monid] + * cbobjt(handle) # <<<<<<<<<<<<<< + * else: + * print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":154 + * # if monDictGlobal.has_key(monid): + * global monDictGlobal + * if monid in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = monDictGlobal[monid] + * cbobjt(handle) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs_pub.pxi":158 + * cbobjt(handle) + * else: + * print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo); + __Pyx_GIVEREF(__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); + __pyx_t_1 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs_pub.pxi":159 + * else: + * print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":160 + * print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs_pub.pxi":159 + * else: + * print("CALLBACK NOT FOUND FOR handle/monid", handle, monid) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs_pub.pxi":143 + * + * # Default + * cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle) + * + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_monid_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":163 + * + * + * cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle) + * # py_cb_handle_get(handle) + */ + +void py_cb_handle_get_wrapper(unsigned int __pyx_v_handle) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_get_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":167 + * # py_cb_handle_get(handle) + * global getDictGlobal + * if handle in getDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = getDictGlobal[handle] + * cbobjt(handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 167, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_getDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs_pub.pxi":168 + * global getDictGlobal + * if handle in getDictGlobal.keys(): + * cbobjt = getDictGlobal[handle] # <<<<<<<<<<<<<< + * cbobjt(handle) + * else: + */ + if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 168, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_getDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":169 + * if handle in getDictGlobal.keys(): + * cbobjt = getDictGlobal[handle] + * cbobjt(handle) # <<<<<<<<<<<<<< + * else: + * print("GET CALLBACK NOT FOUND FOR handle", handle) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":167 + * # py_cb_handle_get(handle) + * global getDictGlobal + * if handle in getDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = getDictGlobal[handle] + * cbobjt(handle) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs_pub.pxi":171 + * cbobjt(handle) + * else: + * print("GET CALLBACK NOT FOUND FOR handle", handle) # <<<<<<<<<<<<<< + * + * with nogil: + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl); + __Pyx_GIVEREF(__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs_pub.pxi":173 + * print("GET CALLBACK NOT FOUND FOR handle", handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":174 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil: + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs_pub.pxi":173 + * print("GET CALLBACK NOT FOUND FOR handle", handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs_pub.pxi":163 + * + * + * cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle) + * # py_cb_handle_get(handle) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_get_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":176 + * return + * + * cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle) + * # py_cb_handle_put(handle) + */ + +void py_cb_handle_put_wrapper(unsigned int __pyx_v_handle) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_put_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":180 + * # py_cb_handle_put(handle) + * global putDictGlobal + * if handle in putDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = putDictGlobal[handle] + * cbobjt(handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_6PyCafe_putDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 180, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_putDictGlobal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs_pub.pxi":181 + * global putDictGlobal + * if handle in putDictGlobal.keys(): + * cbobjt = putDictGlobal[handle] # <<<<<<<<<<<<<< + * cbobjt(handle) + * else: + */ + if (unlikely(__pyx_v_6PyCafe_putDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 181, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_putDictGlobal, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":182 + * if handle in putDictGlobal.keys(): + * cbobjt = putDictGlobal[handle] + * cbobjt(handle) # <<<<<<<<<<<<<< + * else: + * print("PUT CALLBACK NOT FOUND FOR handle", handle) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":180 + * # py_cb_handle_put(handle) + * global putDictGlobal + * if handle in putDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = putDictGlobal[handle] + * cbobjt(handle) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs_pub.pxi":184 + * cbobjt(handle) + * else: + * print("PUT CALLBACK NOT FOUND FOR handle", handle) # <<<<<<<<<<<<<< + * + * with nogil: + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl); + __Pyx_GIVEREF(__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs_pub.pxi":186 + * print("PUT CALLBACK NOT FOUND FOR handle", handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":187 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs_pub.pxi":186 + * print("PUT CALLBACK NOT FOUND FOR handle", handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs_pub.pxi":176 + * return + * + * cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle) + * # py_cb_handle_put(handle) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_put_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":190 + * + * + * cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: # <<<<<<<<<<<<<< + * # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + */ + +void py_cb_handle_open_wrapper(unsigned int __pyx_v_handle, int __pyx_v_status) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_open_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":192 + * cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: + * # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) # <<<<<<<<<<<<<< + * py_cb_handle_open(handle, status) + * with nogil: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_py_cb_handle_open_wrapper_OPEN); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_open_wrapper_OPEN); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_py_cb_handle_open_wrapper_OPEN); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":193 + * # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + * py_cb_handle_open(handle, status) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_6PyCafe_py_cb_handle_open); + __pyx_t_4 = __pyx_v_6PyCafe_py_cb_handle_open; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_1}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":194 + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + * py_cb_handle_open(handle, status) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":195 + * py_cb_handle_open(handle, status) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void py_cb_handle_connect_wrapper(unsigned int handle, + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":194 + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + * py_cb_handle_open(handle, status) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":190 + * + * + * cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil: # <<<<<<<<<<<<<< + * # status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604) + * print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_open_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":197 + * return + * + * cdef public void py_cb_handle_connect_wrapper(unsigned int handle, # <<<<<<<<<<<<<< + * string pvname, + * int status) with gil: + */ + +void py_cb_handle_connect_wrapper(unsigned int __pyx_v_handle, std::string __pyx_v_pvname, int __pyx_v_status) { + PyObject *__pyx_v_k = NULL; + PyObject *__pyx_v_y = NULL; + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_connect_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":200 + * string pvname, + * int status) with gil: + * print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status) # <<<<<<<<<<<<<< + * #py_cb_handle_connect(handle, pvname, status) + * global openDictGlobal + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_py_cb_handle_connect_wrapper_CO); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_connect_wrapper_CO); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_py_cb_handle_connect_wrapper_CO); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs_pub.pxi":203 + * #py_cb_handle_connect(handle, pvname, status) + * global openDictGlobal + * for k, y in openDictGlobal.items(): # <<<<<<<<<<<<<< + * print(k, y) + * # if openDictGlobal.has_key(pvname): + */ + __pyx_t_5 = 0; + if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 203, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_6PyCafe_openDictGlobal, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + while (1) { + __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_5, &__pyx_t_4, &__pyx_t_2, NULL, __pyx_t_7); + if (unlikely(__pyx_t_8 == 0)) break; + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":204 + * global openDictGlobal + * for k, y in openDictGlobal.items(): + * print(k, y) # <<<<<<<<<<<<<< + * # if openDictGlobal.has_key(pvname): + * if str(pvname) in openDictGlobal.keys(): + */ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_k); + __Pyx_GIVEREF(__pyx_v_k); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k); + __Pyx_INCREF(__pyx_v_y); + __Pyx_GIVEREF(__pyx_v_y); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_y); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs_pub.pxi":206 + * print(k, y) + * # if openDictGlobal.has_key(pvname): + * if str(pvname) in openDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = openDictGlobal[pvname] + * cbobjt(handle, pvname, status) + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 206, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_openDictGlobal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = (__pyx_t_9 != 0); + if (__pyx_t_10) { + + /* "PyCafeDefs_pub.pxi":207 + * # if openDictGlobal.has_key(pvname): + * if str(pvname) in openDictGlobal.keys(): + * cbobjt = openDictGlobal[pvname] # <<<<<<<<<<<<<< + * cbobjt(handle, pvname, status) + * with nogil: + */ + if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 207, __pyx_L1_error) + } + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_openDictGlobal, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_cbobjt = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafeDefs_pub.pxi":208 + * if str(pvname) in openDictGlobal.keys(): + * cbobjt = openDictGlobal[pvname] + * cbobjt(handle, pvname, status) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_11 = __pyx_v_cbobjt; __pyx_t_12 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_3, __pyx_t_2, __pyx_t_1}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_3, __pyx_t_2, __pyx_t_1}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_13 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_12) { + __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs_pub.pxi":206 + * print(k, y) + * # if openDictGlobal.has_key(pvname): + * if str(pvname) in openDictGlobal.keys(): # <<<<<<<<<<<<<< + * cbobjt = openDictGlobal[pvname] + * cbobjt(handle, pvname, status) + */ + } + + /* "PyCafeDefs_pub.pxi":209 + * cbobjt = openDictGlobal[pvname] + * cbobjt(handle, pvname, status) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":210 + * cbobjt(handle, pvname, status) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L6_return; + } + + /* "PyCafeDefs_pub.pxi":209 + * cbobjt = openDictGlobal[pvname] + * cbobjt(handle, pvname, status) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L6_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L8:; + } + } + + /* "PyCafeDefs_pub.pxi":197 + * return + * + * cdef public void py_cb_handle_connect_wrapper(unsigned int handle, # <<<<<<<<<<<<<< + * string pvname, + * int status) with gil: + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_connect_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_k); + __Pyx_XDECREF(__pyx_v_y); + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":351 + * cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_4CyCa_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_4CyCa_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_4CyCa___cinit__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_4CyCa___cinit__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":354 + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + * self.CY_ECA_NORMAL = ECA_NORMAL # <<<<<<<<<<<<<< + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE + */ + __pyx_v_self->CY_ECA_NORMAL = ECA_NORMAL; + + /* "PyCafeDefs.pxi":355 + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + * self.CY_ECA_NORMAL = ECA_NORMAL + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM # <<<<<<<<<<<<<< + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + */ + __pyx_v_self->CY_ECA_ALLOCMEM = ECA_ALLOCMEM; + + /* "PyCafeDefs.pxi":356 + * self.CY_ECA_NORMAL = ECA_NORMAL + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE # <<<<<<<<<<<<<< + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE + */ + __pyx_v_self->CY_ECA_TOLARGE = ECA_TOLARGE; + + /* "PyCafeDefs.pxi":357 + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT # <<<<<<<<<<<<<< + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL + */ + __pyx_v_self->CY_ECA_TIMEOUT = ECA_TIMEOUT; + + /* "PyCafeDefs.pxi":358 + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE # <<<<<<<<<<<<<< + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL + */ + __pyx_v_self->CY_ECA_BADTYPE = ECA_BADTYPE; + + /* "PyCafeDefs.pxi":359 + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL # <<<<<<<<<<<<<< + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + */ + __pyx_v_self->CY_ECA_INTERNAL = ECA_INTERNAL; + + /* "PyCafeDefs.pxi":360 + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL # <<<<<<<<<<<<<< + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + */ + __pyx_v_self->CY_ECA_GETFAIL = ECA_GETFAIL; + + /* "PyCafeDefs.pxi":361 + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL # <<<<<<<<<<<<<< + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR + */ + __pyx_v_self->CY_ECA_PUTFAIL = ECA_PUTFAIL; + + /* "PyCafeDefs.pxi":362 + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT # <<<<<<<<<<<<<< + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN + */ + __pyx_v_self->CY_ECA_BADCOUNT = ECA_BADCOUNT; + + /* "PyCafeDefs.pxi":363 + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR # <<<<<<<<<<<<<< + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + */ + __pyx_v_self->CY_ECA_BADSTR = ECA_BADSTR; + + /* "PyCafeDefs.pxi":364 + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN # <<<<<<<<<<<<<< + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + */ + __pyx_v_self->CY_ECA_DISCONN = ECA_DISCONN; + + /* "PyCafeDefs.pxi":365 + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL # <<<<<<<<<<<<<< + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID + */ + __pyx_v_self->CY_ECA_DBLCHNL = ECA_DBLCHNL; + + /* "PyCafeDefs.pxi":366 + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW # <<<<<<<<<<<<<< + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK + */ + __pyx_v_self->CY_ECA_EVDISALLOW = ECA_EVDISALLOW; + + /* "PyCafeDefs.pxi":367 + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID # <<<<<<<<<<<<<< + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE + */ + __pyx_v_self->CY_ECA_BADMONID = ECA_BADMONID; + + /* "PyCafeDefs.pxi":368 + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK # <<<<<<<<<<<<<< + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + */ + __pyx_v_self->CY_ECA_BADMASK = ECA_BADMASK; + + /* "PyCafeDefs.pxi":369 + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE # <<<<<<<<<<<<<< + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + */ + __pyx_v_self->CY_ECA_IODONE = ECA_IODONE; + + /* "PyCafeDefs.pxi":370 + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS # <<<<<<<<<<<<<< + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + */ + __pyx_v_self->CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS; + + /* "PyCafeDefs.pxi":371 + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP # <<<<<<<<<<<<<< + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + */ + __pyx_v_self->CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP; + + /* "PyCafeDefs.pxi":372 + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG # <<<<<<<<<<<<<< + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + */ + __pyx_v_self->CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG; + + /* "PyCafeDefs.pxi":373 + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS # <<<<<<<<<<<<<< + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + */ + __pyx_v_self->CY_ECA_NORDACCESS = ECA_NORDACCESS; + + /* "PyCafeDefs.pxi":374 + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS # <<<<<<<<<<<<<< + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + */ + __pyx_v_self->CY_ECA_NOWTACCESS = ECA_NOWTACCESS; + + /* "PyCafeDefs.pxi":375 + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM # <<<<<<<<<<<<<< + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + */ + __pyx_v_self->CY_ECA_ANACHRONISM = ECA_ANACHRONISM; + + /* "PyCafeDefs.pxi":376 + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR # <<<<<<<<<<<<<< + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID + */ + __pyx_v_self->CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR; + + /* "PyCafeDefs.pxi":377 + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT # <<<<<<<<<<<<<< + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + */ + __pyx_v_self->CY_ECA_NOCONVERT = ECA_NOCONVERT; + + /* "PyCafeDefs.pxi":378 + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID # <<<<<<<<<<<<<< + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + */ + __pyx_v_self->CY_ECA_BADCHID = ECA_BADCHID; + + /* "PyCafeDefs.pxi":379 + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR # <<<<<<<<<<<<<< + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + */ + __pyx_v_self->CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR; + + /* "PyCafeDefs.pxi":380 + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED # <<<<<<<<<<<<<< + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + */ + __pyx_v_self->CY_ECA_ISATTACHED = ECA_ISATTACHED; + + /* "PyCafeDefs.pxi":381 + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV # <<<<<<<<<<<<<< + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + */ + __pyx_v_self->CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV; + + /* "PyCafeDefs.pxi":382 + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY # <<<<<<<<<<<<<< + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + */ + __pyx_v_self->CY_ECA_CHANDESTROY = ECA_CHANDESTROY; + + /* "PyCafeDefs.pxi":383 + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY # <<<<<<<<<<<<<< + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + */ + __pyx_v_self->CY_ECA_BADPRIORITY = ECA_BADPRIORITY; + + /* "PyCafeDefs.pxi":384 + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED # <<<<<<<<<<<<<< + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + */ + __pyx_v_self->CY_ECA_NOTTHREADED = ECA_NOTTHREADED; + + /* "PyCafeDefs.pxi":385 + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT # <<<<<<<<<<<<<< + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + */ + __pyx_v_self->CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT; + + /* "PyCafeDefs.pxi":386 + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO # <<<<<<<<<<<<<< + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + * + */ + __pyx_v_self->CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO; + + /* "PyCafeDefs.pxi":387 + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO # <<<<<<<<<<<<<< + * + * self.ICAFE_NORMAL = ICAFE_NORMAL + */ + __pyx_v_self->CY_ECA_UNRESPTMO = ECA_UNRESPTMO; + + /* "PyCafeDefs.pxi":389 + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + * + * self.ICAFE_NORMAL = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.ICAFE_SUCCESS = ICAFE_SUCCESS + * + */ + __pyx_v_self->ICAFE_NORMAL = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":390 + * + * self.ICAFE_NORMAL = ICAFE_NORMAL + * self.ICAFE_SUCCESS = ICAFE_SUCCESS # <<<<<<<<<<<<<< + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + */ + __pyx_v_self->ICAFE_SUCCESS = ICAFE_SUCCESS; + + /* "PyCafeDefs.pxi":392 + * self.ICAFE_SUCCESS = ICAFE_SUCCESS + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + */ + __pyx_v_self->ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN; + + /* "PyCafeDefs.pxi":393 + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + */ + __pyx_v_self->ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN; + + /* "PyCafeDefs.pxi":394 + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + */ + __pyx_v_self->ICAFE_CS_CONN = ICAFE_CS_CONN; + + /* "PyCafeDefs.pxi":395 + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED # <<<<<<<<<<<<<< + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + */ + __pyx_v_self->ICAFE_CS_CLOSED = ICAFE_CS_CLOSED; + + /* "PyCafeDefs.pxi":396 + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + * + */ + __pyx_v_self->ICAFE_CS_DISCONN = ICAFE_CS_DISCONN; + + /* "PyCafeDefs.pxi":397 + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN # <<<<<<<<<<<<<< + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + */ + __pyx_v_self->ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN; + + /* "PyCafeDefs.pxi":399 + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + */ + __pyx_v_self->ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN; + + /* "PyCafeDefs.pxi":400 + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE # <<<<<<<<<<<<<< + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + */ + __pyx_v_self->ICAFE_RULE_FALSE = ICAFE_RULE_FALSE; + + /* "PyCafeDefs.pxi":401 + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT # <<<<<<<<<<<<<< + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + */ + __pyx_v_self->ICAFE_BADCOUNT = ICAFE_BADCOUNT; + + /* "PyCafeDefs.pxi":402 + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED # <<<<<<<<<<<<<< + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + */ + __pyx_v_self->ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED; + + /* "PyCafeDefs.pxi":403 + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK # <<<<<<<<<<<<<< + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + */ + __pyx_v_self->ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK; + + /* "PyCafeDefs.pxi":404 + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY # <<<<<<<<<<<<<< + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + */ + __pyx_v_self->ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY; + + /* "PyCafeDefs.pxi":405 + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT # <<<<<<<<<<<<<< + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + */ + __pyx_v_self->ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + + /* "PyCafeDefs.pxi":406 + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN # <<<<<<<<<<<<<< + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + */ + __pyx_v_self->ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + + /* "PyCafeDefs.pxi":407 + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE # <<<<<<<<<<<<<< + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + * + */ + __pyx_v_self->ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + + /* "PyCafeDefs.pxi":408 + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH # <<<<<<<<<<<<<< + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + */ + __pyx_v_self->ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH; + + /* "PyCafeDefs.pxi":410 + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN # <<<<<<<<<<<<<< + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + */ + __pyx_v_self->ICAFE_DAQ_RUN = ICAFE_DAQ_RUN; + + /* "PyCafeDefs.pxi":411 + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED # <<<<<<<<<<<<<< + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + * + */ + __pyx_v_self->ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED; + + /* "PyCafeDefs.pxi":412 + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED # <<<<<<<<<<<<<< + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + */ + __pyx_v_self->ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED; + + /* "PyCafeDefs.pxi":414 + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + */ + __pyx_v_self->ICAFE_CA_OP_GET = ICAFE_CA_OP_GET; + + /* "PyCafeDefs.pxi":415 + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + */ + __pyx_v_self->ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT; + + /* "PyCafeDefs.pxi":416 + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + */ + __pyx_v_self->ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL; + + /* "PyCafeDefs.pxi":417 + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + */ + __pyx_v_self->ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT; + + /* "PyCafeDefs.pxi":418 + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + */ + __pyx_v_self->ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT; + + /* "PyCafeDefs.pxi":419 + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + */ + __pyx_v_self->ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER; + + /* "PyCafeDefs.pxi":420 + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + * + */ + __pyx_v_self->ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN; + + /* "PyCafeDefs.pxi":421 + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP # <<<<<<<<<<<<<< + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + */ + __pyx_v_self->ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP; + + /* "PyCafeDefs.pxi":423 + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + * + */ + __pyx_v_self->ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION; + + /* "PyCafeDefs.pxi":424 + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP # <<<<<<<<<<<<<< + * + * self.ECAFE_NODATA = ECAFE_NODATA + */ + __pyx_v_self->ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP; + + /* "PyCafeDefs.pxi":426 + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + * + * self.ECAFE_NODATA = ECAFE_NODATA # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + */ + __pyx_v_self->ECAFE_NODATA = ECAFE_NODATA; + + /* "PyCafeDefs.pxi":427 + * + * self.ECAFE_NODATA = ECAFE_NODATA + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE # <<<<<<<<<<<<<< + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR + */ + __pyx_v_self->ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE; + + /* "PyCafeDefs.pxi":428 + * self.ECAFE_NODATA = ECAFE_NODATA + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT # <<<<<<<<<<<<<< + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + */ + __pyx_v_self->ECAFE_BADCOUNT = ECAFE_BADCOUNT; + + /* "PyCafeDefs.pxi":429 + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR # <<<<<<<<<<<<<< + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + */ + __pyx_v_self->ECAFE_BADSTR = ECAFE_BADSTR; + + /* "PyCafeDefs.pxi":430 + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE # <<<<<<<<<<<<<< + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + */ + __pyx_v_self->ECAFE_BADTYPE = ECAFE_BADTYPE; + + /* "PyCafeDefs.pxi":431 + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT # <<<<<<<<<<<<<< + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + */ + __pyx_v_self->ECAFE_NO_CONVERT = ECAFE_NO_CONVERT; + + /* "PyCafeDefs.pxi":432 + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT # <<<<<<<<<<<<<< + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + */ + __pyx_v_self->ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT; + + /* "PyCafeDefs.pxi":433 + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID # <<<<<<<<<<<<<< + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + */ + __pyx_v_self->ECAFE_NULLCHID = ECAFE_NULLCHID; + + /* "PyCafeDefs.pxi":434 + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID # <<<<<<<<<<<<<< + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + */ + __pyx_v_self->ECAFE_NULLEVID = ECAFE_NULLEVID; + + /* "PyCafeDefs.pxi":435 + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + */ + __pyx_v_self->ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION; + + /* "PyCafeDefs.pxi":436 + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + */ + __pyx_v_self->ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION; + + /* "PyCafeDefs.pxi":437 + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + */ + __pyx_v_self->ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF; + + /* "PyCafeDefs.pxi":438 + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER # <<<<<<<<<<<<<< + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + */ + __pyx_v_self->ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER; + + /* "PyCafeDefs.pxi":439 + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE # <<<<<<<<<<<<<< + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + */ + __pyx_v_self->ECAFE_RULE_FALSE = ECAFE_RULE_FALSE; + + /* "PyCafeDefs.pxi":440 + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP # <<<<<<<<<<<<<< + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + */ + __pyx_v_self->ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP; + + /* "PyCafeDefs.pxi":441 + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP # <<<<<<<<<<<<<< + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + */ + __pyx_v_self->ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP; + + /* "PyCafeDefs.pxi":442 + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + */ + __pyx_v_self->ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF; + + /* "PyCafeDefs.pxi":443 + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + */ + __pyx_v_self->ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE; + + /* "PyCafeDefs.pxi":444 + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + */ + __pyx_v_self->ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE; + + /* "PyCafeDefs.pxi":445 + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS # <<<<<<<<<<<<<< + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + */ + __pyx_v_self->ECAFE_NORDACCESS = ECAFE_NORDACCESS; + + /* "PyCafeDefs.pxi":446 + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS # <<<<<<<<<<<<<< + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + */ + __pyx_v_self->ECAFE_NOWTACCESS = ECAFE_NOWTACCESS; + + /* "PyCafeDefs.pxi":447 + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT # <<<<<<<<<<<<<< + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + */ + __pyx_v_self->ECAFE_TIMEOUT = ECAFE_TIMEOUT; + + /* "PyCafeDefs.pxi":448 + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + */ + __pyx_v_self->ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE; + + /* "PyCafeDefs.pxi":449 + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE # <<<<<<<<<<<<<< + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + */ + __pyx_v_self->ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE; + + /* "PyCafeDefs.pxi":450 + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + */ + __pyx_v_self->ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF; + + /* "PyCafeDefs.pxi":451 + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID # <<<<<<<<<<<<<< + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + */ + __pyx_v_self->ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID; + + /* "PyCafeDefs.pxi":452 + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS # <<<<<<<<<<<<<< + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + */ + __pyx_v_self->ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS; + + /* "PyCafeDefs.pxi":453 + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND # <<<<<<<<<<<<<< + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + */ + __pyx_v_self->ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND; + + /* "PyCafeDefs.pxi":454 + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS # <<<<<<<<<<<<<< + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + */ + __pyx_v_self->ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS; + + /* "PyCafeDefs.pxi":455 + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + */ + __pyx_v_self->ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT; + + /* "PyCafeDefs.pxi":456 + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE # <<<<<<<<<<<<<< + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + */ + __pyx_v_self->ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE; + + /* "PyCafeDefs.pxi":457 + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + */ + __pyx_v_self->ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + + /* "PyCafeDefs.pxi":458 + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX # <<<<<<<<<<<<<< + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + */ + __pyx_v_self->ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX; + + /* "PyCafeDefs.pxi":459 + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH # <<<<<<<<<<<<<< + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + */ + __pyx_v_self->ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + + /* "PyCafeDefs.pxi":460 + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH # <<<<<<<<<<<<<< + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + */ + __pyx_v_self->ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":461 + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH # <<<<<<<<<<<<<< + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + */ + __pyx_v_self->ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":462 + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED # <<<<<<<<<<<<<< + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + */ + __pyx_v_self->ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED; + + /* "PyCafeDefs.pxi":464 + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + */ + __pyx_v_self->ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID; + + /* "PyCafeDefs.pxi":465 + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + */ + __pyx_v_self->ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS; + + /* "PyCafeDefs.pxi":466 + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + */ + __pyx_v_self->ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM; + + /* "PyCafeDefs.pxi":467 + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + * + */ + __pyx_v_self->ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM; + + /* "PyCafeDefs.pxi":468 + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT # <<<<<<<<<<<<<< + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + */ + __pyx_v_self->ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT; + + /* "PyCafeDefs.pxi":470 + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + */ + __pyx_v_self->ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA; + + /* "PyCafeDefs.pxi":471 + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + */ + __pyx_v_self->ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER; + + /* "PyCafeDefs.pxi":472 + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + * + */ + __pyx_v_self->ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER; + + /* "PyCafeDefs.pxi":473 + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL # <<<<<<<<<<<<<< + * + * self.ERRNO_EINTR = ERRNO_EINTR + */ + __pyx_v_self->ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL; + + /* "PyCafeDefs.pxi":475 + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + * + * self.ERRNO_EINTR = ERRNO_EINTR # <<<<<<<<<<<<<< + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT + */ + __pyx_v_self->ERRNO_EINTR = ERRNO_EINTR; + + /* "PyCafeDefs.pxi":476 + * + * self.ERRNO_EINTR = ERRNO_EINTR + * self.ERRNO_EAGAIN = ERRNO_EAGAIN # <<<<<<<<<<<<<< + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL + */ + __pyx_v_self->ERRNO_EAGAIN = ERRNO_EAGAIN; + + /* "PyCafeDefs.pxi":477 + * self.ERRNO_EINTR = ERRNO_EINTR + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT # <<<<<<<<<<<<<< + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + */ + __pyx_v_self->ERRNO_EFAULT = ERRNO_EFAULT; + + /* "PyCafeDefs.pxi":478 + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL # <<<<<<<<<<<<<< + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + */ + __pyx_v_self->ERRNO_EINVAL = ERRNO_EINVAL; + + /* "PyCafeDefs.pxi":479 + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK # <<<<<<<<<<<<<< + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + * + */ + __pyx_v_self->ERRNO_ENOTSOCK = ERRNO_ENOTSOCK; + + /* "PyCafeDefs.pxi":480 + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT # <<<<<<<<<<<<<< + * + * self.SEV_NO_ALARM = SEV_NO_ALARM + */ + __pyx_v_self->ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT; + + /* "PyCafeDefs.pxi":482 + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + * + * self.SEV_NO_ALARM = SEV_NO_ALARM # <<<<<<<<<<<<<< + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR + */ + __pyx_v_self->SEV_NO_ALARM = SEV_NO_ALARM; + + /* "PyCafeDefs.pxi":483 + * + * self.SEV_NO_ALARM = SEV_NO_ALARM + * self.SEV_MINOR = SEV_MINOR # <<<<<<<<<<<<<< + * self.SEV_MAJOR = SEV_MAJOR + * self.SEV_INVALID = SEV_INVALID + */ + __pyx_v_self->SEV_MINOR = SEV_MINOR; + + /* "PyCafeDefs.pxi":484 + * self.SEV_NO_ALARM = SEV_NO_ALARM + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR # <<<<<<<<<<<<<< + * self.SEV_INVALID = SEV_INVALID + * + */ + __pyx_v_self->SEV_MAJOR = SEV_MAJOR; + + /* "PyCafeDefs.pxi":485 + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR + * self.SEV_INVALID = SEV_INVALID # <<<<<<<<<<<<<< + * + * self.STAT_NO_ALARM = STAT_NO_ALARM + */ + __pyx_v_self->SEV_INVALID = SEV_INVALID; + + /* "PyCafeDefs.pxi":487 + * self.SEV_INVALID = SEV_INVALID + * + * self.STAT_NO_ALARM = STAT_NO_ALARM # <<<<<<<<<<<<<< + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE + */ + __pyx_v_self->STAT_NO_ALARM = STAT_NO_ALARM; + + /* "PyCafeDefs.pxi":488 + * + * self.STAT_NO_ALARM = STAT_NO_ALARM + * self.STAT_READ = STAT_READ # <<<<<<<<<<<<<< + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI + */ + __pyx_v_self->STAT_READ = STAT_READ; + + /* "PyCafeDefs.pxi":489 + * self.STAT_NO_ALARM = STAT_NO_ALARM + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE # <<<<<<<<<<<<<< + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH + */ + __pyx_v_self->STAT_WRITE = STAT_WRITE; + + /* "PyCafeDefs.pxi":490 + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI # <<<<<<<<<<<<<< + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO + */ + __pyx_v_self->STAT_HIHI = STAT_HIHI; + + /* "PyCafeDefs.pxi":491 + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH # <<<<<<<<<<<<<< + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW + */ + __pyx_v_self->STAT_HIGH = STAT_HIGH; + + /* "PyCafeDefs.pxi":492 + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO # <<<<<<<<<<<<<< + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE + */ + __pyx_v_self->STAT_LOLO = STAT_LOLO; + + /* "PyCafeDefs.pxi":493 + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW # <<<<<<<<<<<<<< + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS + */ + __pyx_v_self->STAT_LOW = STAT_LOW; + + /* "PyCafeDefs.pxi":494 + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE # <<<<<<<<<<<<<< + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM + */ + __pyx_v_self->STAT_STATE = STAT_STATE; + + /* "PyCafeDefs.pxi":495 + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS # <<<<<<<<<<<<<< + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT + */ + __pyx_v_self->STAT_COS = STAT_COS; + + /* "PyCafeDefs.pxi":496 + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM # <<<<<<<<<<<<<< + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT + */ + __pyx_v_self->STAT_COMM = STAT_COMM; + + /* "PyCafeDefs.pxi":497 + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT # <<<<<<<<<<<<<< + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC + */ + __pyx_v_self->STAT_TIMEOUT = STAT_TIMEOUT; + + /* "PyCafeDefs.pxi":498 + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT # <<<<<<<<<<<<<< + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN + */ + __pyx_v_self->STAT_HWLIMIT = STAT_HWLIMIT; + + /* "PyCafeDefs.pxi":499 + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC # <<<<<<<<<<<<<< + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK + */ + __pyx_v_self->STAT_CALC = STAT_CALC; + + /* "PyCafeDefs.pxi":500 + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN # <<<<<<<<<<<<<< + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT + */ + __pyx_v_self->STAT_SCAN = STAT_SCAN; + + /* "PyCafeDefs.pxi":501 + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK # <<<<<<<<<<<<<< + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB + */ + __pyx_v_self->STAT_LINK = STAT_LINK; + + /* "PyCafeDefs.pxi":502 + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT # <<<<<<<<<<<<<< + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF + */ + __pyx_v_self->STAT_SOFT = STAT_SOFT; + + /* "PyCafeDefs.pxi":503 + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB # <<<<<<<<<<<<<< + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE + */ + __pyx_v_self->STAT_BAD_SUB = STAT_BAD_SUB; + + /* "PyCafeDefs.pxi":504 + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF # <<<<<<<<<<<<<< + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM + */ + __pyx_v_self->STAT_UDF = STAT_UDF; + + /* "PyCafeDefs.pxi":505 + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE # <<<<<<<<<<<<<< + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + */ + __pyx_v_self->STAT_DISABLE = STAT_DISABLE; + + /* "PyCafeDefs.pxi":506 + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM # <<<<<<<<<<<<<< + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + */ + __pyx_v_self->STAT_SIMM = STAT_SIMM; + + /* "PyCafeDefs.pxi":507 + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS # <<<<<<<<<<<<<< + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + * + */ + __pyx_v_self->STAT_READ_ACCESS = STAT_READ_ACCESS; + + /* "PyCafeDefs.pxi":508 + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS # <<<<<<<<<<<<<< + * + * self.CY_DBE_VALUE = DBE_VALUE + */ + __pyx_v_self->STAT_WRITE_ACCESS = STAT_WRITE_ACCESS; + + /* "PyCafeDefs.pxi":510 + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + * + * self.CY_DBE_VALUE = DBE_VALUE # <<<<<<<<<<<<<< + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + */ + __pyx_v_self->CY_DBE_VALUE = DBE_VALUE; + + /* "PyCafeDefs.pxi":511 + * + * self.CY_DBE_VALUE = DBE_VALUE + * self.CY_DBE_LOG = DBE_LOG # <<<<<<<<<<<<<< + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM + */ + __pyx_v_self->CY_DBE_LOG = DBE_LOG; + + /* "PyCafeDefs.pxi":512 + * self.CY_DBE_VALUE = DBE_VALUE + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE # <<<<<<<<<<<<<< + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY + */ + __pyx_v_self->CY_DBE_ARCHIVE = DBE_ARCHIVE; + + /* "PyCafeDefs.pxi":513 + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM # <<<<<<<<<<<<<< + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + */ + __pyx_v_self->CY_DBE_ALARM = DBE_ALARM; + + /* "PyCafeDefs.pxi":514 + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY # <<<<<<<<<<<<<< + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN + */ + __pyx_v_self->CY_DBE_PROPERTY = DBE_PROPERTY; + + /* "PyCafeDefs.pxi":515 + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE # <<<<<<<<<<<<<< + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS + */ + __pyx_v_self->CY_DBR_PRIMITIVE = DBR_PRIMITIVE; + + /* "PyCafeDefs.pxi":516 + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN # <<<<<<<<<<<<<< + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME + */ + __pyx_v_self->CY_DBR_PLAIN = DBR_PLAIN; + + /* "PyCafeDefs.pxi":517 + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS # <<<<<<<<<<<<<< + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR + */ + __pyx_v_self->CY_DBR_STS = DBR_STS; + + /* "PyCafeDefs.pxi":518 + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME # <<<<<<<<<<<<<< + * self.CY_DBR_GR = DBR_GR + * self.CY_DBR_CTRL = DBR_CTRL + */ + __pyx_v_self->CY_DBR_TIME = DBR_TIME; + + /* "PyCafeDefs.pxi":519 + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR # <<<<<<<<<<<<<< + * self.CY_DBR_CTRL = DBR_CTRL + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + */ + __pyx_v_self->CY_DBR_GR = DBR_GR; + + /* "PyCafeDefs.pxi":520 + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR + * self.CY_DBR_CTRL = DBR_CTRL # <<<<<<<<<<<<<< + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT + */ + __pyx_v_self->CY_DBR_CTRL = DBR_CTRL; + + /* "PyCafeDefs.pxi":522 + * self.CY_DBR_CTRL = DBR_CTRL + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT # <<<<<<<<<<<<<< + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + */ + __pyx_v_self->CY_DBR_PUT = DBR_PUT; + + /* "PyCafeDefs.pxi":523 + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING # <<<<<<<<<<<<<< + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE + */ + __pyx_v_self->CY_DBR_STSACK = DBR_STSACK; + + /* "PyCafeDefs.pxi":524 + * self.CY_DBR_PUT = DBR_PUT + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, # <<<<<<<<<<<<<< + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING + */ + __pyx_v_self->CY_DBR_CLASS = DBR_CLASS; + + /* "PyCafeDefs.pxi":525 + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE # <<<<<<<<<<<<<< + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + */ + __pyx_v_self->CY_DBR_NONE = DBR_NONE; + + /* "PyCafeDefs.pxi":526 + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING # <<<<<<<<<<<<<< + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + */ + __pyx_v_self->CY_DBR_STRING = DBR_STRING; + + /* "PyCafeDefs.pxi":527 + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short # <<<<<<<<<<<<<< + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + */ + __pyx_v_self->CY_DBR_SHORT = DBR_SHORT; + + /* "PyCafeDefs.pxi":528 + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short # <<<<<<<<<<<<<< + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + */ + __pyx_v_self->CY_DBR_INT = DBR_INT; + + /* "PyCafeDefs.pxi":529 + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value # <<<<<<<<<<<<<< + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + */ + __pyx_v_self->CY_DBR_FLOAT = DBR_FLOAT; + + /* "PyCafeDefs.pxi":530 + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item # <<<<<<<<<<<<<< + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + */ + __pyx_v_self->CY_DBR_ENUM = DBR_ENUM; + + /* "PyCafeDefs.pxi":531 + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char # <<<<<<<<<<<<<< + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + */ + __pyx_v_self->CY_DBR_CHAR = DBR_CHAR; + + /* "PyCafeDefs.pxi":532 + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long # <<<<<<<<<<<<<< + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + * # returns a string status structure (dbr_sts_string) + */ + __pyx_v_self->CY_DBR_LONG = DBR_LONG; + + /* "PyCafeDefs.pxi":533 + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number # <<<<<<<<<<<<<< + * # returns a string status structure (dbr_sts_string) + * self.CY_DBR_STS_STRING = DBR_STS_STRING + */ + __pyx_v_self->CY_DBR_DOUBLE = DBR_DOUBLE; + + /* "PyCafeDefs.pxi":535 + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + * # returns a string status structure (dbr_sts_string) + * self.CY_DBR_STS_STRING = DBR_STS_STRING # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_short) + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT + */ + __pyx_v_self->CY_DBR_STS_STRING = DBR_STS_STRING; + + /* "PyCafeDefs.pxi":537 + * self.CY_DBR_STS_STRING = DBR_STS_STRING + * # returns a short status structure (dbr_sts_short) + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_int) + * self.CY_DBR_STS_INT = DBR_STS_INT + */ + __pyx_v_self->CY_DBR_STS_SHORT = DBR_STS_SHORT; + + /* "PyCafeDefs.pxi":539 + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT + * # returns a short status structure (dbr_sts_int) + * self.CY_DBR_STS_INT = DBR_STS_INT # <<<<<<<<<<<<<< + * # returns a float status structure (dbr_sts_float) + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + */ + __pyx_v_self->CY_DBR_STS_INT = DBR_STS_INT; + + /* "PyCafeDefs.pxi":541 + * self.CY_DBR_STS_INT = DBR_STS_INT + * # returns a float status structure (dbr_sts_float) + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT # <<<<<<<<<<<<<< + * # returns an enum status structure (dbr_sts_enum) + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM + */ + __pyx_v_self->CY_DBR_STS_FLOAT = DBR_STS_FLOAT; + + /* "PyCafeDefs.pxi":543 + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + * # returns an enum status structure (dbr_sts_enum) + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM # <<<<<<<<<<<<<< + * # returns a char status structure (dbr_sts_char) + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR + */ + __pyx_v_self->CY_DBR_STS_ENUM = DBR_STS_ENUM; + + /* "PyCafeDefs.pxi":545 + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM + * # returns a char status structure (dbr_sts_char) + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR # <<<<<<<<<<<<<< + * # returns a long status structure (dbr_sts_long) + * self.CY_DBR_STS_LONG = DBR_STS_LONG + */ + __pyx_v_self->CY_DBR_STS_CHAR = DBR_STS_CHAR; + + /* "PyCafeDefs.pxi":547 + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR + * # returns a long status structure (dbr_sts_long) + * self.CY_DBR_STS_LONG = DBR_STS_LONG # <<<<<<<<<<<<<< + * # returns a double status structure (dbr_sts_double) + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + */ + __pyx_v_self->CY_DBR_STS_LONG = DBR_STS_LONG; + + /* "PyCafeDefs.pxi":549 + * self.CY_DBR_STS_LONG = DBR_STS_LONG + * # returns a double status structure (dbr_sts_double) + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE # <<<<<<<<<<<<<< + * # returns a string time structure (dbr_time_string) + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING + */ + __pyx_v_self->CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE; + + /* "PyCafeDefs.pxi":551 + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + * # returns a string time structure (dbr_time_string) + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + */ + __pyx_v_self->CY_DBR_TIME_STRING = DBR_TIME_STRING; + + /* "PyCafeDefs.pxi":553 + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_INT = DBR_TIME_INT + */ + __pyx_v_self->CY_DBR_TIME_SHORT = DBR_TIME_SHORT; + + /* "PyCafeDefs.pxi":555 + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_INT = DBR_TIME_INT # <<<<<<<<<<<<<< + * # returns a float time structure (dbr_time_float) + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + */ + __pyx_v_self->CY_DBR_TIME_INT = DBR_TIME_INT; + + /* "PyCafeDefs.pxi":557 + * self.CY_DBR_TIME_INT = DBR_TIME_INT + * # returns a float time structure (dbr_time_float) + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT # <<<<<<<<<<<<<< + * # returns an enum time structure (dbr_time_enum) + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + */ + __pyx_v_self->CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT; + + /* "PyCafeDefs.pxi":559 + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + * # returns an enum time structure (dbr_time_enum) + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM # <<<<<<<<<<<<<< + * # returns a char time structure (dbr_time_char) + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + */ + __pyx_v_self->CY_DBR_TIME_ENUM = DBR_TIME_ENUM; + + /* "PyCafeDefs.pxi":561 + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + * # returns a char time structure (dbr_time_char) + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR # <<<<<<<<<<<<<< + * # returns a long time structure (dbr_time_long) + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG + */ + __pyx_v_self->CY_DBR_TIME_CHAR = DBR_TIME_CHAR; + + /* "PyCafeDefs.pxi":563 + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + * # returns a long time structure (dbr_time_long) + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG # <<<<<<<<<<<<<< + * # returns a double time structure (dbr_time_double) + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + */ + __pyx_v_self->CY_DBR_TIME_LONG = DBR_TIME_LONG; + + /* "PyCafeDefs.pxi":565 + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG + * # returns a double time structure (dbr_time_double) + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE # <<<<<<<<<<<<<< + * # returns a graphic string structure (dbr_gr_string) + * self.CY_DBR_GR_STRING = DBR_GR_STRING + */ + __pyx_v_self->CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE; + + /* "PyCafeDefs.pxi":567 + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + * # returns a graphic string structure (dbr_gr_string) + * self.CY_DBR_GR_STRING = DBR_GR_STRING # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_short) + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT + */ + __pyx_v_self->CY_DBR_GR_STRING = DBR_GR_STRING; + + /* "PyCafeDefs.pxi":569 + * self.CY_DBR_GR_STRING = DBR_GR_STRING + * # returns a graphic short structure (dbr_gr_short) + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_int) + * self.CY_DBR_GR_INT = DBR_GR_INT + */ + __pyx_v_self->CY_DBR_GR_SHORT = DBR_GR_SHORT; + + /* "PyCafeDefs.pxi":571 + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT + * # returns a graphic short structure (dbr_gr_int) + * self.CY_DBR_GR_INT = DBR_GR_INT # <<<<<<<<<<<<<< + * # returns a graphic float structure (dbr_gr_float) + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + */ + __pyx_v_self->CY_DBR_GR_INT = DBR_GR_INT; + + /* "PyCafeDefs.pxi":573 + * self.CY_DBR_GR_INT = DBR_GR_INT + * # returns a graphic float structure (dbr_gr_float) + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT # <<<<<<<<<<<<<< + * # returns a graphic enum structure (dbr_gr_enum) + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM + */ + __pyx_v_self->CY_DBR_GR_FLOAT = DBR_GR_FLOAT; + + /* "PyCafeDefs.pxi":575 + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + * # returns a graphic enum structure (dbr_gr_enum) + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM # <<<<<<<<<<<<<< + * # returns a graphic char structure (dbr_gr_char) + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR + */ + __pyx_v_self->CY_DBR_GR_ENUM = DBR_GR_ENUM; + + /* "PyCafeDefs.pxi":577 + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM + * # returns a graphic char structure (dbr_gr_char) + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR # <<<<<<<<<<<<<< + * # returns a graphic long structure (dbr_gr_long) + * self.CY_DBR_GR_LONG = DBR_GR_LONG + */ + __pyx_v_self->CY_DBR_GR_CHAR = DBR_GR_CHAR; + + /* "PyCafeDefs.pxi":579 + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR + * # returns a graphic long structure (dbr_gr_long) + * self.CY_DBR_GR_LONG = DBR_GR_LONG # <<<<<<<<<<<<<< + * # returns a graphic double structure (dbr_gr_double) + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + */ + __pyx_v_self->CY_DBR_GR_LONG = DBR_GR_LONG; + + /* "PyCafeDefs.pxi":581 + * self.CY_DBR_GR_LONG = DBR_GR_LONG + * # returns a graphic double structure (dbr_gr_double) + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE # <<<<<<<<<<<<<< + * # returns a control string structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + */ + __pyx_v_self->CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE; + + /* "PyCafeDefs.pxi":583 + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + * # returns a control string structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_short) + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + */ + __pyx_v_self->CY_DBR_CTRL_STRING = DBR_CTRL_STRING; + + /* "PyCafeDefs.pxi":585 + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + * # returns a control short structure (dbr_ctrl_short) + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT + */ + __pyx_v_self->CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT; + + /* "PyCafeDefs.pxi":587 + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + * # returns a control short structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT # <<<<<<<<<<<<<< + * # returns a control float structure (dbr_ctrl_float) + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + */ + __pyx_v_self->CY_DBR_CTRL_INT = DBR_CTRL_INT; + + /* "PyCafeDefs.pxi":589 + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT + * # returns a control float structure (dbr_ctrl_float) + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT # <<<<<<<<<<<<<< + * # returns a control enum structure (dbr_ctrl_enum) + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + */ + __pyx_v_self->CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT; + + /* "PyCafeDefs.pxi":591 + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + * # returns a control enum structure (dbr_ctrl_enum) + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM # <<<<<<<<<<<<<< + * # returns a control char structure (dbr_ctrl_char) + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + */ + __pyx_v_self->CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM; + + /* "PyCafeDefs.pxi":593 + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + * # returns a control char structure (dbr_ctrl_char) + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR # <<<<<<<<<<<<<< + * # returns a control long structure (dbr_ctrl_long) + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + */ + __pyx_v_self->CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR; + + /* "PyCafeDefs.pxi":595 + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + * # returns a control long structure (dbr_ctrl_long) + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG # <<<<<<<<<<<<<< + * # returns a control double structure (dbr_ctrl_double) + * self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE + */ + __pyx_v_self->CY_DBR_CTRL_LONG = DBR_CTRL_LONG; + + /* "PyCafeDefs.pxi":597 + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + * # returns a control double structure (dbr_ctrl_double) + * self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE # <<<<<<<<<<<<<< + * + * # ctypedef enum ChannelRequestPolicyKind: + */ + __pyx_v_self->CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE; + + /* "PyCafeDefs.pxi":600 + * + * # ctypedef enum ChannelRequestPolicyKind: + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK # <<<<<<<<<<<<<< + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_v_self->WITHOUT_CALLBACK = WITHOUT_CALLBACK; + + /* "PyCafeDefs.pxi":601 + * # ctypedef enum ChannelRequestPolicyKind: + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT # <<<<<<<<<<<<<< + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + * + */ + __pyx_v_self->WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT; + + /* "PyCafeDefs.pxi":602 + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * # ChannelFlushSendBufferPolicyKind: + */ + __pyx_v_self->WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED; + + /* "PyCafeDefs.pxi":605 + * + * # ChannelFlushSendBufferPolicyKind: + * self.WITH_FLUSH_IO = WITH_FLUSH_IO # <<<<<<<<<<<<<< + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + */ + __pyx_v_self->WITH_FLUSH_IO = WITH_FLUSH_IO; + + /* "PyCafeDefs.pxi":606 + * # ChannelFlushSendBufferPolicyKind: + * self.WITH_FLUSH_IO = WITH_FLUSH_IO + * self.WITH_PEND_IO = WITH_PEND_IO # <<<<<<<<<<<<<< + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + * self.WITH_POLL = WITH_POLL + */ + __pyx_v_self->WITH_PEND_IO = WITH_PEND_IO; + + /* "PyCafeDefs.pxi":607 + * self.WITH_FLUSH_IO = WITH_FLUSH_IO + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT # <<<<<<<<<<<<<< + * self.WITH_POLL = WITH_POLL + * + */ + __pyx_v_self->WITH_PEND_EVENT = WITH_PEND_EVENT; + + /* "PyCafeDefs.pxi":608 + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + * self.WITH_POLL = WITH_POLL # <<<<<<<<<<<<<< + * + * # ChannelWhenToFlushSendBufferPolicyKind: + */ + __pyx_v_self->WITH_POLL = WITH_POLL; + + /* "PyCafeDefs.pxi":611 + * + * # ChannelWhenToFlushSendBufferPolicyKind: + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC # <<<<<<<<<<<<<< + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + */ + __pyx_v_self->FLUSH_AUTOMATIC = FLUSH_AUTOMATIC; + + /* "PyCafeDefs.pxi":612 + * # ChannelWhenToFlushSendBufferPolicyKind: + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + * self.FLUSH_NOW = FLUSH_NOW # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + */ + __pyx_v_self->FLUSH_NOW = FLUSH_NOW; + + /* "PyCafeDefs.pxi":613 + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + */ + __pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION; + + /* "PyCafeDefs.pxi":614 + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + */ + __pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION; + + /* "PyCafeDefs.pxi":615 + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + */ + __pyx_v_self->FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE; + + /* "PyCafeDefs.pxi":616 + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION # <<<<<<<<<<<<<< + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + * + */ + __pyx_v_self->FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION; + + /* "PyCafeDefs.pxi":617 + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT # <<<<<<<<<<<<<< + * + * # ChannelGetCacheWaitPolicyKind: + */ + __pyx_v_self->FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT; + + /* "PyCafeDefs.pxi":620 + * + * # ChannelGetCacheWaitPolicyKind: + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK # <<<<<<<<<<<<<< + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW + */ + __pyx_v_self->GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK; + + /* "PyCafeDefs.pxi":621 + * # ChannelGetCacheWaitPolicyKind: + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT # <<<<<<<<<<<<<< + * self.GET_CACHE_NOW = GET_CACHE_NOW + * self.GET_CACHE_WAIT = GET_CACHE_WAIT + */ + __pyx_v_self->GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT; + + /* "PyCafeDefs.pxi":622 + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW # <<<<<<<<<<<<<< + * self.GET_CACHE_WAIT = GET_CACHE_WAIT + * + */ + __pyx_v_self->GET_CACHE_NOW = GET_CACHE_NOW; + + /* "PyCafeDefs.pxi":623 + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW + * self.GET_CACHE_WAIT = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * # ChannelGetActionWhenMonitorPolicyKind: + */ + __pyx_v_self->GET_CACHE_WAIT = GET_CACHE_WAIT; + + /* "PyCafeDefs.pxi":626 + * + * # ChannelGetActionWhenMonitorPolicyKind: + * self.GET_FROM_CACHE = GET_FROM_CACHE # <<<<<<<<<<<<<< + * self.GET_FROM_IOC = GET_FROM_IOC + * + */ + __pyx_v_self->GET_FROM_CACHE = GET_FROM_CACHE; + + /* "PyCafeDefs.pxi":627 + * # ChannelGetActionWhenMonitorPolicyKind: + * self.GET_FROM_CACHE = GET_FROM_CACHE + * self.GET_FROM_IOC = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * # ChannelRequestDataTypePolicyKind: + */ + __pyx_v_self->GET_FROM_IOC = GET_FROM_IOC; + + /* "PyCafeDefs.pxi":630 + * + * # ChannelRequestDataTypePolicyKind: + * self.NATIVE_DATATYPE = NATIVE_DATATYPE # <<<<<<<<<<<<<< + * # The smaller in byte size of type requested and native datatype + * self.LOWEST_DATATYPE = LOWEST_DATATYPE + */ + __pyx_v_self->NATIVE_DATATYPE = NATIVE_DATATYPE; + + /* "PyCafeDefs.pxi":632 + * self.NATIVE_DATATYPE = NATIVE_DATATYPE + * # The smaller in byte size of type requested and native datatype + * self.LOWEST_DATATYPE = LOWEST_DATATYPE # <<<<<<<<<<<<<< + * + * # ChannelWaitForResponsePolicyKind: + */ + __pyx_v_self->LOWEST_DATATYPE = LOWEST_DATATYPE; + + /* "PyCafeDefs.pxi":635 + * + * # ChannelWaitForResponsePolicyKind: + * self.BLOCKING = BLOCKING # <<<<<<<<<<<<<< + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING + */ + __pyx_v_self->BLOCKING = BLOCKING; + + /* "PyCafeDefs.pxi":636 + * # ChannelWaitForResponsePolicyKind: + * self.BLOCKING = BLOCKING + * self.WAIT = WAIT # <<<<<<<<<<<<<< + * self.NON_BLOCKING = NON_BLOCKING + * self.NO_WAIT = NO_WAIT + */ + __pyx_v_self->WAIT = WAIT; + + /* "PyCafeDefs.pxi":637 + * self.BLOCKING = BLOCKING + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING # <<<<<<<<<<<<<< + * self.NO_WAIT = NO_WAIT + * + */ + __pyx_v_self->NON_BLOCKING = NON_BLOCKING; + + /* "PyCafeDefs.pxi":638 + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING + * self.NO_WAIT = NO_WAIT # <<<<<<<<<<<<<< + * + * # StatusMessageKind: + */ + __pyx_v_self->NO_WAIT = NO_WAIT; + + /* "PyCafeDefs.pxi":641 + * + * # StatusMessageKind: + * self.NO_MESSAGE = NO_MESSAGE # <<<<<<<<<<<<<< + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST + */ + __pyx_v_self->NO_MESSAGE = NO_MESSAGE; + + /* "PyCafeDefs.pxi":642 + * # StatusMessageKind: + * self.NO_MESSAGE = NO_MESSAGE + * self.PRE_REQUEST = PRE_REQUEST # <<<<<<<<<<<<<< + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND + */ + __pyx_v_self->PRE_REQUEST = PRE_REQUEST; + + /* "PyCafeDefs.pxi":643 + * self.NO_MESSAGE = NO_MESSAGE + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST # <<<<<<<<<<<<<< + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK + */ + __pyx_v_self->FROM_REQUEST = FROM_REQUEST; + + /* "PyCafeDefs.pxi":644 + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND # <<<<<<<<<<<<<< + * self.FROM_CALLBACK = FROM_CALLBACK + * self.FROM_MESSAGE = FROM_MESSAGE + */ + __pyx_v_self->FROM_PEND = FROM_PEND; + + /* "PyCafeDefs.pxi":645 + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK # <<<<<<<<<<<<<< + * self.FROM_MESSAGE = FROM_MESSAGE + * + */ + __pyx_v_self->FROM_CALLBACK = FROM_CALLBACK; + + /* "PyCafeDefs.pxi":646 + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK + * self.FROM_MESSAGE = FROM_MESSAGE # <<<<<<<<<<<<<< + * + * # CallbackProgressKind: + */ + __pyx_v_self->FROM_MESSAGE = FROM_MESSAGE; + + /* "PyCafeDefs.pxi":649 + * + * # CallbackProgressKind: + * self.NOT_INITIATED = NOT_INITIATED # <<<<<<<<<<<<<< + * self.PENDING = PENDING + * self.COMPLETE = COMPLETE + */ + __pyx_v_self->NOT_INITIATED = NOT_INITIATED; + + /* "PyCafeDefs.pxi":650 + * # CallbackProgressKind: + * self.NOT_INITIATED = NOT_INITIATED + * self.PENDING = PENDING # <<<<<<<<<<<<<< + * self.COMPLETE = COMPLETE + * + */ + __pyx_v_self->PENDING = PENDING; + + /* "PyCafeDefs.pxi":651 + * self.NOT_INITIATED = NOT_INITIATED + * self.PENDING = PENDING + * self.COMPLETE = COMPLETE # <<<<<<<<<<<<<< + * + * # deines.h: + */ + __pyx_v_self->COMPLETE = COMPLETE; + + /* "PyCafeDefs.pxi":654 + * + * # deines.h: + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + */ + __pyx_v_self->DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT; + + /* "PyCafeDefs.pxi":655 + * # deines.h: + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + */ + __pyx_v_self->DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO; + + /* "PyCafeDefs.pxi":656 + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING # <<<<<<<<<<<<<< + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + */ + __pyx_v_self->INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING; + + /* "PyCafeDefs.pxi":657 + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE # <<<<<<<<<<<<<< + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS + */ + __pyx_v_self->INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE; + + /* "PyCafeDefs.pxi":658 + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK # <<<<<<<<<<<<<< + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS + * + */ + __pyx_v_self->BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK; + + /* "PyCafeDefs.pxi":659 + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS; + + /* "PyCafeDefs.pxi":351 + * cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":37 + * + * cdef class CyCa: + * cpdef readonly unsigned int CY_DBE_VALUE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBE_LOG + * cpdef readonly unsigned int CY_DBE_ARCHIVE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":38 + * cdef class CyCa: + * cpdef readonly unsigned int CY_DBE_VALUE + * cpdef readonly unsigned int CY_DBE_LOG # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBE_ARCHIVE + * cpdef readonly unsigned int CY_DBE_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_LOG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":39 + * cpdef readonly unsigned int CY_DBE_VALUE + * cpdef readonly unsigned int CY_DBE_LOG + * cpdef readonly unsigned int CY_DBE_ARCHIVE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBE_ALARM + * cpdef readonly unsigned int CY_DBE_PROPERTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_ARCHIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_ARCHIVE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":40 + * cpdef readonly unsigned int CY_DBE_LOG + * cpdef readonly unsigned int CY_DBE_ARCHIVE + * cpdef readonly unsigned int CY_DBE_ALARM # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBE_PROPERTY + * cpdef readonly unsigned int CY_DBR_PRIMITIVE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":41 + * cpdef readonly unsigned int CY_DBE_ARCHIVE + * cpdef readonly unsigned int CY_DBE_ALARM + * cpdef readonly unsigned int CY_DBE_PROPERTY # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_PRIMITIVE + * cpdef readonly unsigned int CY_DBR_PLAIN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_PROPERTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":42 + * cpdef readonly unsigned int CY_DBE_ALARM + * cpdef readonly unsigned int CY_DBE_PROPERTY + * cpdef readonly unsigned int CY_DBR_PRIMITIVE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_PLAIN + * cpdef readonly unsigned int CY_DBR_STS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PRIMITIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PRIMITIVE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":43 + * cpdef readonly unsigned int CY_DBE_PROPERTY + * cpdef readonly unsigned int CY_DBR_PRIMITIVE + * cpdef readonly unsigned int CY_DBR_PLAIN # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_STS + * cpdef readonly unsigned int CY_DBR_TIME + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PLAIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PLAIN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":44 + * cpdef readonly unsigned int CY_DBR_PRIMITIVE + * cpdef readonly unsigned int CY_DBR_PLAIN + * cpdef readonly unsigned int CY_DBR_STS # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_TIME + * cpdef readonly unsigned int CY_DBR_GR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":45 + * cpdef readonly unsigned int CY_DBR_PLAIN + * cpdef readonly unsigned int CY_DBR_STS + * cpdef readonly unsigned int CY_DBR_TIME # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_GR + * cpdef readonly unsigned int CY_DBR_CTRL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":46 + * cpdef readonly unsigned int CY_DBR_STS + * cpdef readonly unsigned int CY_DBR_TIME + * cpdef readonly unsigned int CY_DBR_GR # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_CTRL + * cpdef readonly unsigned int CY_DBR_PUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":47 + * cpdef readonly unsigned int CY_DBR_TIME + * cpdef readonly unsigned int CY_DBR_GR + * cpdef readonly unsigned int CY_DBR_CTRL # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_PUT + * cpdef readonly unsigned int CY_DBR_STSACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":48 + * cpdef readonly unsigned int CY_DBR_GR + * cpdef readonly unsigned int CY_DBR_CTRL + * cpdef readonly unsigned int CY_DBR_PUT # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_STSACK + * cpdef readonly unsigned int CY_DBR_CLASS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":49 + * cpdef readonly unsigned int CY_DBR_CTRL + * cpdef readonly unsigned int CY_DBR_PUT + * cpdef readonly unsigned int CY_DBR_STSACK # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_CLASS + * cpdef readonly unsigned int CY_DBR_NONE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STSACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STSACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":50 + * cpdef readonly unsigned int CY_DBR_PUT + * cpdef readonly unsigned int CY_DBR_STSACK + * cpdef readonly unsigned int CY_DBR_CLASS # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_NONE + * cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CLASS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CLASS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":51 + * cpdef readonly unsigned int CY_DBR_STSACK + * cpdef readonly unsigned int CY_DBR_CLASS + * cpdef readonly unsigned int CY_DBR_NONE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_NONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_NONE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":52 + * cpdef readonly unsigned int CY_DBR_CLASS + * cpdef readonly unsigned int CY_DBR_NONE + * cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + * cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":53 + * cpdef readonly unsigned int CY_DBR_NONE + * cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short + * # returns an IEEE floating point value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":54 + * cpdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cpdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + * cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short # <<<<<<<<<<<<<< + * # returns an IEEE floating point value + * cpdef readonly unsigned int CY_DBR_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":56 + * cpdef readonly unsigned int CY_DBR_INT # returns an unsigned short + * # returns an IEEE floating point value + * cpdef readonly unsigned int CY_DBR_FLOAT # <<<<<<<<<<<<<< + * # returns an unsigned short which is the enum item + * cpdef readonly unsigned int CY_DBR_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":58 + * cpdef readonly unsigned int CY_DBR_FLOAT + * # returns an unsigned short which is the enum item + * cpdef readonly unsigned int CY_DBR_ENUM # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + * cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":59 + * # returns an unsigned short which is the enum item + * cpdef readonly unsigned int CY_DBR_ENUM + * cpdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char # <<<<<<<<<<<<<< + * cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + * # returns a double precision floating point number + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":60 + * cpdef readonly unsigned int CY_DBR_ENUM + * cpdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + * cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long # <<<<<<<<<<<<<< + * # returns a double precision floating point number + * cpdef readonly unsigned int CY_DBR_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":62 + * cpdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + * # returns a double precision floating point number + * cpdef readonly unsigned int CY_DBR_DOUBLE # <<<<<<<<<<<<<< + * # returns a string status structure (dbr_sts_string) + * cpdef readonly unsigned int CY_DBR_STS_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":64 + * cpdef readonly unsigned int CY_DBR_DOUBLE + * # returns a string status structure (dbr_sts_string) + * cpdef readonly unsigned int CY_DBR_STS_STRING # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_short) + * cpdef readonly unsigned int CY_DBR_STS_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":66 + * cpdef readonly unsigned int CY_DBR_STS_STRING + * # returns a short status structure (dbr_sts_short) + * cpdef readonly unsigned int CY_DBR_STS_SHORT # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_int) + * cpdef readonly unsigned int CY_DBR_STS_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":68 + * cpdef readonly unsigned int CY_DBR_STS_SHORT + * # returns a short status structure (dbr_sts_int) + * cpdef readonly unsigned int CY_DBR_STS_INT # <<<<<<<<<<<<<< + * # returns a float status structure (dbr_sts_float) + * cpdef readonly unsigned int CY_DBR_STS_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":70 + * cpdef readonly unsigned int CY_DBR_STS_INT + * # returns a float status structure (dbr_sts_float) + * cpdef readonly unsigned int CY_DBR_STS_FLOAT # <<<<<<<<<<<<<< + * # returns an enum status structure (dbr_sts_enum) + * cpdef readonly unsigned int CY_DBR_STS_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":72 + * cpdef readonly unsigned int CY_DBR_STS_FLOAT + * # returns an enum status structure (dbr_sts_enum) + * cpdef readonly unsigned int CY_DBR_STS_ENUM # <<<<<<<<<<<<<< + * # returns a char status structure (dbr_sts_char) + * cpdef readonly unsigned int CY_DBR_STS_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":74 + * cpdef readonly unsigned int CY_DBR_STS_ENUM + * # returns a char status structure (dbr_sts_char) + * cpdef readonly unsigned int CY_DBR_STS_CHAR # <<<<<<<<<<<<<< + * # returns a long status structure (dbr_sts_long) + * cpdef readonly unsigned int CY_DBR_STS_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":76 + * cpdef readonly unsigned int CY_DBR_STS_CHAR + * # returns a long status structure (dbr_sts_long) + * cpdef readonly unsigned int CY_DBR_STS_LONG # <<<<<<<<<<<<<< + * # returns a double status structure (dbr_sts_double) + * cpdef readonly unsigned int CY_DBR_STS_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":78 + * cpdef readonly unsigned int CY_DBR_STS_LONG + * # returns a double status structure (dbr_sts_double) + * cpdef readonly unsigned int CY_DBR_STS_DOUBLE # <<<<<<<<<<<<<< + * # returns a string time structure (dbr_time_string) + * cpdef readonly unsigned int CY_DBR_TIME_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":80 + * cpdef readonly unsigned int CY_DBR_STS_DOUBLE + * # returns a string time structure (dbr_time_string) + * cpdef readonly unsigned int CY_DBR_TIME_STRING # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * cpdef readonly unsigned int CY_DBR_TIME_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":82 + * cpdef readonly unsigned int CY_DBR_TIME_STRING + * # returns a short time structure (dbr_time_short) + * cpdef readonly unsigned int CY_DBR_TIME_SHORT # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * cpdef readonly unsigned int CY_DBR_TIME_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":84 + * cpdef readonly unsigned int CY_DBR_TIME_SHORT + * # returns a short time structure (dbr_time_short) + * cpdef readonly unsigned int CY_DBR_TIME_INT # <<<<<<<<<<<<<< + * # returns a float time structure (dbr_time_float) + * cpdef readonly unsigned int CY_DBR_TIME_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":86 + * cpdef readonly unsigned int CY_DBR_TIME_INT + * # returns a float time structure (dbr_time_float) + * cpdef readonly unsigned int CY_DBR_TIME_FLOAT # <<<<<<<<<<<<<< + * # returns an enum time structure (dbr_time_enum) + * cpdef readonly unsigned int CY_DBR_TIME_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":88 + * cpdef readonly unsigned int CY_DBR_TIME_FLOAT + * # returns an enum time structure (dbr_time_enum) + * cpdef readonly unsigned int CY_DBR_TIME_ENUM # <<<<<<<<<<<<<< + * # returns a char time structure (dbr_time_char) + * cpdef readonly unsigned int CY_DBR_TIME_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":90 + * cpdef readonly unsigned int CY_DBR_TIME_ENUM + * # returns a char time structure (dbr_time_char) + * cpdef readonly unsigned int CY_DBR_TIME_CHAR # <<<<<<<<<<<<<< + * # returns a long time structure (dbr_time_long) + * cpdef readonly unsigned int CY_DBR_TIME_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":92 + * cpdef readonly unsigned int CY_DBR_TIME_CHAR + * # returns a long time structure (dbr_time_long) + * cpdef readonly unsigned int CY_DBR_TIME_LONG # <<<<<<<<<<<<<< + * # returns a double time structure (dbr_time_double) + * cpdef readonly unsigned int CY_DBR_TIME_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":94 + * cpdef readonly unsigned int CY_DBR_TIME_LONG + * # returns a double time structure (dbr_time_double) + * cpdef readonly unsigned int CY_DBR_TIME_DOUBLE # <<<<<<<<<<<<<< + * # returns a graphic string structure (dbr_gr_string) + * cpdef readonly unsigned int CY_DBR_GR_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":96 + * cpdef readonly unsigned int CY_DBR_TIME_DOUBLE + * # returns a graphic string structure (dbr_gr_string) + * cpdef readonly unsigned int CY_DBR_GR_STRING # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_short) + * cpdef readonly unsigned int CY_DBR_GR_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":98 + * cpdef readonly unsigned int CY_DBR_GR_STRING + * # returns a graphic short structure (dbr_gr_short) + * cpdef readonly unsigned int CY_DBR_GR_SHORT # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_int) + * cpdef readonly unsigned int CY_DBR_GR_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":100 + * cpdef readonly unsigned int CY_DBR_GR_SHORT + * # returns a graphic short structure (dbr_gr_int) + * cpdef readonly unsigned int CY_DBR_GR_INT # <<<<<<<<<<<<<< + * # returns a graphic float structure (dbr_gr_float) + * cpdef readonly unsigned int CY_DBR_GR_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":102 + * cpdef readonly unsigned int CY_DBR_GR_INT + * # returns a graphic float structure (dbr_gr_float) + * cpdef readonly unsigned int CY_DBR_GR_FLOAT # <<<<<<<<<<<<<< + * # returns a graphic enum structure (dbr_gr_enum) + * cpdef readonly unsigned int CY_DBR_GR_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":104 + * cpdef readonly unsigned int CY_DBR_GR_FLOAT + * # returns a graphic enum structure (dbr_gr_enum) + * cpdef readonly unsigned int CY_DBR_GR_ENUM # <<<<<<<<<<<<<< + * # returns a graphic char structure (dbr_gr_char) + * cpdef readonly unsigned int CY_DBR_GR_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":106 + * cpdef readonly unsigned int CY_DBR_GR_ENUM + * # returns a graphic char structure (dbr_gr_char) + * cpdef readonly unsigned int CY_DBR_GR_CHAR # <<<<<<<<<<<<<< + * # returns a graphic long structure (dbr_gr_long) + * cpdef readonly unsigned int CY_DBR_GR_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":108 + * cpdef readonly unsigned int CY_DBR_GR_CHAR + * # returns a graphic long structure (dbr_gr_long) + * cpdef readonly unsigned int CY_DBR_GR_LONG # <<<<<<<<<<<<<< + * # returns a graphic double structure (dbr_gr_double) + * cpdef readonly unsigned int CY_DBR_GR_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":110 + * cpdef readonly unsigned int CY_DBR_GR_LONG + * # returns a graphic double structure (dbr_gr_double) + * cpdef readonly unsigned int CY_DBR_GR_DOUBLE # <<<<<<<<<<<<<< + * # returns a control string structure (dbr_ctrl_int) + * cpdef readonly unsigned int CY_DBR_CTRL_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":112 + * cpdef readonly unsigned int CY_DBR_GR_DOUBLE + * # returns a control string structure (dbr_ctrl_int) + * cpdef readonly unsigned int CY_DBR_CTRL_STRING # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_short) + * cpdef readonly unsigned int CY_DBR_CTRL_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":114 + * cpdef readonly unsigned int CY_DBR_CTRL_STRING + * # returns a control short structure (dbr_ctrl_short) + * cpdef readonly unsigned int CY_DBR_CTRL_SHORT # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_int) + * cpdef readonly unsigned int CY_DBR_CTRL_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":116 + * cpdef readonly unsigned int CY_DBR_CTRL_SHORT + * # returns a control short structure (dbr_ctrl_int) + * cpdef readonly unsigned int CY_DBR_CTRL_INT # <<<<<<<<<<<<<< + * # returns a control float structure (dbr_ctrl_float) + * cpdef readonly unsigned int CY_DBR_CTRL_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":118 + * cpdef readonly unsigned int CY_DBR_CTRL_INT + * # returns a control float structure (dbr_ctrl_float) + * cpdef readonly unsigned int CY_DBR_CTRL_FLOAT # <<<<<<<<<<<<<< + * # returns a control enum structure (dbr_ctrl_enum) + * cpdef readonly unsigned int CY_DBR_CTRL_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":120 + * cpdef readonly unsigned int CY_DBR_CTRL_FLOAT + * # returns a control enum structure (dbr_ctrl_enum) + * cpdef readonly unsigned int CY_DBR_CTRL_ENUM # <<<<<<<<<<<<<< + * # returns a control char structure (dbr_ctrl_char) + * cpdef readonly unsigned int CY_DBR_CTRL_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":122 + * cpdef readonly unsigned int CY_DBR_CTRL_ENUM + * # returns a control char structure (dbr_ctrl_char) + * cpdef readonly unsigned int CY_DBR_CTRL_CHAR # <<<<<<<<<<<<<< + * # returns a control long structure (dbr_ctrl_long) + * cpdef readonly unsigned int CY_DBR_CTRL_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":124 + * cpdef readonly unsigned int CY_DBR_CTRL_CHAR + * # returns a control long structure (dbr_ctrl_long) + * cpdef readonly unsigned int CY_DBR_CTRL_LONG # <<<<<<<<<<<<<< + * # returns a control double structure (dbr_ctrl_double) + * cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":126 + * cpdef readonly unsigned int CY_DBR_CTRL_LONG + * # returns a control double structure (dbr_ctrl_double) + * cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE # <<<<<<<<<<<<<< + * + * # cpdef readonly int CY_ECA_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":130 + * # cpdef readonly int CY_ECA_TIMEOUT + * + * cpdef readonly int CY_ECA_NORMAL # 1 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_ALLOCMEM # 48 + * cpdef readonly int CY_ECA_TOLARGE # 72 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NORMAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":131 + * + * cpdef readonly int CY_ECA_NORMAL # 1 + * cpdef readonly int CY_ECA_ALLOCMEM # 48 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_TOLARGE # 72 + * cpdef readonly int CY_ECA_TIMEOUT # 80 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":132 + * cpdef readonly int CY_ECA_NORMAL # 1 + * cpdef readonly int CY_ECA_ALLOCMEM # 48 + * cpdef readonly int CY_ECA_TOLARGE # 72 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_TIMEOUT # 80 + * cpdef readonly int CY_ECA_BADTYPE # 114 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_TOLARGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_TOLARGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":133 + * cpdef readonly int CY_ECA_ALLOCMEM # 48 + * cpdef readonly int CY_ECA_TOLARGE # 72 + * cpdef readonly int CY_ECA_TIMEOUT # 80 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADTYPE # 114 + * cpdef readonly int CY_ECA_INTERNAL # 142 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":134 + * cpdef readonly int CY_ECA_TOLARGE # 72 + * cpdef readonly int CY_ECA_TIMEOUT # 80 + * cpdef readonly int CY_ECA_BADTYPE # 114 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_INTERNAL # 142 + * cpdef readonly int CY_ECA_GETFAIL # 152 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADTYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":135 + * cpdef readonly int CY_ECA_TIMEOUT # 80 + * cpdef readonly int CY_ECA_BADTYPE # 114 + * cpdef readonly int CY_ECA_INTERNAL # 142 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_GETFAIL # 152 + * cpdef readonly int CY_ECA_PUTFAIL # 160 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_INTERNAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_INTERNAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":136 + * cpdef readonly int CY_ECA_BADTYPE # 114 + * cpdef readonly int CY_ECA_INTERNAL # 142 + * cpdef readonly int CY_ECA_GETFAIL # 152 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_PUTFAIL # 160 + * cpdef readonly int CY_ECA_BADCOUNT # 176 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_GETFAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_GETFAIL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":137 + * cpdef readonly int CY_ECA_INTERNAL # 142 + * cpdef readonly int CY_ECA_GETFAIL # 152 + * cpdef readonly int CY_ECA_PUTFAIL # 160 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADCOUNT # 176 + * cpdef readonly int CY_ECA_BADSTR # 186 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_PUTFAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_PUTFAIL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":138 + * cpdef readonly int CY_ECA_GETFAIL # 152 + * cpdef readonly int CY_ECA_PUTFAIL # 160 + * cpdef readonly int CY_ECA_BADCOUNT # 176 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADSTR # 186 + * cpdef readonly int CY_ECA_DISCONN # 192 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":139 + * cpdef readonly int CY_ECA_PUTFAIL # 160 + * cpdef readonly int CY_ECA_BADCOUNT # 176 + * cpdef readonly int CY_ECA_BADSTR # 186 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_DISCONN # 192 + * cpdef readonly int CY_ECA_DBLCHNL # 200 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADSTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADSTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":140 + * cpdef readonly int CY_ECA_BADCOUNT # 176 + * cpdef readonly int CY_ECA_BADSTR # 186 + * cpdef readonly int CY_ECA_DISCONN # 192 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_DBLCHNL # 200 + * cpdef readonly int CY_ECA_EVDISALLOW # 210 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_DISCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_DISCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":141 + * cpdef readonly int CY_ECA_BADSTR # 186 + * cpdef readonly int CY_ECA_DISCONN # 192 + * cpdef readonly int CY_ECA_DBLCHNL # 200 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_EVDISALLOW # 210 + * cpdef readonly int CY_ECA_BADMONID # 242 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_DBLCHNL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_DBLCHNL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":142 + * cpdef readonly int CY_ECA_DISCONN # 192 + * cpdef readonly int CY_ECA_DBLCHNL # 200 + * cpdef readonly int CY_ECA_EVDISALLOW # 210 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADMONID # 242 + * cpdef readonly int CY_ECA_BADMASK # 330 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_EVDISALLOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_EVDISALLOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":143 + * cpdef readonly int CY_ECA_DBLCHNL # 200 + * cpdef readonly int CY_ECA_EVDISALLOW # 210 + * cpdef readonly int CY_ECA_BADMONID # 242 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADMASK # 330 + * cpdef readonly int CY_ECA_IODONE # 339 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADMONID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADMONID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":144 + * cpdef readonly int CY_ECA_EVDISALLOW # 210 + * cpdef readonly int CY_ECA_BADMONID # 242 + * cpdef readonly int CY_ECA_BADMASK # 330 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_IODONE # 339 + * cpdef readonly int CY_ECA_IOINPROGRESS # 347 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADMASK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADMASK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":145 + * cpdef readonly int CY_ECA_BADMONID # 242 + * cpdef readonly int CY_ECA_BADMASK # 330 + * cpdef readonly int CY_ECA_IODONE # 339 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_IOINPROGRESS # 347 + * cpdef readonly int CY_ECA_BADSYNCGRP # 354 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_IODONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_IODONE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":146 + * cpdef readonly int CY_ECA_BADMASK # 330 + * cpdef readonly int CY_ECA_IODONE # 339 + * cpdef readonly int CY_ECA_IOINPROGRESS # 347 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADSYNCGRP # 354 + * cpdef readonly int CY_ECA_PUTCBINPROG # 362 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_IOINPROGRESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_IOINPROGRESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":147 + * cpdef readonly int CY_ECA_IODONE # 339 + * cpdef readonly int CY_ECA_IOINPROGRESS # 347 + * cpdef readonly int CY_ECA_BADSYNCGRP # 354 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_PUTCBINPROG # 362 + * cpdef readonly int CY_ECA_NORDACCESS # 368 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADSYNCGRP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADSYNCGRP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":148 + * cpdef readonly int CY_ECA_IOINPROGRESS # 347 + * cpdef readonly int CY_ECA_BADSYNCGRP # 354 + * cpdef readonly int CY_ECA_PUTCBINPROG # 362 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_NORDACCESS # 368 + * cpdef readonly int CY_ECA_NOWTACCESS # 376 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_PUTCBINPROG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_PUTCBINPROG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":149 + * cpdef readonly int CY_ECA_BADSYNCGRP # 354 + * cpdef readonly int CY_ECA_PUTCBINPROG # 362 + * cpdef readonly int CY_ECA_NORDACCESS # 368 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_NOWTACCESS # 376 + * cpdef readonly int CY_ECA_ANACHRONISM # 386 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NORDACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NORDACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":150 + * cpdef readonly int CY_ECA_PUTCBINPROG # 362 + * cpdef readonly int CY_ECA_NORDACCESS # 368 + * cpdef readonly int CY_ECA_NOWTACCESS # 376 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_ANACHRONISM # 386 + * cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOWTACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOWTACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":151 + * cpdef readonly int CY_ECA_NORDACCESS # 368 + * cpdef readonly int CY_ECA_NOWTACCESS # 376 + * cpdef readonly int CY_ECA_ANACHRONISM # 386 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cpdef readonly int CY_ECA_NOCONVERT # 400 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ANACHRONISM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ANACHRONISM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":152 + * cpdef readonly int CY_ECA_NOWTACCESS # 376 + * cpdef readonly int CY_ECA_ANACHRONISM # 386 + * cpdef readonly int CY_ECA_NOSEARCHADDR # 392 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_NOCONVERT # 400 + * cpdef readonly int CY_ECA_BADCHID # 410 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOSEARCHADDR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOSEARCHADDR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":153 + * cpdef readonly int CY_ECA_ANACHRONISM # 386 + * cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cpdef readonly int CY_ECA_NOCONVERT # 400 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADCHID # 410 + * cpdef readonly int CY_ECA_BADFUNCPTR # 418 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOCONVERT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOCONVERT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":154 + * cpdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cpdef readonly int CY_ECA_NOCONVERT # 400 + * cpdef readonly int CY_ECA_BADCHID # 410 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADFUNCPTR # 418 + * cpdef readonly int CY_ECA_ISATTACHED # 424 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADCHID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADCHID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":155 + * cpdef readonly int CY_ECA_NOCONVERT # 400 + * cpdef readonly int CY_ECA_BADCHID # 410 + * cpdef readonly int CY_ECA_BADFUNCPTR # 418 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_ISATTACHED # 424 + * cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADFUNCPTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADFUNCPTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":156 + * cpdef readonly int CY_ECA_BADCHID # 410 + * cpdef readonly int CY_ECA_BADFUNCPTR # 418 + * cpdef readonly int CY_ECA_ISATTACHED # 424 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cpdef readonly int CY_ECA_CHANDESTROY # 440 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ISATTACHED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ISATTACHED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":157 + * cpdef readonly int CY_ECA_BADFUNCPTR # 418 + * cpdef readonly int CY_ECA_ISATTACHED # 424 + * cpdef readonly int CY_ECA_UNAVAILINSERV # 432 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_CHANDESTROY # 440 + * cpdef readonly int CY_ECA_BADPRIORITY # 450 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_UNAVAILINSERV); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_UNAVAILINSERV.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":158 + * cpdef readonly int CY_ECA_ISATTACHED # 424 + * cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cpdef readonly int CY_ECA_CHANDESTROY # 440 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_BADPRIORITY # 450 + * cpdef readonly int CY_ECA_NOTTHREADED # 458 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_CHANDESTROY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_CHANDESTROY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":159 + * cpdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cpdef readonly int CY_ECA_CHANDESTROY # 440 + * cpdef readonly int CY_ECA_BADPRIORITY # 450 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_NOTTHREADED # 458 + * cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADPRIORITY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADPRIORITY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":160 + * cpdef readonly int CY_ECA_CHANDESTROY # 440 + * cpdef readonly int CY_ECA_BADPRIORITY # 450 + * cpdef readonly int CY_ECA_NOTTHREADED # 458 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cpdef readonly int CY_ECA_CONNSEQTMO # 472 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOTTHREADED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOTTHREADED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":161 + * cpdef readonly int CY_ECA_BADPRIORITY # 450 + * cpdef readonly int CY_ECA_NOTTHREADED # 458 + * cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_CONNSEQTMO # 472 + * cpdef readonly int CY_ECA_UNRESPTMO # 480 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_16KARRAYCLIENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_16KARRAYCLIENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":162 + * cpdef readonly int CY_ECA_NOTTHREADED # 458 + * cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cpdef readonly int CY_ECA_CONNSEQTMO # 472 # <<<<<<<<<<<<<< + * cpdef readonly int CY_ECA_UNRESPTMO # 480 + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_CONNSEQTMO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_CONNSEQTMO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":163 + * cpdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cpdef readonly int CY_ECA_CONNSEQTMO # 472 + * cpdef readonly int CY_ECA_UNRESPTMO # 480 # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_CS_NEVER_CONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_UNRESPTMO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_UNRESPTMO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":165 + * cpdef readonly int CY_ECA_UNRESPTMO # 480 + * + * cpdef readonly int ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CS_PREV_CONN + * cpdef readonly int ICAFE_CS_CONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_NEVER_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_NEVER_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":166 + * + * cpdef readonly int ICAFE_CS_NEVER_CONN + * cpdef readonly int ICAFE_CS_PREV_CONN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CS_CONN + * cpdef readonly int ICAFE_CS_CLOSED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_PREV_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_PREV_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":167 + * cpdef readonly int ICAFE_CS_NEVER_CONN + * cpdef readonly int ICAFE_CS_PREV_CONN + * cpdef readonly int ICAFE_CS_CONN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CS_CLOSED + * cpdef readonly int ICAFE_CS_DISCONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":168 + * cpdef readonly int ICAFE_CS_PREV_CONN + * cpdef readonly int ICAFE_CS_CONN + * cpdef readonly int ICAFE_CS_CLOSED # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CS_DISCONN + * cpdef readonly int ICAFE_CS_UNKNOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_CLOSED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_CLOSED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":169 + * cpdef readonly int ICAFE_CS_CONN + * cpdef readonly int ICAFE_CS_CLOSED + * cpdef readonly int ICAFE_CS_DISCONN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CS_UNKNOWN + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_DISCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_DISCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":170 + * cpdef readonly int ICAFE_CS_CLOSED + * cpdef readonly int ICAFE_CS_DISCONN + * cpdef readonly int ICAFE_CS_UNKNOWN # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_TYPENOTCONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_UNKNOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_UNKNOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":172 + * cpdef readonly int ICAFE_CS_UNKNOWN + * + * cpdef readonly int ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_RULE_FALSE + * cpdef readonly int ICAFE_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_TYPENOTCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":173 + * + * cpdef readonly int ICAFE_TYPENOTCONN + * cpdef readonly int ICAFE_RULE_FALSE # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_BADCOUNT + * cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_RULE_FALSE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_RULE_FALSE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":174 + * cpdef readonly int ICAFE_TYPENOTCONN + * cpdef readonly int ICAFE_RULE_FALSE + * cpdef readonly int ICAFE_BADCOUNT # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":175 + * cpdef readonly int ICAFE_RULE_FALSE + * cpdef readonly int ICAFE_BADCOUNT + * cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cpdef readonly int ICAFE_CACHE_EMPTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CALLBACK_NOT_YET_INVOKED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CALLBACK_NOT_YET_INVOKED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":176 + * cpdef readonly int ICAFE_BADCOUNT + * cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CACHE_EMPTY + * cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_WAITING_FOR_PREV_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_WAITING_FOR_PREV_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":177 + * cpdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cpdef readonly int ICAFE_CACHE_EMPTY # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CACHE_EMPTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CACHE_EMPTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":178 + * cpdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cpdef readonly int ICAFE_CACHE_EMPTY + * cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":179 + * cpdef readonly int ICAFE_CACHE_EMPTY + * cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * cpdef readonly int ICAFE_SET_AND_GET_MISMATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_MONITOR_DELAYED_AS_CONN_DOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":180 + * cpdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_SET_AND_GET_MISMATCH + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":181 + * cpdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * cpdef readonly int ICAFE_SET_AND_GET_MISMATCH # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_CA_OP_GET + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_SET_AND_GET_MISMATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_SET_AND_GET_MISMATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":183 + * cpdef readonly int ICAFE_SET_AND_GET_MISMATCH + * + * cpdef readonly int ICAFE_CA_OP_GET # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_PUT + * cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_GET); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_GET.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":184 + * + * cpdef readonly int ICAFE_CA_OP_GET + * cpdef readonly int ICAFE_CA_OP_PUT # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cpdef readonly int ICAFE_CA_OP_ADD_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_PUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_PUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":185 + * cpdef readonly int ICAFE_CA_OP_GET + * cpdef readonly int ICAFE_CA_OP_PUT + * cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_ADD_EVENT + * cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CREATE_CHANNEL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CREATE_CHANNEL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":186 + * cpdef readonly int ICAFE_CA_OP_PUT + * cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cpdef readonly int ICAFE_CA_OP_ADD_EVENT # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cpdef readonly int ICAFE_CA_OP_OTHER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_ADD_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_ADD_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":187 + * cpdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cpdef readonly int ICAFE_CA_OP_ADD_EVENT + * cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_OTHER + * cpdef readonly int ICAFE_CA_OP_CONN_DOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CLEAR_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CLEAR_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":188 + * cpdef readonly int ICAFE_CA_OP_ADD_EVENT + * cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cpdef readonly int ICAFE_CA_OP_OTHER # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_CONN_DOWN + * cpdef readonly int ICAFE_CA_OP_CONN_UP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_OTHER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_OTHER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":189 + * cpdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cpdef readonly int ICAFE_CA_OP_OTHER + * cpdef readonly int ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_CA_OP_CONN_UP + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CONN_DOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CONN_DOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":190 + * cpdef readonly int ICAFE_CA_OP_OTHER + * cpdef readonly int ICAFE_CA_OP_CONN_DOWN + * cpdef readonly int ICAFE_CA_OP_CONN_UP # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_DAQ_RUN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CONN_UP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CONN_UP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":192 + * cpdef readonly int ICAFE_CA_OP_CONN_UP + * + * cpdef readonly int ICAFE_DAQ_RUN # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_DAQ_PAUSED + * cpdef readonly int ICAFE_DAQ_STOPPED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_RUN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_RUN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":193 + * + * cpdef readonly int ICAFE_DAQ_RUN + * cpdef readonly int ICAFE_DAQ_PAUSED # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_DAQ_STOPPED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_PAUSED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_PAUSED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":194 + * cpdef readonly int ICAFE_DAQ_RUN + * cpdef readonly int ICAFE_DAQ_PAUSED + * cpdef readonly int ICAFE_DAQ_STOPPED # <<<<<<<<<<<<<< + * + * cpdef readonly int ECAFE_LOAD_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_STOPPED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_STOPPED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":196 + * cpdef readonly int ICAFE_DAQ_STOPPED + * + * cpdef readonly int ECAFE_LOAD_COLLECTION # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_LOAD_GROUP + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_LOAD_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_LOAD_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":197 + * + * cpdef readonly int ECAFE_LOAD_COLLECTION + * cpdef readonly int ECAFE_LOAD_GROUP # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_NORMAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_LOAD_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_LOAD_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":199 + * cpdef readonly int ECAFE_LOAD_GROUP + * + * cpdef readonly int ICAFE_NORMAL # <<<<<<<<<<<<<< + * cpdef readonly int ICAFE_SUCCESS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_NORMAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":200 + * + * cpdef readonly int ICAFE_NORMAL + * cpdef readonly int ICAFE_SUCCESS # <<<<<<<<<<<<<< + * + * cpdef readonly int ECAFE_NODATA + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_SUCCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_SUCCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":202 + * cpdef readonly int ICAFE_SUCCESS + * + * cpdef readonly int ECAFE_NODATA # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_TYPE + * cpdef readonly int ECAFE_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NODATA); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NODATA.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":203 + * + * cpdef readonly int ECAFE_NODATA + * cpdef readonly int ECAFE_INVALID_TYPE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BADCOUNT + * cpdef readonly int ECAFE_BADSTR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_TYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":204 + * cpdef readonly int ECAFE_NODATA + * cpdef readonly int ECAFE_INVALID_TYPE + * cpdef readonly int ECAFE_BADCOUNT # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BADSTR + * cpdef readonly int ECAFE_BADTYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":205 + * cpdef readonly int ECAFE_INVALID_TYPE + * cpdef readonly int ECAFE_BADCOUNT + * cpdef readonly int ECAFE_BADSTR # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BADTYPE + * cpdef readonly int ECAFE_NO_CONVERT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADSTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADSTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":206 + * cpdef readonly int ECAFE_BADCOUNT + * cpdef readonly int ECAFE_BADSTR + * cpdef readonly int ECAFE_BADTYPE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NO_CONVERT + * cpdef readonly int ECAFE_NULLCONTEXT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADTYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":207 + * cpdef readonly int ECAFE_BADSTR + * cpdef readonly int ECAFE_BADTYPE + * cpdef readonly int ECAFE_NO_CONVERT # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NULLCONTEXT + * cpdef readonly int ECAFE_NULLCHID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NO_CONVERT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NO_CONVERT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":208 + * cpdef readonly int ECAFE_BADTYPE + * cpdef readonly int ECAFE_NO_CONVERT + * cpdef readonly int ECAFE_NULLCONTEXT # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NULLCHID + * cpdef readonly int ECAFE_NULLEVID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLCONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLCONTEXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":209 + * cpdef readonly int ECAFE_NO_CONVERT + * cpdef readonly int ECAFE_NULLCONTEXT + * cpdef readonly int ECAFE_NULLCHID # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NULLEVID + * cpdef readonly int ECAFE_UNKNOWN_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLCHID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLCHID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":210 + * cpdef readonly int ECAFE_NULLCONTEXT + * cpdef readonly int ECAFE_NULLCHID + * cpdef readonly int ECAFE_NULLEVID # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_UNKNOWN_COLLECTION + * cpdef readonly int ECAFE_EMPTY_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLEVID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLEVID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":211 + * cpdef readonly int ECAFE_NULLCHID + * cpdef readonly int ECAFE_NULLEVID + * cpdef readonly int ECAFE_UNKNOWN_COLLECTION # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_EMPTY_COLLECTION + * cpdef readonly int ECAFE_COLLECTION_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_UNKNOWN_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_UNKNOWN_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":212 + * cpdef readonly int ECAFE_NULLEVID + * cpdef readonly int ECAFE_UNKNOWN_COLLECTION + * cpdef readonly int ECAFE_EMPTY_COLLECTION # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_COLLECTION_PREV_DEF + * cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_EMPTY_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_EMPTY_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":213 + * cpdef readonly int ECAFE_UNKNOWN_COLLECTION + * cpdef readonly int ECAFE_EMPTY_COLLECTION + * cpdef readonly int ECAFE_COLLECTION_PREV_DEF # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cpdef readonly int ECAFE_RULE_FALSE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_COLLECTION_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_COLLECTION_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":214 + * cpdef readonly int ECAFE_EMPTY_COLLECTION + * cpdef readonly int ECAFE_COLLECTION_PREV_DEF + * cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_RULE_FALSE + * cpdef readonly int ECAFE_UNKNOWN_GROUP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_COLLECTION_INVALID_MEMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_COLLECTION_INVALID_MEMBER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":215 + * cpdef readonly int ECAFE_COLLECTION_PREV_DEF + * cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cpdef readonly int ECAFE_RULE_FALSE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_UNKNOWN_GROUP + * cpdef readonly int ECAFE_EMPTY_GROUP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_RULE_FALSE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_RULE_FALSE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":216 + * cpdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cpdef readonly int ECAFE_RULE_FALSE + * cpdef readonly int ECAFE_UNKNOWN_GROUP # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_EMPTY_GROUP + * cpdef readonly int ECAFE_GROUP_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_UNKNOWN_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_UNKNOWN_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":217 + * cpdef readonly int ECAFE_RULE_FALSE + * cpdef readonly int ECAFE_UNKNOWN_GROUP + * cpdef readonly int ECAFE_EMPTY_GROUP # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_GROUP_PREV_DEF + * cpdef readonly int ECAFE_INVALID_HANDLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_EMPTY_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_EMPTY_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":218 + * cpdef readonly int ECAFE_UNKNOWN_GROUP + * cpdef readonly int ECAFE_EMPTY_GROUP + * cpdef readonly int ECAFE_GROUP_PREV_DEF # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_HANDLE + * cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_GROUP_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_GROUP_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":219 + * cpdef readonly int ECAFE_EMPTY_GROUP + * cpdef readonly int ECAFE_GROUP_PREV_DEF + * cpdef readonly int ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cpdef readonly int ECAFE_NORDACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_HANDLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":220 + * cpdef readonly int ECAFE_GROUP_PREV_DEF + * cpdef readonly int ECAFE_INVALID_HANDLE + * cpdef readonly int ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NORDACCESS + * cpdef readonly int ECAFE_NOWTACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_GROUP_HANDLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_GROUP_HANDLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":221 + * cpdef readonly int ECAFE_INVALID_HANDLE + * cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cpdef readonly int ECAFE_NORDACCESS # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_NOWTACCESS + * cpdef readonly int ECAFE_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NORDACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NORDACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":222 + * cpdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cpdef readonly int ECAFE_NORDACCESS + * cpdef readonly int ECAFE_NOWTACCESS # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_TIMEOUT + * cpdef readonly int ECAFE_CANNOT_OPEN_FILE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NOWTACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NOWTACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":223 + * cpdef readonly int ECAFE_NORDACCESS + * cpdef readonly int ECAFE_NOWTACCESS + * cpdef readonly int ECAFE_TIMEOUT # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_CANNOT_OPEN_FILE + * cpdef readonly int ECAFE_INVALID_SWITCH_CASE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":224 + * cpdef readonly int ECAFE_NOWTACCESS + * cpdef readonly int ECAFE_TIMEOUT + * cpdef readonly int ECAFE_CANNOT_OPEN_FILE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_SWITCH_CASE + * cpdef readonly int ECAFE_PVALIAS_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_CANNOT_OPEN_FILE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_CANNOT_OPEN_FILE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":225 + * cpdef readonly int ECAFE_TIMEOUT + * cpdef readonly int ECAFE_CANNOT_OPEN_FILE + * cpdef readonly int ECAFE_INVALID_SWITCH_CASE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_PVALIAS_PREV_DEF + * cpdef readonly int ECAFE_PVALIAS_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_SWITCH_CASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_SWITCH_CASE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":226 + * cpdef readonly int ECAFE_CANNOT_OPEN_FILE + * cpdef readonly int ECAFE_INVALID_SWITCH_CASE + * cpdef readonly int ECAFE_PVALIAS_PREV_DEF # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_PVALIAS_INVALID + * cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVALIAS_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVALIAS_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":227 + * cpdef readonly int ECAFE_INVALID_SWITCH_CASE + * cpdef readonly int ECAFE_PVALIAS_PREV_DEF + * cpdef readonly int ECAFE_PVALIAS_INVALID # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVALIAS_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVALIAS_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":228 + * cpdef readonly int ECAFE_PVALIAS_PREV_DEF + * cpdef readonly int ECAFE_PVALIAS_INVALID + * cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVNAME_PREV_DEF_AS_PVALIAS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":229 + * cpdef readonly int ECAFE_PVALIAS_INVALID + * cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cpdef readonly int ECAFE_WRONG_CA_CONTEXT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_DEVICE_ATTRIB_NOT_FOUND); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_DEVICE_ATTRIB_NOT_FOUND.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":230 + * cpdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_WRONG_CA_CONTEXT + * cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_HASH_UNIQUEID_EXISTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_HASH_UNIQUEID_EXISTS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":231 + * cpdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cpdef readonly int ECAFE_WRONG_CA_CONTEXT # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_WRONG_CA_CONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_WRONG_CA_CONTEXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":232 + * cpdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cpdef readonly int ECAFE_WRONG_CA_CONTEXT + * cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cpdef readonly int ECAFE_INVALID_ENUM_INDEX + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_CAFENUM_POLICY_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_CAFENUM_POLICY_TYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":233 + * cpdef readonly int ECAFE_WRONG_CA_CONTEXT + * cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INVALID_ENUM_INDEX + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":234 + * cpdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cpdef readonly int ECAFE_INVALID_ENUM_INDEX # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_ENUM_INDEX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_ENUM_INDEX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":235 + * cpdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cpdef readonly int ECAFE_INVALID_ENUM_INDEX + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVGROUP_GROUPHANDLE_MISMATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":236 + * cpdef readonly int ECAFE_INVALID_ENUM_INDEX + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_TIMEOUT_SET_AND_MATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_TIMEOUT_SET_AND_MATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":237 + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_HANDLE_MISMATCH_SET_AND_MATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":238 + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED # <<<<<<<<<<<<<< + * + * cpdef readonly int ECAFE_BPM_DATA_IS_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INCONSISTENT_CONTAINER_CORRECTED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INCONSISTENT_CONTAINER_CORRECTED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":240 + * cpdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + * cpdef readonly int ECAFE_BPM_DATA_IS_INVALID # <<<<<<<<<<<<<< + * + * cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BPM_DATA_IS_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BPM_DATA_IS_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":242 + * cpdef readonly int ECAFE_BPM_DATA_IS_INVALID + * + * cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_DECOMPRESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_DECOMPRESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":243 + * + * cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS + * cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM + * cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_ALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_ALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":244 + * cpdef readonly int ECAFE_BITSHUFF_DECOMPRESS + * cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_REALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_REALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":245 + * cpdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cpdef readonly int ECAFE_BITSHUFF_REALLOCMEM + * cpdef readonly int ECAFE_BITSHUFF_BADCOUNT # <<<<<<<<<<<<<< + * + * cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":247 + * cpdef readonly int ECAFE_BITSHUFF_BADCOUNT + * + * cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_MULTIPART_MESS_NODATA); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_MULTIPART_MESS_NODATA.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":248 + * + * cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_PARSEFAIL_MAINHEADER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_PARSEFAIL_MAINHEADER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":249 + * cpdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER # <<<<<<<<<<<<<< + * cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_PARSEFAIL_DATAHEADER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_PARSEFAIL_DATAHEADER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":250 + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cpdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL # <<<<<<<<<<<<<< + * + * cpdef readonly int ERRNO_EINTR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_ZMQSTREAM_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_ZMQSTREAM_NULL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":252 + * cpdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + * + * cpdef readonly int ERRNO_EINTR # <<<<<<<<<<<<<< + * cpdef readonly int ERRNO_EAGAIN + * cpdef readonly int ERRNO_EFAULT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EINTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EINTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":253 + * + * cpdef readonly int ERRNO_EINTR + * cpdef readonly int ERRNO_EAGAIN # <<<<<<<<<<<<<< + * cpdef readonly int ERRNO_EFAULT + * cpdef readonly int ERRNO_EINVAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EAGAIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EAGAIN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":254 + * cpdef readonly int ERRNO_EINTR + * cpdef readonly int ERRNO_EAGAIN + * cpdef readonly int ERRNO_EFAULT # <<<<<<<<<<<<<< + * cpdef readonly int ERRNO_EINVAL + * cpdef readonly int ERRNO_ENOTSOCK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EFAULT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":255 + * cpdef readonly int ERRNO_EAGAIN + * cpdef readonly int ERRNO_EFAULT + * cpdef readonly int ERRNO_EINVAL # <<<<<<<<<<<<<< + * cpdef readonly int ERRNO_ENOTSOCK + * cpdef readonly int ERRNO_EPROTONOSUPPORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EINVAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EINVAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":256 + * cpdef readonly int ERRNO_EFAULT + * cpdef readonly int ERRNO_EINVAL + * cpdef readonly int ERRNO_ENOTSOCK # <<<<<<<<<<<<<< + * cpdef readonly int ERRNO_EPROTONOSUPPORT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_ENOTSOCK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_ENOTSOCK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":257 + * cpdef readonly int ERRNO_EINVAL + * cpdef readonly int ERRNO_ENOTSOCK + * cpdef readonly int ERRNO_EPROTONOSUPPORT # <<<<<<<<<<<<<< + * + * cpdef readonly int SEV_NO_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EPROTONOSUPPORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EPROTONOSUPPORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":259 + * cpdef readonly int ERRNO_EPROTONOSUPPORT + * + * cpdef readonly int SEV_NO_ALARM # <<<<<<<<<<<<<< + * cpdef readonly int SEV_MINOR + * cpdef readonly int SEV_MAJOR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_NO_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_NO_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":260 + * + * cpdef readonly int SEV_NO_ALARM + * cpdef readonly int SEV_MINOR # <<<<<<<<<<<<<< + * cpdef readonly int SEV_MAJOR + * cpdef readonly int SEV_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_MINOR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":261 + * cpdef readonly int SEV_NO_ALARM + * cpdef readonly int SEV_MINOR + * cpdef readonly int SEV_MAJOR # <<<<<<<<<<<<<< + * cpdef readonly int SEV_INVALID + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_MAJOR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":262 + * cpdef readonly int SEV_MINOR + * cpdef readonly int SEV_MAJOR + * cpdef readonly int SEV_INVALID # <<<<<<<<<<<<<< + * + * cpdef readonly int STAT_NO_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":264 + * cpdef readonly int SEV_INVALID + * + * cpdef readonly int STAT_NO_ALARM # <<<<<<<<<<<<<< + * cpdef readonly int STAT_READ + * cpdef readonly int STAT_WRITE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_NO_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_NO_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":265 + * + * cpdef readonly int STAT_NO_ALARM + * cpdef readonly int STAT_READ # <<<<<<<<<<<<<< + * cpdef readonly int STAT_WRITE + * cpdef readonly int STAT_HIHI + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_READ); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_READ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":266 + * cpdef readonly int STAT_NO_ALARM + * cpdef readonly int STAT_READ + * cpdef readonly int STAT_WRITE # <<<<<<<<<<<<<< + * cpdef readonly int STAT_HIHI + * cpdef readonly int STAT_HIGH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_WRITE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_WRITE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":267 + * cpdef readonly int STAT_READ + * cpdef readonly int STAT_WRITE + * cpdef readonly int STAT_HIHI # <<<<<<<<<<<<<< + * cpdef readonly int STAT_HIGH + * cpdef readonly int STAT_LOLO + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HIHI); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HIHI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":268 + * cpdef readonly int STAT_WRITE + * cpdef readonly int STAT_HIHI + * cpdef readonly int STAT_HIGH # <<<<<<<<<<<<<< + * cpdef readonly int STAT_LOLO + * cpdef readonly int STAT_LOW + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HIGH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HIGH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":269 + * cpdef readonly int STAT_HIHI + * cpdef readonly int STAT_HIGH + * cpdef readonly int STAT_LOLO # <<<<<<<<<<<<<< + * cpdef readonly int STAT_LOW + * cpdef readonly int STAT_STATE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LOLO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LOLO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":270 + * cpdef readonly int STAT_HIGH + * cpdef readonly int STAT_LOLO + * cpdef readonly int STAT_LOW # <<<<<<<<<<<<<< + * cpdef readonly int STAT_STATE + * cpdef readonly int STAT_COS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":271 + * cpdef readonly int STAT_LOLO + * cpdef readonly int STAT_LOW + * cpdef readonly int STAT_STATE # <<<<<<<<<<<<<< + * cpdef readonly int STAT_COS + * cpdef readonly int STAT_COMM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_STATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_STATE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":272 + * cpdef readonly int STAT_LOW + * cpdef readonly int STAT_STATE + * cpdef readonly int STAT_COS # <<<<<<<<<<<<<< + * cpdef readonly int STAT_COMM + * cpdef readonly int STAT_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_COS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_COS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":273 + * cpdef readonly int STAT_STATE + * cpdef readonly int STAT_COS + * cpdef readonly int STAT_COMM # <<<<<<<<<<<<<< + * cpdef readonly int STAT_TIMEOUT + * cpdef readonly int STAT_HWLIMIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_COMM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_COMM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":274 + * cpdef readonly int STAT_COS + * cpdef readonly int STAT_COMM + * cpdef readonly int STAT_TIMEOUT # <<<<<<<<<<<<<< + * cpdef readonly int STAT_HWLIMIT + * cpdef readonly int STAT_CALC + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":275 + * cpdef readonly int STAT_COMM + * cpdef readonly int STAT_TIMEOUT + * cpdef readonly int STAT_HWLIMIT # <<<<<<<<<<<<<< + * cpdef readonly int STAT_CALC + * cpdef readonly int STAT_SCAN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HWLIMIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HWLIMIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":276 + * cpdef readonly int STAT_TIMEOUT + * cpdef readonly int STAT_HWLIMIT + * cpdef readonly int STAT_CALC # <<<<<<<<<<<<<< + * cpdef readonly int STAT_SCAN + * cpdef readonly int STAT_LINK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_CALC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_CALC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":277 + * cpdef readonly int STAT_HWLIMIT + * cpdef readonly int STAT_CALC + * cpdef readonly int STAT_SCAN # <<<<<<<<<<<<<< + * cpdef readonly int STAT_LINK + * cpdef readonly int STAT_SOFT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SCAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SCAN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":278 + * cpdef readonly int STAT_CALC + * cpdef readonly int STAT_SCAN + * cpdef readonly int STAT_LINK # <<<<<<<<<<<<<< + * cpdef readonly int STAT_SOFT + * cpdef readonly int STAT_BAD_SUB + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LINK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LINK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":279 + * cpdef readonly int STAT_SCAN + * cpdef readonly int STAT_LINK + * cpdef readonly int STAT_SOFT # <<<<<<<<<<<<<< + * cpdef readonly int STAT_BAD_SUB + * cpdef readonly int STAT_UDF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SOFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SOFT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":280 + * cpdef readonly int STAT_LINK + * cpdef readonly int STAT_SOFT + * cpdef readonly int STAT_BAD_SUB # <<<<<<<<<<<<<< + * cpdef readonly int STAT_UDF + * cpdef readonly int STAT_DISABLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_BAD_SUB); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_BAD_SUB.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":281 + * cpdef readonly int STAT_SOFT + * cpdef readonly int STAT_BAD_SUB + * cpdef readonly int STAT_UDF # <<<<<<<<<<<<<< + * cpdef readonly int STAT_DISABLE + * cpdef readonly int STAT_SIMM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_UDF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_UDF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":282 + * cpdef readonly int STAT_BAD_SUB + * cpdef readonly int STAT_UDF + * cpdef readonly int STAT_DISABLE # <<<<<<<<<<<<<< + * cpdef readonly int STAT_SIMM + * cpdef readonly int STAT_READ_ACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_DISABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_DISABLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":283 + * cpdef readonly int STAT_UDF + * cpdef readonly int STAT_DISABLE + * cpdef readonly int STAT_SIMM # <<<<<<<<<<<<<< + * cpdef readonly int STAT_READ_ACCESS + * cpdef readonly int STAT_WRITE_ACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SIMM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SIMM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":284 + * cpdef readonly int STAT_DISABLE + * cpdef readonly int STAT_SIMM + * cpdef readonly int STAT_READ_ACCESS # <<<<<<<<<<<<<< + * cpdef readonly int STAT_WRITE_ACCESS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_READ_ACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_READ_ACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":285 + * cpdef readonly int STAT_SIMM + * cpdef readonly int STAT_READ_ACCESS + * cpdef readonly int STAT_WRITE_ACCESS # <<<<<<<<<<<<<< + * + * # ctypedef enum ChannelRequestPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_WRITE_ACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_WRITE_ACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":288 + * + * # ctypedef enum ChannelRequestPolicyKind: + * cpdef readonly unsigned int WITHOUT_CALLBACK # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WITH_CALLBACK_DEFAULT + * cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITHOUT_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITHOUT_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":289 + * # ctypedef enum ChannelRequestPolicyKind: + * cpdef readonly unsigned int WITHOUT_CALLBACK + * cpdef readonly unsigned int WITH_CALLBACK_DEFAULT # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_CALLBACK_DEFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_CALLBACK_DEFAULT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":290 + * cpdef readonly unsigned int WITHOUT_CALLBACK + * cpdef readonly unsigned int WITH_CALLBACK_DEFAULT + * cpdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * # ChannelFlushSendBufferPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_CALLBACK_USER_SUPPLIED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_CALLBACK_USER_SUPPLIED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":293 + * + * # ChannelFlushSendBufferPolicyKind: + * cpdef readonly unsigned int WITH_FLUSH_IO # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WITH_PEND_IO + * cpdef readonly unsigned int WITH_PEND_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_FLUSH_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_FLUSH_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":294 + * # ChannelFlushSendBufferPolicyKind: + * cpdef readonly unsigned int WITH_FLUSH_IO + * cpdef readonly unsigned int WITH_PEND_IO # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WITH_PEND_EVENT + * cpdef readonly unsigned int WITH_POLL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_PEND_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_PEND_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":295 + * cpdef readonly unsigned int WITH_FLUSH_IO + * cpdef readonly unsigned int WITH_PEND_IO + * cpdef readonly unsigned int WITH_PEND_EVENT # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WITH_POLL + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_PEND_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_PEND_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":296 + * cpdef readonly unsigned int WITH_PEND_IO + * cpdef readonly unsigned int WITH_PEND_EVENT + * cpdef readonly unsigned int WITH_POLL # <<<<<<<<<<<<<< + * + * # ChannelWhenToFlushSendBufferPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_POLL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_POLL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":299 + * + * # ChannelWhenToFlushSendBufferPolicyKind: + * cpdef readonly unsigned int FLUSH_AUTOMATIC # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_NOW + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AUTOMATIC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AUTOMATIC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":300 + * # ChannelWhenToFlushSendBufferPolicyKind: + * cpdef readonly unsigned int FLUSH_AUTOMATIC + * cpdef readonly unsigned int FLUSH_NOW # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_NOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_NOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":301 + * cpdef readonly unsigned int FLUSH_AUTOMATIC + * cpdef readonly unsigned int FLUSH_NOW + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_CREATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_CHANNEL_CREATION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":302 + * cpdef readonly unsigned int FLUSH_NOW + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":303 + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + * cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":304 + * cpdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_GROUP_CREATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_GROUP_CREATION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":305 + * cpdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cpdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + * cpdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT # <<<<<<<<<<<<<< + * + * # ChannelGetCacheWaitPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_DESIGNATED_TO_CLIENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_DESIGNATED_TO_CLIENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":308 + * + * # ChannelGetCacheWaitPolicyKind: + * cpdef readonly unsigned int GET_CACHE_NO_CHECK # <<<<<<<<<<<<<< + * cpdef readonly unsigned int GET_CACHE_NO_WAIT + * cpdef readonly unsigned int GET_CACHE_NOW + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NO_CHECK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NO_CHECK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":309 + * # ChannelGetCacheWaitPolicyKind: + * cpdef readonly unsigned int GET_CACHE_NO_CHECK + * cpdef readonly unsigned int GET_CACHE_NO_WAIT # <<<<<<<<<<<<<< + * cpdef readonly unsigned int GET_CACHE_NOW + * cpdef readonly unsigned int GET_CACHE_WAIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NO_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NO_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":310 + * cpdef readonly unsigned int GET_CACHE_NO_CHECK + * cpdef readonly unsigned int GET_CACHE_NO_WAIT + * cpdef readonly unsigned int GET_CACHE_NOW # <<<<<<<<<<<<<< + * cpdef readonly unsigned int GET_CACHE_WAIT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":311 + * cpdef readonly unsigned int GET_CACHE_NO_WAIT + * cpdef readonly unsigned int GET_CACHE_NOW + * cpdef readonly unsigned int GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * # ChannelGetActionWhenMonitorPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":314 + * + * # ChannelGetActionWhenMonitorPolicyKind: + * cpdef readonly unsigned int GET_FROM_CACHE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int GET_FROM_IOC + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_FROM_CACHE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_FROM_CACHE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":315 + * # ChannelGetActionWhenMonitorPolicyKind: + * cpdef readonly unsigned int GET_FROM_CACHE + * cpdef readonly unsigned int GET_FROM_IOC # <<<<<<<<<<<<<< + * + * # ChannelRequestDataTypePolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_FROM_IOC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_FROM_IOC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":318 + * + * # ChannelRequestDataTypePolicyKind: + * cpdef readonly unsigned int NATIVE_DATATYPE # <<<<<<<<<<<<<< + * # The smaller in byte size of type requested and native datatype + * cpdef readonly unsigned int LOWEST_DATATYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NATIVE_DATATYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NATIVE_DATATYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":320 + * cpdef readonly unsigned int NATIVE_DATATYPE + * # The smaller in byte size of type requested and native datatype + * cpdef readonly unsigned int LOWEST_DATATYPE # <<<<<<<<<<<<<< + * + * # ChannelWaitForResponsePolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->LOWEST_DATATYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.LOWEST_DATATYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":323 + * + * # ChannelWaitForResponsePolicyKind: + * cpdef readonly unsigned int BLOCKING # <<<<<<<<<<<<<< + * cpdef readonly unsigned int WAIT + * cpdef readonly unsigned int NON_BLOCKING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->BLOCKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BLOCKING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":324 + * # ChannelWaitForResponsePolicyKind: + * cpdef readonly unsigned int BLOCKING + * cpdef readonly unsigned int WAIT # <<<<<<<<<<<<<< + * cpdef readonly unsigned int NON_BLOCKING + * cpdef readonly unsigned int NO_WAIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_4WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_4WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":325 + * cpdef readonly unsigned int BLOCKING + * cpdef readonly unsigned int WAIT + * cpdef readonly unsigned int NON_BLOCKING # <<<<<<<<<<<<<< + * cpdef readonly unsigned int NO_WAIT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NON_BLOCKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NON_BLOCKING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":326 + * cpdef readonly unsigned int WAIT + * cpdef readonly unsigned int NON_BLOCKING + * cpdef readonly unsigned int NO_WAIT # <<<<<<<<<<<<<< + * + * # StatusMessageKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NO_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NO_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":329 + * + * # StatusMessageKind: + * cpdef readonly unsigned int NO_MESSAGE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int PRE_REQUEST + * cpdef readonly unsigned int FROM_REQUEST + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NO_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NO_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":330 + * # StatusMessageKind: + * cpdef readonly unsigned int NO_MESSAGE + * cpdef readonly unsigned int PRE_REQUEST # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FROM_REQUEST + * cpdef readonly unsigned int FROM_PEND + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->PRE_REQUEST); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.PRE_REQUEST.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":331 + * cpdef readonly unsigned int NO_MESSAGE + * cpdef readonly unsigned int PRE_REQUEST + * cpdef readonly unsigned int FROM_REQUEST # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FROM_PEND + * cpdef readonly unsigned int FROM_CALLBACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_REQUEST); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_REQUEST.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":332 + * cpdef readonly unsigned int PRE_REQUEST + * cpdef readonly unsigned int FROM_REQUEST + * cpdef readonly unsigned int FROM_PEND # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FROM_CALLBACK + * cpdef readonly unsigned int FROM_MESSAGE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_PEND); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_PEND.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":333 + * cpdef readonly unsigned int FROM_REQUEST + * cpdef readonly unsigned int FROM_PEND + * cpdef readonly unsigned int FROM_CALLBACK # <<<<<<<<<<<<<< + * cpdef readonly unsigned int FROM_MESSAGE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":334 + * cpdef readonly unsigned int FROM_PEND + * cpdef readonly unsigned int FROM_CALLBACK + * cpdef readonly unsigned int FROM_MESSAGE # <<<<<<<<<<<<<< + * + * # CallbackProgressKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":337 + * + * # CallbackProgressKind: + * cpdef readonly unsigned int NOT_INITIATED # <<<<<<<<<<<<<< + * cpdef readonly unsigned int PENDING + * cpdef readonly unsigned int COMPLETE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NOT_INITIATED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NOT_INITIATED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":338 + * # CallbackProgressKind: + * cpdef readonly unsigned int NOT_INITIATED + * cpdef readonly unsigned int PENDING # <<<<<<<<<<<<<< + * cpdef readonly unsigned int COMPLETE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_7PENDING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_7PENDING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->PENDING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.PENDING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":339 + * cpdef readonly unsigned int NOT_INITIATED + * cpdef readonly unsigned int PENDING + * cpdef readonly unsigned int COMPLETE # <<<<<<<<<<<<<< + * + * # deines.h: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->COMPLETE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.COMPLETE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":342 + * + * # deines.h: + * cpdef readonly double DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * cpdef readonly double DEFAULT_TIMEOUT_PEND_IO + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->DEFAULT_TIMEOUT_PEND_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.DEFAULT_TIMEOUT_PEND_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":343 + * # deines.h: + * cpdef readonly double DEFAULT_TIMEOUT_PEND_EVENT + * cpdef readonly double DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * + * cpdef readonly string INVALID_ENUM_RETURN_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->DEFAULT_TIMEOUT_PEND_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.DEFAULT_TIMEOUT_PEND_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":345 + * cpdef readonly double DEFAULT_TIMEOUT_PEND_IO + * + * cpdef readonly string INVALID_ENUM_RETURN_STRING # <<<<<<<<<<<<<< + * cpdef readonly short INVALID_ENUM_RETURN_VALUE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->INVALID_ENUM_RETURN_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.INVALID_ENUM_RETURN_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":346 + * + * cpdef readonly string INVALID_ENUM_RETURN_STRING + * cpdef readonly short INVALID_ENUM_RETURN_VALUE # <<<<<<<<<<<<<< + * + * cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->INVALID_ENUM_RETURN_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.INVALID_ENUM_RETURN_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":348 + * cpdef readonly short INVALID_ENUM_RETURN_VALUE + * + * cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK # <<<<<<<<<<<<<< + * cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->BSREAD_ZEROMQ_HIGH_WATER_MARK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BSREAD_ZEROMQ_HIGH_WATER_MARK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":349 + * + * cpdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + * cpdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->BSREAD_ZEROMQ_TIMEOUT_MS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BSREAD_ZEROMQ_TIMEOUT_MS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":682 + * cdef CAOPCodes caop + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.channelID = 0 + * self.connectFlag = False + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_11channelInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_11channelInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_11channelInfo___cinit__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_11channelInfo___cinit__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":683 + * + * def __cinit__(self): + * self.channelID = 0 # <<<<<<<<<<<<<< + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->channelID = 0; + + /* "PyCafeDefs.pxi":684 + * def __cinit__(self): + * self.channelID = 0 + * self.connectFlag = False # <<<<<<<<<<<<<< + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 + */ + __pyx_v_self->connectFlag = 0; + + /* "PyCafeDefs.pxi":685 + * self.channelID = 0 + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->hostName = __pyx_t_4; + + /* "PyCafeDefs.pxi":686 + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 # <<<<<<<<<<<<<< + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + */ + __pyx_v_self->nelem = 0; + + /* "PyCafeDefs.pxi":687 + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 + */ + __pyx_v_self->dataType = ICAFE_TYPENOTCONN; + + /* "PyCafeDefs.pxi":688 + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.accessRead = 0 + * self.accessWrite = 0 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_TYPENOTCONN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->dataTypeAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":689 + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 # <<<<<<<<<<<<<< + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->accessRead = 0; + + /* "PyCafeDefs.pxi":690 + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 + * self.accessWrite = 0 # <<<<<<<<<<<<<< + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + */ + __pyx_v_self->accessWrite = 0; + + /* "PyCafeDefs.pxi":691 + * self.accessRead = 0 + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 691, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->className = __pyx_t_4; + + /* "PyCafeDefs.pxi":692 + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + */ + __pyx_v_self->connectionState = ICAFE_CA_OP_CONN_DOWN; + + /* "PyCafeDefs.pxi":693 + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + */ + __pyx_v_self->cafeConnectionState = ICAFE_CS_NEVER_CONN; + + /* "PyCafeDefs.pxi":694 + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') # <<<<<<<<<<<<<< + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CA_OP_CONN_DOWN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->connectionStateAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":695 + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CS_NEVER_CONN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->cafeConnectionStateAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":682 + * cdef CAOPCodes caop + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.channelID = 0 + * self.connectFlag = False + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.channelInfo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":697 + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_2show(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_2show(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_UCS4 __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":698 + * + * def show(self): + * print("channelID = %s" % hex(self.channelID)) # <<<<<<<<<<<<<< + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->channelID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_channelID_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":699 + * def show(self): + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) # <<<<<<<<<<<<<< + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->connectFlag); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_connectFlag_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":700 + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) # <<<<<<<<<<<<<< + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % + */ + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hostName); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_hostName_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":701 + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) # <<<<<<<<<<<<<< + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_nelem_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":702 + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % # <<<<<<<<<<<<<< + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_dataType); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_dataType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_dataType); + + /* "PyCafeDefs.pxi":703 + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) # <<<<<<<<<<<<<< + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cdt.message(__pyx_v_self->dataType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->dataType, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":702 + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % # <<<<<<<<<<<<<< + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":704 + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) # <<<<<<<<<<<<<< + * print("accessWrite = %d" % self.accessWrite) + * print("className = %s" % self.className) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_accessRead_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":705 + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) # <<<<<<<<<<<<<< + * print("className = %s" % self.className) + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessWrite); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_accessWrite_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":706 + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) + * print("className = %s" % self.className) # <<<<<<<<<<<<<< + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + */ + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->className); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_className_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":709 + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % # <<<<<<<<<<<<<< + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_connectionState); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_connectionState); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_connectionState); + + /* "PyCafeDefs.pxi":710 + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) # <<<<<<<<<<<<<< + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->caop.message(__pyx_v_self->connectionState)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__4); + __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->connectionState, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":709 + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % # <<<<<<<<<<<<<< + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + */ + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":711 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_cafeConnectionState); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_cafeConnectionState); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_cafeConnectionState); + + /* "PyCafeDefs.pxi":712 + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->csc.message(__pyx_v_self->cafeConnectionState)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":711 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__4); + + /* "PyCafeDefs.pxi":712 + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->cafeConnectionState, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":711 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":713 + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":697 + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.channelInfo.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":664 + * + * cdef class channelInfo: + * cdef readonly long channelID # <<<<<<<<<<<<<< + * cdef readonly bint connectFlag + * cdef readonly string hostName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_9channelID___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9channelID___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->channelID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.channelID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":665 + * cdef class channelInfo: + * cdef readonly long channelID + * cdef readonly bint connectFlag # <<<<<<<<<<<<<< + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->connectFlag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectFlag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":666 + * cdef readonly long channelID + * cdef readonly bint connectFlag + * cdef readonly string hostName # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_8hostName___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8hostName___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hostName); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.hostName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":667 + * cdef readonly bint connectFlag + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native # <<<<<<<<<<<<<< + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_5nelem___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_5nelem___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":668 + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native # <<<<<<<<<<<<<< + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_8dataType___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8dataType___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":669 + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native # <<<<<<<<<<<<<< + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->dataTypeAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.dataTypeAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":670 + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 # <<<<<<<<<<<<<< + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessRead); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.accessRead.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":671 + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 # <<<<<<<<<<<<<< + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessWrite); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.accessWrite.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":672 + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t # <<<<<<<<<<<<<< + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9className_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9className_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_9className___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9className___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->className); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.className.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":673 + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ # <<<<<<<<<<<<<< + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + * cdef readonly string connectionStateAsString # as given by CA_OP_ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->connectionState); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectionState.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":674 + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state # <<<<<<<<<<<<<< + * cdef readonly string connectionStateAsString # as given by CA_OP_ + * # as given by cafe_cs_state + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->cafeConnectionState); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.cafeConnectionState.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":675 + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + * cdef readonly string connectionStateAsString # as given by CA_OP_ # <<<<<<<<<<<<<< + * # as given by cafe_cs_state + * cdef readonly string cafeConnectionStateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->connectionStateAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectionStateAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":677 + * cdef readonly string connectionStateAsString # as given by CA_OP_ + * # as given by cafe_cs_state + * cdef readonly string cafeConnectionStateAsString # <<<<<<<<<<<<<< + * cdef CAFEDataTypeCode cdt + * cdef CAFEStatusCode csc + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cafeConnectionStateAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.cafeConnectionStateAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":772 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvctrl_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6pvctrl_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6pvctrl___cinit__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvctrl___cinit__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":773 + * + * def __cinit__(self): + * self.nelem = 1 # <<<<<<<<<<<<<< + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":774 + * def __cinit__(self): + * self.nelem = 1 + * self.alarmStatus = -1 # <<<<<<<<<<<<<< + * self.alarmSeverity = -1 + * self.precision = 0 + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":775 + * self.nelem = 1 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 # <<<<<<<<<<<<<< + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":776 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + * self.precision = 0 # <<<<<<<<<<<<<< + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 + */ + __pyx_v_self->precision = 0; + + /* "PyCafeDefs.pxi":777 + * self.alarmSeverity = -1 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings = 0 + * self.enumStrings = [] + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->units); + __Pyx_DECREF(__pyx_v_self->units); + __pyx_v_self->units = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":778 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 # <<<<<<<<<<<<<< + * self.enumStrings = [] + * self.upperDisplayLimit = 0 + */ + __pyx_v_self->noEnumStrings = 0; + + /* "PyCafeDefs.pxi":779 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 + * self.enumStrings = [] # <<<<<<<<<<<<<< + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->enumStrings); + __Pyx_DECREF(__pyx_v_self->enumStrings); + __pyx_v_self->enumStrings = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":780 + * self.noEnumStrings = 0 + * self.enumStrings = [] + * self.upperDisplayLimit = 0 # <<<<<<<<<<<<<< + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperDisplayLimit); + __Pyx_DECREF(__pyx_v_self->upperDisplayLimit); + __pyx_v_self->upperDisplayLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":781 + * self.enumStrings = [] + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 # <<<<<<<<<<<<<< + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerDisplayLimit); + __Pyx_DECREF(__pyx_v_self->lowerDisplayLimit); + __pyx_v_self->lowerDisplayLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":782 + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 # <<<<<<<<<<<<<< + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperAlarmLimit); + __Pyx_DECREF(__pyx_v_self->upperAlarmLimit); + __pyx_v_self->upperAlarmLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":783 + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 # <<<<<<<<<<<<<< + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerAlarmLimit); + __Pyx_DECREF(__pyx_v_self->lowerAlarmLimit); + __pyx_v_self->lowerAlarmLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":784 + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 # <<<<<<<<<<<<<< + * self.lowerControlLimit = 0 + * self.value = [] + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperControlLimit); + __Pyx_DECREF(__pyx_v_self->upperControlLimit); + __pyx_v_self->upperControlLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":785 + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 # <<<<<<<<<<<<<< + * self.value = [] + * self.status = 1 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerControlLimit); + __Pyx_DECREF(__pyx_v_self->lowerControlLimit); + __pyx_v_self->lowerControlLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":786 + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 + * self.value = [] # <<<<<<<<<<<<<< + * self.status = 1 + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":787 + * self.lowerControlLimit = 0 + * self.value = [] + * self.status = 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":772 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":790 + * + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_2show(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_2show(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":791 + * + * def show(self): + * self.showPrint(self.nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvctrl *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":792 + * def show(self): + * self.showPrint(self.nelem) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":790 + * + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvctrl.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":794 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_4showMax(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self), ((PyObject *)__pyx_v_nelem)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_4showMax(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":795 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_nelem, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":799 + * # print ("Note: Max. Nelem =", self.nelem + * # print ("----------------------" + * nelem = self.nelem # <<<<<<<<<<<<<< + * self.showPrint(nelem) + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":795 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":800 + * # print ("----------------------" + * nelem = self.nelem + * self.showPrint(nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvctrl *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v_nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":801 + * nelem = self.nelem + * self.showPrint(nelem) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":794 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvctrl.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_nelem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":803 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + +static PyObject *__pyx_f_6PyCafe_6pvctrl_showPrint(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem) { + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + long __pyx_t_6; + long __pyx_t_7; + unsigned int __pyx_t_8; + unsigned short __pyx_t_9; + unsigned short __pyx_t_10; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":806 + * cdef unsigned int i + * # is self.value[0] a list + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 806, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":807 + * # is self.value[0] a list + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = ", self.value[0][0], end="") + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 807, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":808 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") # <<<<<<<<<<<<<< + * else: + * print("value =", self.value[0], end="" ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 808, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 808, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":807 + * # is self.value[0] a list + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = ", self.value[0][0], end="") + * else: + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":810 + * print("value = ", self.value[0][0], end="") + * else: + * print("value =", self.value[0], end="" ) # <<<<<<<<<<<<<< + * else: + * print("value = ", end="") + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 810, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_kp_u_value_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 810, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":806 + * cdef unsigned int i + * # is self.value[0] a list + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":812 + * print("value =", self.value[0], end="" ) + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 812, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__9, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":814 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 814, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyList_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":815 + * + * if isinstance(self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + */ + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 815, __pyx_L1_error) + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":816 + * if isinstance(self.value[0], list): + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * else: + * for i in range(0, nelem): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 816, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 816, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":814 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":818 + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[i], "[%d]" % i, end=" ") + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 818, __pyx_L1_error) + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":819 + * else: + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * + * print("") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 819, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_1 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + __pyx_L5:; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":821 + * print(self.value[i], "[%d]" % i, end=" ") + * + * print("") # <<<<<<<<<<<<<< + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":822 + * + * print("") + * print("status = %d" % self.status) # <<<<<<<<<<<<<< + * print("alarmStatus = %d" % self.alarmStatus) + * print("alarmSeverity = %d" % self.alarmSeverity) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_status_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":823 + * print("") + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d" % self.alarmSeverity) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_alarmStatus_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":824 + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) + * print("alarmSeverity = %d" % self.alarmSeverity) # <<<<<<<<<<<<<< + * + * if self.noEnumStrings > 0: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_alarmSeverity_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":826 + * print("alarmSeverity = %d" % self.alarmSeverity) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + */ + __pyx_t_2 = ((__pyx_v_self->noEnumStrings > 0) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":827 + * + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) # <<<<<<<<<<<<<< + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->noEnumStrings); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_noEnumStrings_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":828 + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 828, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__11, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":829 + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): # <<<<<<<<<<<<<< + * print(self.enumStrings[i], "[%s]" % i, end=" ") + * print("") + */ + __pyx_t_9 = __pyx_v_self->noEnumStrings; + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_10; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":830 + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") # <<<<<<<<<<<<<< + * print("") + * else: + */ + if (unlikely(__pyx_v_self->enumStrings == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 830, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->enumStrings, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 830, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafeDefs.pxi":831 + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + * print("") # <<<<<<<<<<<<<< + * else: + * print("precision = %d" % self.precision) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":826 + * print("alarmSeverity = %d" % self.alarmSeverity) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + */ + goto __pyx_L10; + } + + /* "PyCafeDefs.pxi":833 + * print("") + * else: + * print("precision = %d" % self.precision) # <<<<<<<<<<<<<< + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->precision); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_precision_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":834 + * else: + * print("precision = %d" % self.precision) + * print("units = %s" % self.units) # <<<<<<<<<<<<<< + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_units_s, __pyx_v_self->units); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":835 + * print("precision = %d" % self.precision) + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) # <<<<<<<<<<<<<< + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperDisplayLimit_f, __pyx_v_self->upperDisplayLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":836 + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) # <<<<<<<<<<<<<< + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerDisplayLimit_f, __pyx_v_self->lowerDisplayLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":837 + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) # <<<<<<<<<<<<<< + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperAlarmLimit_f, __pyx_v_self->upperAlarmLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":838 + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) # <<<<<<<<<<<<<< + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerAlarmLimit_f, __pyx_v_self->lowerAlarmLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":839 + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) # <<<<<<<<<<<<<< + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperWarningLimit_f, __pyx_v_self->upperWarningLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":840 + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) # <<<<<<<<<<<<<< + * print("upperControlLimit = %f" % self.upperControlLimit) + * print("lowerControlLimit = %f" % self.lowerControlLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerWarningLimit_f, __pyx_v_self->lowerWarningLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":841 + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) # <<<<<<<<<<<<<< + * print("lowerControlLimit = %f" % self.lowerControlLimit) + * + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperControlLimit_f, __pyx_v_self->upperControlLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":842 + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) + * print("lowerControlLimit = %f" % self.lowerControlLimit) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerControlLimit_f, __pyx_v_self->lowerControlLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L10:; + + /* "PyCafeDefs.pxi":803 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.pvctrl.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":754 + * ################################################################################## + * cdef class pvctrl: + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5nelem___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5nelem___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":755 + * cdef class pvctrl: + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus # <<<<<<<<<<<<<< + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.alarmStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":756 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly unsigned short precision + * cdef readonly str units + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.alarmSeverity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":757 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision # <<<<<<<<<<<<<< + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_9precision___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_9precision___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->precision); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":758 + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision + * cdef readonly str units # <<<<<<<<<<<<<< + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5units_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5units_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5units___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5units___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->units); + __pyx_r = __pyx_v_self->units; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":759 + * cdef readonly unsigned short precision + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings # <<<<<<<<<<<<<< + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->noEnumStrings); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.noEnumStrings.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":760 + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings # <<<<<<<<<<<<<< + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->enumStrings); + __pyx_r = __pyx_v_self->enumStrings; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":761 + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit # <<<<<<<<<<<<<< + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperDisplayLimit); + __pyx_r = __pyx_v_self->upperDisplayLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":762 + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit # <<<<<<<<<<<<<< + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerDisplayLimit); + __pyx_r = __pyx_v_self->lowerDisplayLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":763 + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit # <<<<<<<<<<<<<< + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperAlarmLimit); + __pyx_r = __pyx_v_self->upperAlarmLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":764 + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit # <<<<<<<<<<<<<< + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperWarningLimit); + __pyx_r = __pyx_v_self->upperWarningLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":765 + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit # <<<<<<<<<<<<<< + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerWarningLimit); + __pyx_r = __pyx_v_self->lowerWarningLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":766 + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit # <<<<<<<<<<<<<< + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerAlarmLimit); + __pyx_r = __pyx_v_self->lowerAlarmLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":767 + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit # <<<<<<<<<<<<<< + * cdef readonly lowerControlLimit + * cdef readonly list value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperControlLimit); + __pyx_r = __pyx_v_self->upperControlLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":768 + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit # <<<<<<<<<<<<<< + * cdef readonly list value + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerControlLimit); + __pyx_r = __pyx_v_self->lowerControlLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":769 + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef readonly int status + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5value_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5value___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5value___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":770 + * cdef readonly lowerControlLimit + * cdef readonly list value + * cdef readonly int status # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_6status___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6status___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":857 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_13CafeException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_13CafeException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v__type = 0; + PyObject *__pyx_v__source = 0; + PyObject *__pyx_v__handle = 0; + PyObject *__pyx_v__pv_name = 0; + PyObject *__pyx_v__error_code = 0; + PyObject *__pyx_v__error_text = 0; + PyObject *__pyx_v__error_info = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_source,&__pyx_n_s_handle,&__pyx_n_s_pv_name,&__pyx_n_s_error_code,&__pyx_n_s_error_text,&__pyx_n_s_error_info,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + values[0] = ((PyObject *)__pyx_n_u_CafePVError); + + /* "PyCafeDefs.pxi":858 + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( + * self, _type="CafePVError", _source=None, _handle=0, # <<<<<<<<<<<<<< + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type + */ + values[1] = ((PyObject *)Py_None); + values[2] = ((PyObject *)__pyx_int_0); + + /* "PyCafeDefs.pxi":859 + * def __init__( + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): # <<<<<<<<<<<<<< + * self.type = _type + * self.source = _source + */ + values[3] = ((PyObject *)Py_None); + values[4] = ((PyObject *)__pyx_int_neg_1); + values[5] = ((PyObject *)Py_None); + values[6] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_code); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_text); + if (value) { values[5] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_info); + if (value) { values[6] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 857, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v__type = values[0]; + __pyx_v__source = values[1]; + __pyx_v__handle = values[2]; + __pyx_v__pv_name = values[3]; + __pyx_v__error_code = values[4]; + __pyx_v__error_text = values[5]; + __pyx_v__error_info = values[6]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 857, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CafeException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_13CafeException___init__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self), __pyx_v__type, __pyx_v__source, __pyx_v__handle, __pyx_v__pv_name, __pyx_v__error_code, __pyx_v__error_text, __pyx_v__error_info); + + /* "PyCafeDefs.pxi":857 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_13CafeException___init__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv_name, PyObject *__pyx_v__error_code, PyObject *__pyx_v__error_text, PyObject *__pyx_v__error_info) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "PyCafeDefs.pxi":860 + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type # <<<<<<<<<<<<<< + * self.source = _source + * self.handle = _handle + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__type))||((__pyx_v__type) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__type)->tp_name), 0))) __PYX_ERR(2, 860, __pyx_L1_error) + __pyx_t_1 = __pyx_v__type; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->type); + __Pyx_DECREF(__pyx_v_self->type); + __pyx_v_self->type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":861 + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type + * self.source = _source # <<<<<<<<<<<<<< + * self.handle = _handle + * self.name = _pv_name + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__source))||((__pyx_v__source) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__source)->tp_name), 0))) __PYX_ERR(2, 861, __pyx_L1_error) + __pyx_t_1 = __pyx_v__source; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->source); + __Pyx_DECREF(__pyx_v_self->source); + __pyx_v_self->source = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":862 + * self.type = _type + * self.source = _source + * self.handle = _handle # <<<<<<<<<<<<<< + * self.name = _pv_name + * self.error_code = _error_code + */ + __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_v__handle); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 862, __pyx_L1_error) + __pyx_v_self->handle = __pyx_t_2; + + /* "PyCafeDefs.pxi":863 + * self.source = _source + * self.handle = _handle + * self.name = _pv_name # <<<<<<<<<<<<<< + * self.error_code = _error_code + * self.error_text = _error_text + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__pv_name))||((__pyx_v__pv_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__pv_name)->tp_name), 0))) __PYX_ERR(2, 863, __pyx_L1_error) + __pyx_t_1 = __pyx_v__pv_name; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":864 + * self.handle = _handle + * self.name = _pv_name + * self.error_code = _error_code # <<<<<<<<<<<<<< + * self.error_text = _error_text + * self.error_info = _error_info + */ + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v__error_code); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 864, __pyx_L1_error) + __pyx_v_self->error_code = __pyx_t_3; + + /* "PyCafeDefs.pxi":865 + * self.name = _pv_name + * self.error_code = _error_code + * self.error_text = _error_text # <<<<<<<<<<<<<< + * self.error_info = _error_info + * + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__error_text))||((__pyx_v__error_text) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__error_text)->tp_name), 0))) __PYX_ERR(2, 865, __pyx_L1_error) + __pyx_t_1 = __pyx_v__error_text; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->error_text); + __Pyx_DECREF(__pyx_v_self->error_text); + __pyx_v_self->error_text = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":866 + * self.error_code = _error_code + * self.error_text = _error_text + * self.error_info = _error_info # <<<<<<<<<<<<<< + * + * def show(self): + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__error_info))||((__pyx_v__error_info) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__error_info)->tp_name), 0))) __PYX_ERR(2, 866, __pyx_L1_error) + __pyx_t_1 = __pyx_v__error_info; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->error_info); + __Pyx_DECREF(__pyx_v_self->error_info); + __pyx_v_self->error_info = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":857 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":868 + * self.error_info = _error_info + * + * def show(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_2show(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_2show(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":869 + * + * def show(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(self.type) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":870 + * def show(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) + */ + __pyx_t_2 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":871 + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + * print(self.type) # <<<<<<<<<<<<<< + * print("Exception raised from CyCafe method:", self.source) + * + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":870 + * def show(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) + */ + } + + /* "PyCafeDefs.pxi":872 + * if self.type is not None: + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) # <<<<<<<<<<<<<< + * + * if self.handle != 0: + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_Exception_raised_from_CyCafe_met); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_from_CyCafe_met); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Exception_raised_from_CyCafe_met); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->source); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":874 + * print("Exception raised from CyCafe method:", self.source) + * + * if self.handle != 0: # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + __pyx_t_3 = ((__pyx_v_self->handle != 0) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":876 + * if self.handle != 0: + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") # <<<<<<<<<<<<<< + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":875 + * + * if self.handle != 0: + * print("name =", self.name, "( handle =", # <<<<<<<<<<<<<< + * self.handle, ") reports the following error:") + * if (self.error_code != -1): + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_name); + __Pyx_GIVEREF(__pyx_kp_u_name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_name); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __Pyx_INCREF(__pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_kp_u_handle_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_reports_the_following_error); + __Pyx_GIVEREF(__pyx_kp_u_reports_the_following_error); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_reports_the_following_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":877 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if (self.error_code != -1): # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + __pyx_t_3 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":878 + * self.handle, ") reports the following error:") + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) # <<<<<<<<<<<<<< + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_kp_u_error_code_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_text_2); + __Pyx_GIVEREF(__pyx_kp_u_error_text_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_error_text_2); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->error_text); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":877 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if (self.error_code != -1): # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":879 + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_info); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":874 + * print("Exception raised from CyCafe method:", self.source) + * + * if self.handle != 0: # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":880 + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_CafePVError, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 880, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":882 + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") # <<<<<<<<<<<<<< + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":881 + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", # <<<<<<<<<<<<<< + * self.handle, ") reports the following error:") + * if self.error_code != -1: + */ + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_name); + __Pyx_GIVEREF(__pyx_kp_u_name); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_name); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->name); + __Pyx_INCREF(__pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_kp_u_handle_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_reports_the_following_error); + __Pyx_GIVEREF(__pyx_kp_u_reports_the_following_error); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_reports_the_following_error); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":883 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + __pyx_t_2 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":884 + * self.handle, ") reports the following error:") + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) # <<<<<<<<<<<<<< + * print("error_info:", self.error_info) + * else: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_kp_u_error_code_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_text_2); + __Pyx_GIVEREF(__pyx_kp_u_error_text_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_error_text_2); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->error_text); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":883 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":885 + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * else: + * print("error_info:", self.error_info) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->error_info); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":880 + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":887 + * print("error_info:", self.error_info) + * else: + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * print("------------------------------------------------------------------------") + * return + */ + /*else*/ { + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_info); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":888 + * else: + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":889 + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * def reveal(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":868 + * self.error_info = _error_info + * + * def show(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CafeException.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":891 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_5reveal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_5reveal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reveal (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4reveal(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4reveal(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("reveal", 0); + + /* "PyCafeDefs.pxi":892 + * + * def reveal(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(".type =", self.type) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":893 + * def reveal(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(".type =", self.type) + * print(".source =", self.source) + */ + __pyx_t_2 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":894 + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + * print(".type =", self.type) # <<<<<<<<<<<<<< + * print(".source =", self.source) + * if self.handle != 0: + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_type_2); + __Pyx_GIVEREF(__pyx_kp_u_type_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_type_2); + __Pyx_INCREF(__pyx_v_self->type); + __Pyx_GIVEREF(__pyx_v_self->type); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->type); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":893 + * def reveal(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(".type =", self.type) + * print(".source =", self.source) + */ + } + + /* "PyCafeDefs.pxi":895 + * if self.type is not None: + * print(".type =", self.type) + * print(".source =", self.source) # <<<<<<<<<<<<<< + * if self.handle != 0: + * print(".handle =", self.handle) + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_source_2); + __Pyx_GIVEREF(__pyx_kp_u_source_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_source_2); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->source); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":896 + * print(".type =", self.type) + * print(".source =", self.source) + * if self.handle != 0: # <<<<<<<<<<<<<< + * print(".handle =", self.handle) + * if self.name is not None: + */ + __pyx_t_3 = ((__pyx_v_self->handle != 0) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":897 + * print(".source =", self.source) + * if self.handle != 0: + * print(".handle =", self.handle) # <<<<<<<<<<<<<< + * if self.name is not None: + * print(".name =", self.name) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_kp_u_handle_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":896 + * print(".type =", self.type) + * print(".source =", self.source) + * if self.handle != 0: # <<<<<<<<<<<<<< + * print(".handle =", self.handle) + * if self.name is not None: + */ + } + + /* "PyCafeDefs.pxi":898 + * if self.handle != 0: + * print(".handle =", self.handle) + * if self.name is not None: # <<<<<<<<<<<<<< + * print(".name =", self.name) + * if self.error_code != -1: + */ + __pyx_t_3 = (__pyx_v_self->name != ((PyObject*)Py_None)); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":899 + * print(".handle =", self.handle) + * if self.name is not None: + * print(".name =", self.name) # <<<<<<<<<<<<<< + * if self.error_code != -1: + * print(".error_code =", self.error_code) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_name_2); + __Pyx_GIVEREF(__pyx_kp_u_name_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_name_2); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":898 + * if self.handle != 0: + * print(".handle =", self.handle) + * if self.name is not None: # <<<<<<<<<<<<<< + * print(".name =", self.name) + * if self.error_code != -1: + */ + } + + /* "PyCafeDefs.pxi":900 + * if self.name is not None: + * print(".name =", self.name) + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print(".error_code =", self.error_code) + * if self.error_text is not None: + */ + __pyx_t_2 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":901 + * print(".name =", self.name) + * if self.error_code != -1: + * print(".error_code =", self.error_code) # <<<<<<<<<<<<<< + * if self.error_text is not None: + * print(".error_text =", self.error_text) + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_code_3); + __Pyx_GIVEREF(__pyx_kp_u_error_code_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_code_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":900 + * if self.name is not None: + * print(".name =", self.name) + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print(".error_code =", self.error_code) + * if self.error_text is not None: + */ + } + + /* "PyCafeDefs.pxi":902 + * if self.error_code != -1: + * print(".error_code =", self.error_code) + * if self.error_text is not None: # <<<<<<<<<<<<<< + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + */ + __pyx_t_2 = (__pyx_v_self->error_text != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":903 + * print(".error_code =", self.error_code) + * if self.error_text is not None: + * print(".error_text =", self.error_text) # <<<<<<<<<<<<<< + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_text_3); + __Pyx_GIVEREF(__pyx_kp_u_error_text_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_text_3); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_text); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":902 + * if self.error_code != -1: + * print(".error_code =", self.error_code) + * if self.error_text is not None: # <<<<<<<<<<<<<< + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":904 + * if self.error_text is not None: + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) # <<<<<<<<<<<<<< + * print("------------------------------------------------------------------------") + * return + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_info_3); + __Pyx_GIVEREF(__pyx_kp_u_error_info_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_info_3); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->error_info); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":905 + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":906 + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":891 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CafeException.reveal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":848 + * + * cdef class CafeException(Exception): + * cdef readonly str type # <<<<<<<<<<<<<< + * cdef readonly str source + * cdef readonly unsigned int handle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4type_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4type___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4type___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->type); + __pyx_r = __pyx_v_self->type; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":849 + * cdef class CafeException(Exception): + * cdef readonly str type + * cdef readonly str source # <<<<<<<<<<<<<< + * cdef readonly unsigned int handle + * cdef readonly str name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6source_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6source_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6source___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6source___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->source); + __pyx_r = __pyx_v_self->source; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":850 + * cdef readonly str type + * cdef readonly str source + * cdef readonly unsigned int handle # <<<<<<<<<<<<<< + * cdef readonly str name + * cdef readonly int error_code + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6handle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6handle___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6handle___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 850, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":851 + * cdef readonly str source + * cdef readonly unsigned int handle + * cdef readonly str name # <<<<<<<<<<<<<< + * cdef readonly int error_code + * cdef readonly str error_text + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4name_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4name___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4name___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":852 + * cdef readonly unsigned int handle + * cdef readonly str name + * cdef readonly int error_code # <<<<<<<<<<<<<< + * cdef readonly str error_text + * cdef readonly str error_info + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_code___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_code___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.error_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":853 + * cdef readonly str name + * cdef readonly int error_code + * cdef readonly str error_text # <<<<<<<<<<<<<< + * cdef readonly str error_info + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_text___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_text___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->error_text); + __pyx_r = __pyx_v_self->error_text; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":854 + * cdef readonly int error_code + * cdef readonly str error_text + * cdef readonly str error_info # <<<<<<<<<<<<<< + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_info___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_info___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->error_info); + __pyx_r = __pyx_v_self->error_info; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->error_info); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->name); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->source); + __Pyx_INCREF(__pyx_v_self->type); + __Pyx_GIVEREF(__pyx_v_self->type); + PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->type); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_4 = (__pyx_v__dict != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->error_info != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->error_text != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->name != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->source != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + */ + __pyx_t_5 = (__pyx_v_use_setstate != 0); + if (__pyx_t_5) { + + /* "(tree fragment)":13 + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CafeException); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_145648516); + __Pyx_GIVEREF(__pyx_int_145648516); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_145648516); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + */ + goto __pyx_L9; + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CafeException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_145648516); + __Pyx_GIVEREF(__pyx_int_145648516); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_145648516); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + __pyx_L9:; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CafeException.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":925 + * cdef readonly bint maskHasDBE_ALARM + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.monid = 0 + * # self.dataType=None + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy___cinit__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_13monitorpolicy___cinit__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":926 + * + * def __cinit__(self): + * self.monid = 0 # <<<<<<<<<<<<<< + * # self.dataType=None + * # self.dbrDataType=None + */ + __pyx_v_self->monid = 0; + + /* "PyCafeDefs.pxi":930 + * # self.dbrDataType=None + * # self.cafeDbrType=None + * self.nelem = 1 # <<<<<<<<<<<<<< + * # self.mask=None + * # self.userArgs=None + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":933 + * # self.mask=None + * # self.userArgs=None + * self.status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False + */ + __pyx_v_self->status = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":934 + * # self.userArgs=None + * self.status = ICAFE_NORMAL + * self.maskHasDBE_PROPERTY = False # <<<<<<<<<<<<<< + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False + */ + __pyx_v_self->maskHasDBE_PROPERTY = 0; + + /* "PyCafeDefs.pxi":935 + * self.status = ICAFE_NORMAL + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False # <<<<<<<<<<<<<< + * self.maskHasDBE_LOG = False + * self.maskHasDBE_ALARM = False + */ + __pyx_v_self->maskHasDBE_VALUE = 0; + + /* "PyCafeDefs.pxi":936 + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False # <<<<<<<<<<<<<< + * self.maskHasDBE_ALARM = False + * + */ + __pyx_v_self->maskHasDBE_LOG = 0; + + /* "PyCafeDefs.pxi":937 + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False + * self.maskHasDBE_ALARM = False # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_v_self->maskHasDBE_ALARM = 0; + + /* "PyCafeDefs.pxi":925 + * cdef readonly bint maskHasDBE_ALARM + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.monid = 0 + * # self.dataType=None + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":939 + * self.maskHasDBE_ALARM = False + * + * def show(self): # <<<<<<<<<<<<<< + * print("monid =", self.monid) + * print("datatype =", self.dataType) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_2show(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_2show(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":940 + * + * def show(self): + * print("monid =", self.monid) # <<<<<<<<<<<<<< + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_monid); + __Pyx_GIVEREF(__pyx_kp_u_monid); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_monid); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":941 + * def show(self): + * print("monid =", self.monid) + * print("datatype =", self.dataType) # <<<<<<<<<<<<<< + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) + */ + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_datatype); + __Pyx_GIVEREF(__pyx_kp_u_datatype); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_datatype); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":942 + * print("monid =", self.monid) + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) # <<<<<<<<<<<<<< + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) + */ + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dbrDataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_dbrDataType); + __Pyx_GIVEREF(__pyx_kp_u_dbrDataType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_dbrDataType); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":943 + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) # <<<<<<<<<<<<<< + * print("nelem =", self.nelem) + * print("mask =", self.mask) + */ + __pyx_t_1 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_self->cafeDbrType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_cafeDbrType); + __Pyx_GIVEREF(__pyx_kp_u_cafeDbrType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_cafeDbrType); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":944 + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) # <<<<<<<<<<<<<< + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_nelem); + __Pyx_GIVEREF(__pyx_kp_u_nelem); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_nelem); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":945 + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) + * print("mask =", self.mask) # <<<<<<<<<<<<<< + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_mask); + __Pyx_GIVEREF(__pyx_kp_u_mask); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_mask); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":946 + * print("nelem =", self.nelem) + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) # <<<<<<<<<<<<<< + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + */ + __pyx_t_1 = __Pyx_PyInt_From_long(((long)__pyx_v_self->userArgs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_userArgs); + __Pyx_GIVEREF(__pyx_kp_u_userArgs); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_userArgs); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":947 + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) # <<<<<<<<<<<<<< + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_status); + __Pyx_GIVEREF(__pyx_kp_u_status); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_status); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":948 + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) # <<<<<<<<<<<<<< + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_PROPERTY); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_PROPERTY); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_PROPERTY); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":949 + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) # <<<<<<<<<<<<<< + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_VALUE); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_VALUE); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_VALUE); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":950 + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) # <<<<<<<<<<<<<< + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + * return + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_LOG); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_LOG); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_LOG); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":951 + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_ALARM); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_ALARM); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_ALARM); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":952 + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":939 + * self.maskHasDBE_ALARM = False + * + * def show(self): # <<<<<<<<<<<<<< + * print("monid =", self.monid) + * print("datatype =", self.dataType) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.monitorpolicy.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":910 + * + * cdef class monitorpolicy: + * cdef readonly chtype dataType # <<<<<<<<<<<<<< + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":911 + * cdef class monitorpolicy: + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType # <<<<<<<<<<<<<< + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dbrDataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.dbrDataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":912 + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly unsigned int mask + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_self->cafeDbrType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.cafeDbrType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":913 + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly unsigned int mask + * # cdef readonly pCallback handler + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":914 + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem + * cdef readonly unsigned int mask # <<<<<<<<<<<<<< + * # cdef readonly pCallback handler + * cdef readonly unsigned int userArgs + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":916 + * cdef readonly unsigned int mask + * # cdef readonly pCallback handler + * cdef readonly unsigned int userArgs # <<<<<<<<<<<<<< + * # cdef readonly evid eventID + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->userArgs); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.userArgs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":918 + * cdef readonly unsigned int userArgs + * # cdef readonly evid eventID + * cdef readonly int status # <<<<<<<<<<<<<< + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_6status___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6status___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":919 + * # cdef readonly evid eventID + * cdef readonly int status + * cdef readonly unsigned int monid # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.monid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":920 + * cdef readonly int status + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_PROPERTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":921 + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_LOG + * cdef readonly bint maskHasDBE_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":922 + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_ALARM + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_LOG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":923 + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG + * cdef readonly bint maskHasDBE_ALARM # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":974 + * + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6pvdata___cinit__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata___cinit__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":975 + * + * def __cinit__(self): + * self.nelem = 1 # <<<<<<<<<<<<<< + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":976 + * def __cinit__(self): + * self.nelem = 1 + * self.alarmStatus = -1 # <<<<<<<<<<<<<< + * self.alarmSeverity = -1 + * self.ts = [] + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":977 + * self.nelem = 1 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 # <<<<<<<<<<<<<< + * self.ts = [] + * self.tsDate = [] + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":978 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + * self.ts = [] # <<<<<<<<<<<<<< + * self.tsDate = [] + * self.tsDateAsString = '' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->ts); + __Pyx_DECREF(__pyx_v_self->ts); + __pyx_v_self->ts = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":979 + * self.alarmSeverity = -1 + * self.ts = [] + * self.tsDate = [] # <<<<<<<<<<<<<< + * self.tsDateAsString = '' + * self.bsDateAsString = '' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->tsDate); + __Pyx_DECREF(__pyx_v_self->tsDate); + __pyx_v_self->tsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":980 + * self.ts = [] + * self.tsDate = [] + * self.tsDateAsString = '' # <<<<<<<<<<<<<< + * self.bsDateAsString = '' + * self.value = [] + */ + __Pyx_INCREF(__pyx_kp_u__3); + __Pyx_GIVEREF(__pyx_kp_u__3); + __Pyx_GOTREF(__pyx_v_self->tsDateAsString); + __Pyx_DECREF(__pyx_v_self->tsDateAsString); + __pyx_v_self->tsDateAsString = __pyx_kp_u__3; + + /* "PyCafeDefs.pxi":981 + * self.tsDate = [] + * self.tsDateAsString = '' + * self.bsDateAsString = '' # <<<<<<<<<<<<<< + * self.value = [] + * self.status = 1 + */ + __Pyx_INCREF(__pyx_kp_u__3); + __Pyx_GIVEREF(__pyx_kp_u__3); + __Pyx_GOTREF(__pyx_v_self->bsDateAsString); + __Pyx_DECREF(__pyx_v_self->bsDateAsString); + __pyx_v_self->bsDateAsString = __pyx_kp_u__3; + + /* "PyCafeDefs.pxi":982 + * self.tsDateAsString = '' + * self.bsDateAsString = '' + * self.value = [] # <<<<<<<<<<<<<< + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":983 + * self.bsDateAsString = '' + * self.value = [] + * self.status = 1 # <<<<<<<<<<<<<< + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":984 + * self.value = [] + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' # <<<<<<<<<<<<<< + * self.pulseID = 0 + * self.dataType = -1 + */ + __Pyx_INCREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GIVEREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = __pyx_n_u_ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":985 + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 # <<<<<<<<<<<<<< + * self.dataType = -1 + * self.dataTypeAsString = "" + */ + __pyx_v_self->pulseID = 0; + + /* "PyCafeDefs.pxi":986 + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 + * self.dataType = -1 # <<<<<<<<<<<<<< + * self.dataTypeAsString = "" + * + */ + __pyx_v_self->dataType = -1; + + /* "PyCafeDefs.pxi":987 + * self.pulseID = 0 + * self.dataType = -1 + * self.dataTypeAsString = "" # <<<<<<<<<<<<<< + * + * def show(self): + */ + __Pyx_INCREF(__pyx_kp_u__3); + __Pyx_GIVEREF(__pyx_kp_u__3); + __Pyx_GOTREF(__pyx_v_self->dataTypeAsString); + __Pyx_DECREF(__pyx_v_self->dataTypeAsString); + __pyx_v_self->dataTypeAsString = __pyx_kp_u__3; + + /* "PyCafeDefs.pxi":974 + * + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":989 + * self.dataTypeAsString = "" + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_2show(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_2show(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":990 + * + * def show(self): + * self.showPrint(self.nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvdata *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 990, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":991 + * def show(self): + * self.showPrint(self.nelem) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":989 + * self.dataTypeAsString = "" + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvdata.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":993 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_4showMax(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_nelem)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_4showMax(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":994 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_nelem, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 994, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 994, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":998 + * # print ("Note: Max. Nelem =", self.nelem + * # print ("----------------------" + * nelem = self.nelem # <<<<<<<<<<<<<< + * + * self.showPrint(nelem) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":994 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":1000 + * nelem = self.nelem + * + * self.showPrint(nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvdata *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v_nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1001 + * + * self.showPrint(nelem) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":993 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvdata.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_nelem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1003 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + +static PyObject *__pyx_f_6PyCafe_6pvdata_showPrint(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem) { + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + long __pyx_t_9; + long __pyx_t_10; + unsigned int __pyx_t_11; + Py_ssize_t __pyx_t_12; + Py_UCS4 __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":1007 + * # is self.value[0] a list + * + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1007, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1008 + * + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1008, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1009 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_value_4, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1010 + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * else: + * print("value = {} ({})".format( + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1010, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_self->dataTypeAsString}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_self->dataTypeAsString}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __Pyx_GIVEREF(__pyx_v_self->dataTypeAsString); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_self->dataTypeAsString); + __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1009 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1010 + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * else: + * print("value = {} ({})".format( + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 1010, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1009 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1008 + * + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":1012 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_value_4, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":1013 + * else: + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * print("") + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1013, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_self->dataTypeAsString}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_self->dataTypeAsString}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __Pyx_GIVEREF(__pyx_v_self->dataTypeAsString); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_self->dataTypeAsString); + __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1012 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1013 + * else: + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * print("") + * else: + */ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 1013, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1012 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":1014 + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") + * print("") # <<<<<<<<<<<<<< + * else: + * print("value = ", end="") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1007 + * # is self.value[0] a list + * + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1016 + * print("") + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 1016, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__19, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1018 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1018, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyList_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1019 + * + * if isinstance(self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + */ + __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1019, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafeDefs.pxi":1020 + * if isinstance(self.value[0], list): + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * else: + * for i in range(0, nelem): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1020, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 1020, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafeDefs.pxi":1018 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1022 + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[i], "[%d]" % i, end=" ") + * print("({0})".format(self.dataTypeAsString)) + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1022, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafeDefs.pxi":1023 + * else: + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * print("({0})".format(self.dataTypeAsString)) + * + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1023, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8); + __pyx_t_5 = 0; + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 1023, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __pyx_L5:; + + /* "PyCafeDefs.pxi":1024 + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") + * print("({0})".format(self.dataTypeAsString)) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_v_self->dataTypeAsString) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_self->dataTypeAsString); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1027 + * + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) # <<<<<<<<<<<<<< + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_status_2); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_status_2); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_status_2); + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->statusAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__5); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1028 + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + */ + __pyx_t_2 = ((__pyx_v_self->alarmStatus != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1029 + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmStatus); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmStatus); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_alarmStatus); + + /* "PyCafeDefs.pxi":1030 + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->alarmStatus, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->alarmStatusAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1029 + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1031 + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmSeverity); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmSeverity); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_alarmSeverity); + + /* "PyCafeDefs.pxi":1032 + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) # <<<<<<<<<<<<<< + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->alarmSeverity, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->alarmSeverityAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1031 + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1028 + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + */ + } + + /* "PyCafeDefs.pxi":1033 + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) # <<<<<<<<<<<<<< + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], + */ + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1033, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1033, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_kp_u_ts); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __pyx_t_8 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1034 + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], # <<<<<<<<<<<<<< + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1034, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1034, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":1035 + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], # <<<<<<<<<<<<<< + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1035, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1035, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1036 + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) # <<<<<<<<<<<<<< + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1036, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1036, __pyx_L1_error) + } + __pyx_t_14 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1036, __pyx_L1_error) + } + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + + /* "PyCafeDefs.pxi":1034 + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], # <<<<<<<<<<<<<< + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + */ + __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_15); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_t_8 = 0; + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1037 + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: # <<<<<<<<<<<<<< + * print("pulseID =", self.pulseID) + * return + */ + __pyx_t_2 = ((__pyx_v_self->pulseID > 0) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1038 + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_15 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulseID); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_pulseID); + __Pyx_GIVEREF(__pyx_kp_u_pulseID); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_pulseID); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15); + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1037 + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: # <<<<<<<<<<<<<< + * print("pulseID =", self.pulseID) + * return + */ + } + + /* "PyCafeDefs.pxi":1039 + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1003 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.pvdata.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":957 + * ################################################################################## + * cdef class pvdata: + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_5nelem___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_5nelem___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":958 + * cdef class pvdata: + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus # <<<<<<<<<<<<<< + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.alarmStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":959 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.alarmSeverity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":960 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString # <<<<<<<<<<<<<< + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->alarmStatusAsString); + __pyx_r = __pyx_v_self->alarmStatusAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":961 + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString # <<<<<<<<<<<<<< + * cdef readonly list ts + * cdef readonly list tsDate + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->alarmSeverityAsString); + __pyx_r = __pyx_v_self->alarmSeverityAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":962 + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts # <<<<<<<<<<<<<< + * cdef readonly list tsDate + * cdef readonly str tsDateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_2ts_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_2ts_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_2ts___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_2ts___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->ts); + __pyx_r = __pyx_v_self->ts; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":963 + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts + * cdef readonly list tsDate # <<<<<<<<<<<<<< + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6tsDate___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6tsDate___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->tsDate); + __pyx_r = __pyx_v_self->tsDate; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":964 + * cdef readonly list ts + * cdef readonly list tsDate + * cdef readonly str tsDateAsString # <<<<<<<<<<<<<< + * cdef readonly str bsDateAsString + * cdef readonly list value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->tsDateAsString); + __pyx_r = __pyx_v_self->tsDateAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":965 + * cdef readonly list tsDate + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString # <<<<<<<<<<<<<< + * cdef readonly list value + * cdef public int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->bsDateAsString); + __pyx_r = __pyx_v_self->bsDateAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":966 + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef public int status + * cdef public str statusAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5value_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_5value___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_5value___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":967 + * cdef readonly str bsDateAsString + * cdef readonly list value + * cdef public int status # <<<<<<<<<<<<<< + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6status___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6status___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6status_2__set__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_6status_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 967, __pyx_L1_error) + __pyx_v_self->status = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvdata.status.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":968 + * cdef readonly list value + * cdef public int status + * cdef public str statusAsString # <<<<<<<<<<<<<< + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->statusAsString); + __pyx_r = __pyx_v_self->statusAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__set__", 0); + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 968, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.statusAsString.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":969 + * cdef public int status + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID # <<<<<<<<<<<<<< + * cdef readonly int dataType + * cdef readonly str dataTypeAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_7pulseID___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_7pulseID___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulseID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.pulseID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":970 + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType # <<<<<<<<<<<<<< + * cdef readonly str dataTypeAsString + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_8dataType___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_8dataType___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":971 + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType + * cdef readonly str dataTypeAsString # <<<<<<<<<<<<<< + * + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __pyx_r = __pyx_v_self->dataTypeAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1055 + * cpdef public bint hasTS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_7pvgroup___cinit__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup___cinit__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":1056 + * + * def __cinit__(self): + * self.groupStatus = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.rule = True + * self.hasAlarm = True + */ + __pyx_v_self->groupStatus = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":1057 + * def __cinit__(self): + * self.groupStatus = ICAFE_NORMAL + * self.rule = True # <<<<<<<<<<<<<< + * self.hasAlarm = True + * self.hasTS = True + */ + __pyx_v_self->rule = 1; + + /* "PyCafeDefs.pxi":1058 + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + * self.hasAlarm = True # <<<<<<<<<<<<<< + * self.hasTS = True + * + */ + __pyx_v_self->hasAlarm = 1; + + /* "PyCafeDefs.pxi":1059 + * self.rule = True + * self.hasAlarm = True + * self.hasTS = True # <<<<<<<<<<<<<< + * + * return + */ + __pyx_v_self->hasTS = 1; + + /* "PyCafeDefs.pxi":1061 + * self.hasTS = True + * + * return # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1055 + * cpdef public bint hasTS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + */ + + /* function exit code */ + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1063 + * return + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(npv=self.npv, grouplist=None) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_2show(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_2show(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":1064 + * + * def show(self): + * self.showPrint(npv=self.npv, grouplist=None) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1065 + * def show(self): + * self.showPrint(npv=self.npv, grouplist=None) + * return # <<<<<<<<<<<<<< + * + * def showWithPV(self, glist): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1063 + * return + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(npv=self.npv, grouplist=None) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvgroup.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1067 + * return + * + * def showWithPV(self, glist): # <<<<<<<<<<<<<< + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5showWithPV(PyObject *__pyx_v_self, PyObject *__pyx_v_glist); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5showWithPV(PyObject *__pyx_v_self, PyObject *__pyx_v_glist) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showWithPV (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4showWithPV(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_glist)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4showWithPV(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_glist) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("showWithPV", 0); + + /* "PyCafeDefs.pxi":1068 + * + * def showWithPV(self, glist): + * if len(glist) != self.npv: # <<<<<<<<<<<<<< + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + */ + __pyx_t_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1068, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->npv) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1069 + * def showWithPV(self, glist): + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") # <<<<<<<<<<<<<< + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1070 + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), # <<<<<<<<<<<<<< + * "members while group has", self.npv, "!!") + * return + */ + __pyx_t_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1070, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafeDefs.pxi":1071 + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") # <<<<<<<<<<<<<< + * return + * self.showPrint(self.npv, grouplist=glist) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1070 + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), # <<<<<<<<<<<<<< + * "members while group has", self.npv, "!!") + * return + */ + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_glist); + __Pyx_GIVEREF(__pyx_v_glist); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_glist); + __Pyx_INCREF(__pyx_n_u_has); + __Pyx_GIVEREF(__pyx_n_u_has); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_has); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_members_while_group_has); + __Pyx_GIVEREF(__pyx_kp_u_members_while_group_has); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u_members_while_group_has); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u__23); + __Pyx_GIVEREF(__pyx_kp_u__23); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__23); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1072 + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + * return # <<<<<<<<<<<<<< + * self.showPrint(self.npv, grouplist=glist) + * return + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1068 + * + * def showWithPV(self, glist): + * if len(glist) != self.npv: # <<<<<<<<<<<<<< + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + */ + } + + /* "PyCafeDefs.pxi":1073 + * "members while group has", self.npv, "!!") + * return + * self.showPrint(self.npv, grouplist=glist) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_4, __pyx_v_glist); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1074 + * return + * self.showPrint(self.npv, grouplist=glist) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, _npv): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1067 + * return + * + * def showWithPV(self, glist): # <<<<<<<<<<<<<< + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.pvgroup.showWithPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1076 + * return + * + * def showMax(self, _npv): # <<<<<<<<<<<<<< + * if _npv > self.npv: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_7showMax(PyObject *__pyx_v_self, PyObject *__pyx_v__npv); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_7showMax(PyObject *__pyx_v_self, PyObject *__pyx_v__npv) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6showMax(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v__npv)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6showMax(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v__npv) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v__npv); + + /* "PyCafeDefs.pxi":1077 + * + * def showMax(self, _npv): + * if _npv > self.npv: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Npv =", self.npv + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v__npv, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1077, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1077, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1081 + * # print ("Note: Max. Npv =", self.npv + * # print ("----------------------" + * _npv = self.npv # <<<<<<<<<<<<<< + * self.showPrint(npv=_npv, grouplist=None) + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v__npv, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1077 + * + * def showMax(self, _npv): + * if _npv > self.npv: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Npv =", self.npv + */ + } + + /* "PyCafeDefs.pxi":1082 + * # print ("----------------------" + * _npv = self.npv + * self.showPrint(npv=_npv, grouplist=None) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v__npv, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1083 + * _npv = self.npv + * self.showPrint(npv=_npv, grouplist=None) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, npv, grouplist): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1076 + * return + * + * def showMax(self, _npv): # <<<<<<<<<<<<<< + * if _npv > self.npv: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvgroup.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__npv); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1085 + * return + * + * cdef showPrint(self, npv, grouplist): # <<<<<<<<<<<<<< + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + */ + +static PyObject *__pyx_f_6PyCafe_7pvgroup_showPrint(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_npv, PyObject *__pyx_v_grouplist) { + unsigned int __pyx_v_i; + unsigned int __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + long __pyx_t_3; + long __pyx_t_4; + unsigned int __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_UCS4 __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":1086 + * + * cdef showPrint(self, npv, grouplist): + * print("GROUP NAME = ", self.name) # <<<<<<<<<<<<<< + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_NAME); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_NAME); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_NAME); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1087 + * cdef showPrint(self, npv, grouplist): + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) # <<<<<<<<<<<<<< + * print("GROUP STATUS = ", self.groupStatus) + * print("No. Members = ", self.npv) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->groupHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_HANDLE); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_HANDLE); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_HANDLE); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1088 + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) # <<<<<<<<<<<<<< + * print("No. Members = ", self.npv) + * cdef unsigned int i, j + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->groupStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_STATUS); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_STATUS); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_STATUS); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1089 + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) + * print("No. Members = ", self.npv) # <<<<<<<<<<<<<< + * cdef unsigned int i, j + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_No_Members); + __Pyx_GIVEREF(__pyx_kp_u_No_Members); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_No_Members); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1092 + * cdef unsigned int i, j + * + * for i in range(0, npv): # <<<<<<<<<<<<<< + * print("Member: ", i, "---------------------------------") + * if grouplist: + */ + __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_v_npv); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1092, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1093 + * + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") # <<<<<<<<<<<<<< + * if grouplist: + * print("PV =", grouplist[i]) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_Member); + __Pyx_GIVEREF(__pyx_kp_u_Member); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Member); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u__24); + __Pyx_GIVEREF(__pyx_kp_u__24); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__24); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1094 + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print("PV =", grouplist[i]) + * + */ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_grouplist); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 1094, __pyx_L1_error) + if (__pyx_t_6) { + + /* "PyCafeDefs.pxi":1095 + * print("Member: ", i, "---------------------------------") + * if grouplist: + * print("PV =", grouplist[i]) # <<<<<<<<<<<<<< + * + * print("value = ", end="") + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_grouplist, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_PV); + __Pyx_GIVEREF(__pyx_kp_u_PV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_PV); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1094 + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print("PV =", grouplist[i]) + * + */ + } + + /* "PyCafeDefs.pxi":1097 + * print("PV =", grouplist[i]) + * + * print("value = ", end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__3) < 0) __PYX_ERR(2, 1097, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1098 + * + * print("value = ", end="") + * for j in range(0, len(self.pvdata[i].value)): # <<<<<<<<<<<<<< + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + * + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1098, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_j = __pyx_t_9; + + /* "PyCafeDefs.pxi":1099 + * print("value = ", end="") + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") # <<<<<<<<<<<<<< + * + * print("") + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1099, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_j, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10); + __pyx_t_1 = 0; + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_end, __pyx_kp_u__10) < 0) __PYX_ERR(2, 1099, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1101 + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + * + * print("") # <<<<<<<<<<<<<< + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1102 + * + * print("") + * print("status = %d (%s)" % # <<<<<<<<<<<<<< + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_status_2); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_status_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_status_2); + + /* "PyCafeDefs.pxi":1103 + * print("") + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1103, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_status_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1103, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_statusAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1102 + * + * print("") + * print("status = %d (%s)" % # <<<<<<<<<<<<<< + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1104 + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmStatus); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmStatus); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_alarmStatus); + + /* "PyCafeDefs.pxi":1105 + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1105, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmStatus_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1105, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmStatusAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1104 + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1106 + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmSeverity); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmSeverity); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_alarmSeverity); + + /* "PyCafeDefs.pxi":1107 + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) # <<<<<<<<<<<<<< + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1107, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmSeverity_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1107, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmSeverityAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1106 + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1109 + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) # <<<<<<<<<<<<<< + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1109, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1109, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1108 + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", # <<<<<<<<<<<<<< + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + */ + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_kp_u_ts); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10); + __pyx_t_1 = 0; + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafeDefs.pxi":1110 + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1110, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1110, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1111 + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1111, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1111, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_13, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "PyCafeDefs.pxi":1112 + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) # <<<<<<<<<<<<<< + * print("--------------------------------------------") + * return + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1112, __pyx_L1_error) + } + __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_14, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1112, __pyx_L1_error) + } + __pyx_t_14 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_15, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1112, __pyx_L1_error) + } + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_16, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafeDefs.pxi":1110 + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + */ + __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_15); + __pyx_t_10 = 0; + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_12 = 0; + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1113 + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + + /* "PyCafeDefs.pxi":1114 + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1085 + * return + * + * cdef showPrint(self, npv, grouplist): # <<<<<<<<<<<<<< + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.pvgroup.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1046 + * ################################################################################## + * cdef class pvgroup: + * cdef public list pvdata # <<<<<<<<<<<<<< + * cdef public unsigned int npv + * cdef public string name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pvdata); + __pyx_r = __pyx_v_self->pvdata; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__set__", 0); + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 1046, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pvdata); + __Pyx_DECREF(__pyx_v_self->pvdata); + __pyx_v_self->pvdata = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.pvdata.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pvdata); + __Pyx_DECREF(__pyx_v_self->pvdata); + __pyx_v_self->pvdata = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1047 + * cdef class pvgroup: + * cdef public list pvdata + * cdef public unsigned int npv # <<<<<<<<<<<<<< + * cdef public string name + * cdef readonly int groupStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_3npv___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_3npv___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.npv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1047, __pyx_L1_error) + __pyx_v_self->npv = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.npv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1048 + * cdef public list pvdata + * cdef public unsigned int npv + * cdef public string name # <<<<<<<<<<<<<< + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4name_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4name___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4name___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + std::string __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1048, __pyx_L1_error) + __pyx_v_self->name = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1049 + * cdef public unsigned int npv + * cdef public string name + * cdef readonly int groupStatus # <<<<<<<<<<<<<< + * cdef public unsigned int groupHandle + * cpdef public bint rule + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->groupStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.groupStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1050 + * cdef public string name + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle # <<<<<<<<<<<<<< + * cpdef public bint rule + * cpdef public bint hasAlarm + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->groupHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.groupHandle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1050, __pyx_L1_error) + __pyx_v_self->groupHandle = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.groupHandle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1051 + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle + * cpdef public bint rule # <<<<<<<<<<<<<< + * cpdef public bint hasAlarm + * cpdef public bint hasTS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4rule___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4rule___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rule); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.rule.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1051, __pyx_L1_error) + __pyx_v_self->rule = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.rule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1052 + * cdef public unsigned int groupHandle + * cpdef public bint rule + * cpdef public bint hasAlarm # <<<<<<<<<<<<<< + * cpdef public bint hasTS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasAlarm); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.hasAlarm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1052, __pyx_L1_error) + __pyx_v_self->hasAlarm = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.hasAlarm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1053 + * cpdef public bint rule + * cpdef public bint hasAlarm + * cpdef public bint hasTS # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.hasTS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1053, __pyx_L1_error) + __pyx_v_self->hasTS = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.hasTS.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1121 + * + * ################################################################################## + * cdef getMatchedDataType(dt, dtn): # <<<<<<<<<<<<<< + * # dt: input from user + * # dtn: native type + */ + +static PyObject *__pyx_f_6PyCafe_getMatchedDataType(PyObject *__pyx_v_dt, PyObject *__pyx_v_dtn) { + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("getMatchedDataType", 0); + + /* "PyCafeDefs.pxi":1126 + * # dtcheck: matching data type for pvd convert method + * + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * + * if dt in ['uchar', 'uint8']: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_dtn); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1126, __pyx_L1_error) + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1128 + * cdef unsigned int dtcheck = dtn + * + * if dt in ['uchar', 'uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1128, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1128, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1129 + * + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR # <<<<<<<<<<<<<< + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + */ + __pyx_v_dtcheck = CAFE_CHAR; + + /* "PyCafeDefs.pxi":1128 + * cdef unsigned int dtcheck = dtn + * + * if dt in ['uchar', 'uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1130 + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1131 + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR # <<<<<<<<<<<<<< + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + */ + __pyx_v_dtcheck = CAFE_CHAR; + + /* "PyCafeDefs.pxi":1130 + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1132 + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1132, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1132, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1133 + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT # <<<<<<<<<<<<<< + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + */ + __pyx_v_dtcheck = CAFE_USHORT; + + /* "PyCafeDefs.pxi":1132 + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1134 + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1134, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1134, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1135 + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT # <<<<<<<<<<<<<< + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + */ + __pyx_v_dtcheck = CAFE_USHORT; + + /* "PyCafeDefs.pxi":1134 + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1136 + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1136, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1136, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1136, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1136, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1136, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L10_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1137 + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT # <<<<<<<<<<<<<< + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + */ + __pyx_v_dtcheck = CAFE_SHORT; + + /* "PyCafeDefs.pxi":1136 + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1138 + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1138, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1138, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1138, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1138, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1138, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1139 + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT # <<<<<<<<<<<<<< + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + */ + __pyx_v_dtcheck = CAFE_SHORT; + + /* "PyCafeDefs.pxi":1138 + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1140 + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1140, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L20_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1141 + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG # <<<<<<<<<<<<<< + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + */ + __pyx_v_dtcheck = CAFE_LONG; + + /* "PyCafeDefs.pxi":1140 + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1142 + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_intc, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_long, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1142, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L26_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1143 + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG # <<<<<<<<<<<<<< + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + */ + __pyx_v_dtcheck = CAFE_LONG; + + /* "PyCafeDefs.pxi":1142 + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1144 + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_double, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1144, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L32_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1145 + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + */ + __pyx_v_dtcheck = CAFE_DOUBLE; + + /* "PyCafeDefs.pxi":1144 + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1146 + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_long, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ulong, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1146, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L38_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1147 + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + */ + __pyx_v_dtcheck = CAFE_DOUBLE; + + /* "PyCafeDefs.pxi":1146 + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1148 + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1148, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1148, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L44_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1149 + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + */ + __pyx_v_dtcheck = CAFE_FLOAT; + + /* "PyCafeDefs.pxi":1148 + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1150 + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1150, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L46_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1150, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L46_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1151 + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + */ + __pyx_v_dtcheck = CAFE_FLOAT; + + /* "PyCafeDefs.pxi":1150 + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1152 + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_string, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_str, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_unicode, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_string_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_str_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_unicode_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1152, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L48_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1153 + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING # <<<<<<<<<<<<<< + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + */ + __pyx_v_dtcheck = CAFE_STRING; + + /* "PyCafeDefs.pxi":1152 + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1154 + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_string, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_str, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_unicode, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_string_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_str_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_unicode_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1154, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L54_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1155 + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING # <<<<<<<<<<<<<< + * elif dt in ['native', '']: + * dtcheck = dtn # need a line here + */ + __pyx_v_dtcheck = CAFE_STRING; + + /* "PyCafeDefs.pxi":1154 + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1156 + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: # <<<<<<<<<<<<<< + * dtcheck = dtn # need a line here + * else: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_native, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1156, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1156, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L60_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1157 + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + * dtcheck = dtn # need a line here # <<<<<<<<<<<<<< + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_dtn); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1157, __pyx_L1_error) + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1156 + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: # <<<<<<<<<<<<<< + * dtcheck = dtn # need a line here + * else: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1159 + * dtcheck = dtn # need a line here + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") # <<<<<<<<<<<<<< + * print("Data to be presented in native data type") + * + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1160 + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + * print("Data to be presented in native data type") # <<<<<<<<<<<<<< + * + * return dtcheck + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1162 + * print("Data to be presented in native data type") + * + * return dtcheck # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1121 + * + * ################################################################################## + * cdef getMatchedDataType(dt, dtn): # <<<<<<<<<<<<<< + * # dt: input from user + * # dtn: native type + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.getMatchedDataType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1174 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ + +static struct __pyx_obj_6PyCafe_pvdata *__pyx_f_6PyCafe_PVDataHolderToStruct(PVDataHolder __pyx_v_pvd, struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct *__pyx_optional_args) { + PyObject *__pyx_v_dt = ((PyObject *)Py_None); + CAFEDataTypeCode __pyx_v_cdt; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localList = 0; + long __pyx_v_i; + PyObject *__pyx_v_ll = 0; + PyObject *__pyx_v_ld = 0; + struct __pyx_obj_6PyCafe_pvdata *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + long __pyx_t_6; + int __pyx_t_7; + __Pyx_RefNannySetupContext("PVDataHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1178 + * cdef CAFEDataTypeCode cdt + * #global p1 + * cdef pvdata p1 = pvdata() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn = pvd.getDataType() + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_p1 = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1180 + * cdef pvdata p1 = pvdata() + * + * cdef unsigned int dtn = pvd.getDataType() # <<<<<<<<<<<<<< + * cdef unsigned int dtcheck = dtn + * cdef localList = [] + */ + __pyx_v_dtn = __pyx_v_pvd.getDataType(); + + /* "PyCafeDefs.pxi":1181 + * + * cdef unsigned int dtn = pvd.getDataType() + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * cdef localList = [] + * + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1182 + * cdef unsigned int dtn = pvd.getDataType() + * cdef unsigned int dtcheck = dtn + * cdef localList = [] # <<<<<<<<<<<<<< + * + * if dt: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1184 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1184, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1185 + * + * if dt: + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if dtcheck == CAFE_STRING: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1184 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1187 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafeDefs.pxi":1188 + * + * if dtcheck == CAFE_STRING: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsString(i)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1189 + * if dtcheck == CAFE_STRING: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvd.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1187 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) + */ + break; + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1191 + * localList.append(pvd.getAsString(i)) + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1192 + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1190 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + */ + break; + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1194 + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1195 + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvd.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1193 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + */ + break; + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1199 + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsString(i)) + * # else: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1200 + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) # <<<<<<<<<<<<<< + * # else: + * # for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvd.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1196 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + */ + break; + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1205 + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1207 + * for i in range(0, pvd.getNelem()): + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1207, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1204 + * # for i in range(0, pvd.getNelem()): + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * # pvd.getAsChar(i) + */ + break; + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1209 + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1210 + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1208 + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1212 + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsDouble(i)) + * else: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1213 + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvd.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1211 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) + */ + break; + default: + + /* "PyCafeDefs.pxi":1215 + * localList.append(pvd.getAsDouble(i)) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + */ + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1215, __pyx_L1_error) + break; + } + + /* "PyCafeDefs.pxi":1219 + * # print ("No Data! Error. Is channel connected?" + * + * p1.value = localList # <<<<<<<<<<<<<< + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() + */ + if (!(likely(PyList_CheckExact(__pyx_v_localList))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_localList)->tp_name), 0))) __PYX_ERR(2, 1219, __pyx_L1_error) + __pyx_t_3 = __pyx_v_localList; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1220 + * + * p1.value = localList + * p1.status = pvd.getStatus() # <<<<<<<<<<<<<< + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() + */ + __pyx_v_p1->status = __pyx_v_pvd.getStatus(); + + /* "PyCafeDefs.pxi":1221 + * p1.value = localList + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() # <<<<<<<<<<<<<< + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getStatusAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->statusAsString); + __Pyx_DECREF(__pyx_v_p1->statusAsString); + __pyx_v_p1->statusAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1222 + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() # <<<<<<<<<<<<<< + * p1.alarmStatus = pvd.getAlarmStatus() + * p1.alarmSeverity = pvd.getAlarmSeverity() + */ + __pyx_v_p1->nelem = __pyx_v_pvd.getNelem(); + + /* "PyCafeDefs.pxi":1223 + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity = pvd.getAlarmSeverity() + * + */ + __pyx_v_p1->alarmStatus = __pyx_v_pvd.getAlarmStatus(); + + /* "PyCafeDefs.pxi":1224 + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() + * p1.alarmSeverity = pvd.getAlarmSeverity() # <<<<<<<<<<<<<< + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + */ + __pyx_v_p1->alarmSeverity = __pyx_v_pvd.getAlarmSeverity(); + + /* "PyCafeDefs.pxi":1226 + * p1.alarmSeverity = pvd.getAlarmSeverity() + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() # <<<<<<<<<<<<<< + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + * + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getAlarmStatusAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->alarmStatusAsString); + __Pyx_DECREF(__pyx_v_p1->alarmStatusAsString); + __pyx_v_p1->alarmStatusAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1227 + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() # <<<<<<<<<<<<<< + * + * p1.pulseID = pvd.getPulseID() + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getAlarmSeverityAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->alarmSeverityAsString); + __Pyx_DECREF(__pyx_v_p1->alarmSeverityAsString); + __pyx_v_p1->alarmSeverityAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1229 + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + * + * p1.pulseID = pvd.getPulseID() # <<<<<<<<<<<<<< + * + * p1.dataType = pvd.getDataType() + */ + __pyx_v_p1->pulseID = __pyx_v_pvd.getPulseID(); + + /* "PyCafeDefs.pxi":1231 + * p1.pulseID = pvd.getPulseID() + * + * p1.dataType = pvd.getDataType() # <<<<<<<<<<<<<< + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * + */ + __pyx_v_p1->dataType = __pyx_v_pvd.getDataType(); + + /* "PyCafeDefs.pxi":1232 + * + * p1.dataType = pvd.getDataType() + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) # <<<<<<<<<<<<<< + * + * p1.tsDateAsString = pvd.getEpicsTimeStampAsString() + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cdt.message(__pyx_v_pvd.getDataType())); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->dataTypeAsString); + __Pyx_DECREF(__pyx_v_p1->dataTypeAsString); + __pyx_v_p1->dataTypeAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1234 + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * + * p1.tsDateAsString = pvd.getEpicsTimeStampAsString() # <<<<<<<<<<<<<< + * p1.bsDateAsString = pvd.getBSTimeStampAsString() + * + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getEpicsTimeStampAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->tsDateAsString); + __Pyx_DECREF(__pyx_v_p1->tsDateAsString); + __pyx_v_p1->tsDateAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1235 + * + * p1.tsDateAsString = pvd.getEpicsTimeStampAsString() + * p1.bsDateAsString = pvd.getBSTimeStampAsString() # <<<<<<<<<<<<<< + * + * pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() + */ + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getBSTimeStampAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->bsDateAsString); + __Pyx_DECREF(__pyx_v_p1->bsDateAsString); + __pyx_v_p1->bsDateAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1237 + * p1.bsDateAsString = pvd.getBSTimeStampAsString() + * + * pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * cpdef ll = [] + */ + __pyx_v_pvd._etsNorm = __pyx_v_pvd.getEpicsTimeStampAsUInt32(); + + /* "PyCafeDefs.pxi":1239 + * pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() + * + * cpdef ll = [] # <<<<<<<<<<<<<< + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1240 + * + * cpdef ll = [] + * ll.append((pvd._etsNorm).secPastEpoch) # <<<<<<<<<<<<<< + * ll.append((pvd._etsNorm).nsec) + * p1.ts = ll + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvd._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1241 + * cpdef ll = [] + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) # <<<<<<<<<<<<<< + * p1.ts = ll + * + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvd._etsNorm.nsec); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1242 + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) + * p1.ts = ll # <<<<<<<<<<<<<< + * + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() + */ + if (!(likely(PyList_CheckExact(__pyx_v_ll))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ll)->tp_name), 0))) __PYX_ERR(2, 1242, __pyx_L1_error) + __pyx_t_3 = __pyx_v_ll; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1244 + * p1.ts = ll + * + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * cpdef ld = [] + */ + __pyx_v_pvd._etsDate = __pyx_v_pvd.getEpicsTimeStampAsDate(); + + /* "PyCafeDefs.pxi":1246 + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() + * + * cpdef ld = [] # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ld = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1247 + * + * cpdef ld = [] + * ld.append((pvd._etsDate).year) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.year); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1248 + * cpdef ld = [] + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.mon); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1249 + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.day); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1250 + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1251 + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.min); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1252 + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).nsec) + * p1.tsDate = ld + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1253 + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) # <<<<<<<<<<<<<< + * p1.tsDate = ld + * + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_pvd._etsDate.nsec); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1254 + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) + * p1.tsDate = ld # <<<<<<<<<<<<<< + * + * return p1 + */ + if (!(likely(PyList_CheckExact(__pyx_v_ld))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ld)->tp_name), 0))) __PYX_ERR(2, 1254, __pyx_L1_error) + __pyx_t_3 = __pyx_v_ld; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1256 + * p1.tsDate = ld + * + * return p1 # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_p1)); + __pyx_r = __pyx_v_p1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1174 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_pvdata *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.PVDataHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1262 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ + +static struct __pyx_obj_6PyCafe_pvctrl *__pyx_f_6PyCafe_PVCtrlHolderToStruct(PVCtrlHolder __pyx_v_pvc, struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct *__pyx_optional_args) { + PyObject *__pyx_v_dt = ((PyObject *)Py_None); + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_c1 = 0; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localList = 0; + long __pyx_v_i; + PyObject *__pyx_v_enumList = NULL; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + long __pyx_t_6; + int __pyx_t_7; + short __pyx_t_8; + short __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + __Pyx_RefNannySetupContext("PVCtrlHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1265 + * + * #global c1 + * cdef pvctrl c1 = pvctrl() # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvctrl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_c1 = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1269 + * + * + * cdef unsigned int dtn = pvc.getDataType() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtn + */ + __pyx_v_dtn = __pyx_v_pvc.getDataType(); + + /* "PyCafeDefs.pxi":1271 + * cdef unsigned int dtn = pvc.getDataType() + * + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * + * cdef localList = [] + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1273 + * cdef unsigned int dtcheck = dtn + * + * cdef localList = [] # <<<<<<<<<<<<<< + * + * if dt: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1275 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1275, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1276 + * + * if dt: + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if dtcheck == CAFE_STRING: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1276, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1275 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1278 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafeDefs.pxi":1279 + * + * if dtcheck == CAFE_STRING: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsString(i)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1280 + * if dtcheck == CAFE_STRING: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvc.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1278 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) + */ + break; + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1282 + * localList.append(pvc.getAsString(i)) + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1283 + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1281 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + */ + break; + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1285 + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1286 + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1286, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1284 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + */ + break; + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1290 + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsString(i)) + * # else: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1291 + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) # <<<<<<<<<<<<<< + * # else: + * # for i in range(0, pvd.getNelem()): + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvc.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1287 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + */ + break; + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1296 + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1298 + * for i in range(0, pvc.getNelem()): + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1298, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1295 + * # for i in range(0, pvd.getNelem()): + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * # pvd.getAsChar(i) + */ + break; + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1300 + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1301 + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1299 + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1303 + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsDouble(i)) + * else: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1304 + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1302 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) + */ + break; + default: + + /* "PyCafeDefs.pxi":1306 + * localList.append(pvc.getAsDouble(i)) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + */ + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1306, __pyx_L1_error) + break; + } + + /* "PyCafeDefs.pxi":1309 + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + * c1.value = localList # <<<<<<<<<<<<<< + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() + */ + if (!(likely(PyList_CheckExact(__pyx_v_localList))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_localList)->tp_name), 0))) __PYX_ERR(2, 1309, __pyx_L1_error) + __pyx_t_3 = __pyx_v_localList; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->value); + __Pyx_DECREF(__pyx_v_c1->value); + __pyx_v_c1->value = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1310 + * # print ("No Data! Error. Is channel connected?" + * c1.value = localList + * c1.status = pvc.getStatus() # <<<<<<<<<<<<<< + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() + */ + __pyx_v_c1->status = __pyx_v_pvc.getStatus(); + + /* "PyCafeDefs.pxi":1311 + * c1.value = localList + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() # <<<<<<<<<<<<<< + * c1.alarmStatus = pvc.getAlarmStatus() + * c1.alarmSeverity = pvc.getAlarmSeverity() + */ + __pyx_v_c1->nelem = __pyx_v_pvc.getNelem(); + + /* "PyCafeDefs.pxi":1312 + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() # <<<<<<<<<<<<<< + * c1.alarmSeverity = pvc.getAlarmSeverity() + * + */ + __pyx_v_c1->alarmStatus = __pyx_v_pvc.getAlarmStatus(); + + /* "PyCafeDefs.pxi":1313 + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() + * c1.alarmSeverity = pvc.getAlarmSeverity() # <<<<<<<<<<<<<< + * + * c1.precision = pvc.getPrecision() + */ + __pyx_v_c1->alarmSeverity = __pyx_v_pvc.getAlarmSeverity(); + + /* "PyCafeDefs.pxi":1315 + * c1.alarmSeverity = pvc.getAlarmSeverity() + * + * c1.precision = pvc.getPrecision() # <<<<<<<<<<<<<< + * c1.noEnumStrings = pvc.getNoEnumStrings() + * + */ + __pyx_v_c1->precision = __pyx_v_pvc.getPrecision(); + + /* "PyCafeDefs.pxi":1316 + * + * c1.precision = pvc.getPrecision() + * c1.noEnumStrings = pvc.getNoEnumStrings() # <<<<<<<<<<<<<< + * + * enumList = [] + */ + __pyx_v_c1->noEnumStrings = __pyx_v_pvc.getNoEnumStrings(); + + /* "PyCafeDefs.pxi":1318 + * c1.noEnumStrings = pvc.getNoEnumStrings() + * + * enumList = [] # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNoEnumStrings()): + * enumList.append(pvc.getEnumStrings()[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_enumList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1319 + * + * enumList = [] + * for i in range(0, pvc.getNoEnumStrings()): # <<<<<<<<<<<<<< + * enumList.append(pvc.getEnumStrings()[i]) + * + */ + __pyx_t_8 = __pyx_v_pvc.getNoEnumStrings(); + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_9; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1320 + * enumList = [] + * for i in range(0, pvc.getNoEnumStrings()): + * enumList.append(pvc.getEnumStrings()[i]) # <<<<<<<<<<<<<< + * + * c1.enumStrings = enumList + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvc.getEnumStrings()[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_enumList, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 1320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1322 + * enumList.append(pvc.getEnumStrings()[i]) + * + * c1.enumStrings = enumList # <<<<<<<<<<<<<< + * + * try: + */ + __Pyx_INCREF(__pyx_v_enumList); + __Pyx_GIVEREF(__pyx_v_enumList); + __Pyx_GOTREF(__pyx_v_c1->enumStrings); + __Pyx_DECREF(__pyx_v_c1->enumStrings); + __pyx_v_c1->enumStrings = __pyx_v_enumList; + + /* "PyCafeDefs.pxi":1324 + * c1.enumStrings = enumList + * + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafeDefs.pxi":1325 + * + * try: + * c1.units = pvc.getUnits() # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * c1.units = str("") + */ + __pyx_t_3 = __Pyx_PyUnicode_FromString(__pyx_v_pvc.getUnits()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1325, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->units); + __Pyx_DECREF(__pyx_v_c1->units); + __pyx_v_c1->units = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1324 + * c1.enumStrings = enumList + * + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L25_try_end; + __pyx_L20_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1326 + * try: + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * c1.units = str("") + * + */ + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_13) { + __Pyx_AddTraceback("PyCafe.PVCtrlHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(2, 1326, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_14); + + /* "PyCafeDefs.pxi":1327 + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + * c1.units = str("") # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1327, __pyx_L22_except_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GIVEREF(__pyx_t_15); + __Pyx_GOTREF(__pyx_v_c1->units); + __Pyx_DECREF(__pyx_v_c1->units); + __pyx_v_c1->units = ((PyObject*)__pyx_t_15); + __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L21_exception_handled; + } + goto __pyx_L22_except_error; + __pyx_L22_except_error:; + + /* "PyCafeDefs.pxi":1324 + * c1.enumStrings = enumList + * + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L21_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L25_try_end:; + } + + /* "PyCafeDefs.pxi":1341 + * ''' + * + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getUpperDispLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->upperDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->upperDisplayLimit); + __pyx_v_c1->upperDisplayLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1342 + * + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getLowerDispLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->lowerDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->lowerDisplayLimit); + __pyx_v_c1->lowerDisplayLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1343 + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getUpperAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->upperAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->upperAlarmLimit); + __pyx_v_c1->upperAlarmLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1344 + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getUpperWarningLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->upperWarningLimit); + __Pyx_DECREF(__pyx_v_c1->upperWarningLimit); + __pyx_v_c1->upperWarningLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1345 + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getLowerWarningLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->lowerWarningLimit); + __Pyx_DECREF(__pyx_v_c1->lowerWarningLimit); + __pyx_v_c1->lowerWarningLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1346 + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getLowerAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->lowerAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->lowerAlarmLimit); + __pyx_v_c1->lowerAlarmLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1347 + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + * + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getUpperCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->upperControlLimit); + __Pyx_DECREF(__pyx_v_c1->upperControlLimit); + __pyx_v_c1->upperControlLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1348 + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * + * return c1 + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_pvc.getLowerCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); + __Pyx_GOTREF(__pyx_v_c1->lowerControlLimit); + __Pyx_DECREF(__pyx_v_c1->lowerControlLimit); + __pyx_v_c1->lowerControlLimit = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafeDefs.pxi":1350 + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + * + * return c1 # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_c1)); + __pyx_r = __pyx_v_c1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1262 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_pvctrl *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("PyCafe.PVCtrlHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c1); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_enumList); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1356 + * ################################################################################# + * + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): # <<<<<<<<<<<<<< + * + * cdef channelInfo ci = channelInfo() + */ + +static struct __pyx_obj_6PyCafe_channelInfo *__pyx_f_6PyCafe_channelRegaliaToStruct(ChannelRegalia __pyx_v_cr) { + struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_ci = 0; + CAFEDataTypeCode __pyx_v_cdt; + struct __pyx_obj_6PyCafe_channelInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("channelRegaliaToStruct", 0); + + /* "PyCafeDefs.pxi":1358 + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): + * + * cdef channelInfo ci = channelInfo() # <<<<<<<<<<<<<< + * cdef CAFEDataTypeCode cdt + * + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_channelInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ci = ((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1361 + * cdef CAFEDataTypeCode cdt + * + * ci.channelID = ( < long > cr.getChannelID()) # <<<<<<<<<<<<<< + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() + */ + __pyx_v_ci->channelID = ((long)__pyx_v_cr.getChannelID()); + + /* "PyCafeDefs.pxi":1362 + * + * ci.channelID = ( < long > cr.getChannelID()) + * ci.connectFlag = cr.getConnectFlag() # <<<<<<<<<<<<<< + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() + */ + __pyx_v_ci->connectFlag = __pyx_v_cr.getConnectFlag(); + + /* "PyCafeDefs.pxi":1363 + * ci.channelID = ( < long > cr.getChannelID()) + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() # <<<<<<<<<<<<<< + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + */ + __pyx_v_ci->hostName = __pyx_v_cr.getHostNameAsString(); + + /* "PyCafeDefs.pxi":1364 + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() # <<<<<<<<<<<<<< + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() + */ + __pyx_v_ci->dataType = __pyx_v_cr.getDataType(); + + /* "PyCafeDefs.pxi":1365 + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) # <<<<<<<<<<<<<< + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() + */ + __pyx_v_ci->dataTypeAsString = __pyx_v_cdt.message(__pyx_v_cr.getDataType()); + + /* "PyCafeDefs.pxi":1366 + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() # <<<<<<<<<<<<<< + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() + */ + __pyx_v_ci->className = __pyx_v_cr.getClassNameAsString(); + + /* "PyCafeDefs.pxi":1367 + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() # <<<<<<<<<<<<<< + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() + */ + __pyx_v_ci->accessRead = __pyx_v_cr.getAccessRead(); + + /* "PyCafeDefs.pxi":1368 + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() # <<<<<<<<<<<<<< + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() + */ + __pyx_v_ci->accessWrite = __pyx_v_cr.getAccessWrite(); + + /* "PyCafeDefs.pxi":1369 + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() # <<<<<<<<<<<<<< + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() + */ + __pyx_v_ci->nelem = __pyx_v_cr.getNelem(); + + /* "PyCafeDefs.pxi":1370 + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() # <<<<<<<<<<<<<< + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() + */ + __pyx_v_ci->connectionState = __pyx_v_cr.getConnectionState(); + + /* "PyCafeDefs.pxi":1371 + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() # <<<<<<<<<<<<<< + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + */ + __pyx_v_ci->cafeConnectionState = __pyx_v_cr.getCafeConnectionState(); + + /* "PyCafeDefs.pxi":1372 + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() # <<<<<<<<<<<<<< + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + * return ci + */ + __pyx_v_ci->connectionStateAsString = __pyx_v_cr.getConnectionStateAsString(); + + /* "PyCafeDefs.pxi":1373 + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() # <<<<<<<<<<<<<< + * return ci + * ################################################################################# + */ + __pyx_v_ci->cafeConnectionStateAsString = __pyx_v_cr.getCafeConnectionStateAsString(); + + /* "PyCafeDefs.pxi":1374 + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + * return ci # <<<<<<<<<<<<<< + * ################################################################################# + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_ci)); + __pyx_r = __pyx_v_ci; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1356 + * ################################################################################# + * + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): # <<<<<<<<<<<<<< + * + * cdef channelInfo ci = channelInfo() + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_channelInfo *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelRegaliaToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_ci); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1386 + * cdef readonly bint BSEnabled + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.name = (< bytes > ("")).encode('UTF-8') + * self.type = (< bytes > ("")).encode('UTF-8') + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_9bschannel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_9bschannel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_9bschannel___cinit__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_9bschannel___cinit__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":1387 + * + * def __cinit__(self): + * self.name = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.type = (< bytes > ("")).encode('UTF-8') + * self.modulo = 1 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1387, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->name = __pyx_t_4; + + /* "PyCafeDefs.pxi":1388 + * def __cinit__(self): + * self.name = (< bytes > ("")).encode('UTF-8') + * self.type = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.modulo = 1 + * self.offset = 0 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1388, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->type = __pyx_t_4; + + /* "PyCafeDefs.pxi":1389 + * self.name = (< bytes > ("")).encode('UTF-8') + * self.type = (< bytes > ("")).encode('UTF-8') + * self.modulo = 1 # <<<<<<<<<<<<<< + * self.offset = 0 + * self.nelem = 1 + */ + __pyx_v_self->modulo = 1; + + /* "PyCafeDefs.pxi":1390 + * self.type = (< bytes > ("")).encode('UTF-8') + * self.modulo = 1 + * self.offset = 0 # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.BSEnabled = False + */ + __pyx_v_self->offset = 0; + + /* "PyCafeDefs.pxi":1391 + * self.modulo = 1 + * self.offset = 0 + * self.nelem = 1 # <<<<<<<<<<<<<< + * self.BSEnabled = False + * + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":1392 + * self.offset = 0 + * self.nelem = 1 + * self.BSEnabled = False # <<<<<<<<<<<<<< + * + * cdef class BSData: + */ + __pyx_v_self->BSEnabled = 0; + + /* "PyCafeDefs.pxi":1386 + * cdef readonly bint BSEnabled + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.name = (< bytes > ("")).encode('UTF-8') + * self.type = (< bytes > ("")).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.bschannel.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1379 + * + * cdef class bschannel: + * cdef readonly string name # <<<<<<<<<<<<<< + * cdef readonly string type + * cdef readonly int modulo + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_4name_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_4name___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_4name___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1380 + * cdef class bschannel: + * cdef readonly string name + * cdef readonly string type # <<<<<<<<<<<<<< + * cdef readonly int modulo + * cdef readonly int offset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_4type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_4type_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_4type___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_4type___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1381 + * cdef readonly string name + * cdef readonly string type + * cdef readonly int modulo # <<<<<<<<<<<<<< + * cdef readonly int offset + * cdef readonly unsigned int nelem + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_6modulo_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_6modulo_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_6modulo___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_6modulo___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->modulo); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.modulo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1382 + * cdef readonly string type + * cdef readonly int modulo + * cdef readonly int offset # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly bint BSEnabled + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_6offset_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_6offset___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_6offset___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1383 + * cdef readonly int modulo + * cdef readonly int offset + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly bint BSEnabled + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_5nelem___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_5nelem___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1384 + * cdef readonly int offset + * cdef readonly unsigned int nelem + * cdef readonly bint BSEnabled # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_9BSEnabled_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_9BSEnabled_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_9BSEnabled___get__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_9BSEnabled___get__(struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->BSEnabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.BSEnabled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_2__reduce_cython__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_9bschannel_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_9bschannel_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_9bschannel_4__setstate_cython__(((struct __pyx_obj_6PyCafe_bschannel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_9bschannel_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_bschannel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.bschannel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1418 + * cdef readonly list pvdata + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.pulse_id = 0 + * self.htype = (< bytes > ("")).encode('UTF-8') + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6BSData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6BSData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6BSData___cinit__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6BSData___cinit__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":1419 + * + * def __cinit__(self): + * self.pulse_id = 0 # <<<<<<<<<<<<<< + * self.htype = (< bytes > ("")).encode('UTF-8') + * self.BSChannel = [] + */ + __pyx_v_self->pulse_id = 0; + + /* "PyCafeDefs.pxi":1420 + * def __cinit__(self): + * self.pulse_id = 0 + * self.htype = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.BSChannel = [] + * self.pv = [] + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1420, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->htype = __pyx_t_4; + + /* "PyCafeDefs.pxi":1421 + * self.pulse_id = 0 + * self.htype = (< bytes > ("")).encode('UTF-8') + * self.BSChannel = [] # <<<<<<<<<<<<<< + * self.pv = [] + * self.handle = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->BSChannel); + __Pyx_DECREF(__pyx_v_self->BSChannel); + __pyx_v_self->BSChannel = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1422 + * self.htype = (< bytes > ("")).encode('UTF-8') + * self.BSChannel = [] + * self.pv = [] # <<<<<<<<<<<<<< + * self.handle = [] + * self.global_timestamp = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pv); + __Pyx_DECREF(__pyx_v_self->pv); + __pyx_v_self->pv = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1423 + * self.BSChannel = [] + * self.pv = [] + * self.handle = [] # <<<<<<<<<<<<<< + * self.global_timestamp = [] + * self.gtsDate = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->handle); + __Pyx_DECREF(__pyx_v_self->handle); + __pyx_v_self->handle = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1424 + * self.pv = [] + * self.handle = [] + * self.global_timestamp = [] # <<<<<<<<<<<<<< + * self.gtsDate = [] + * self.isBS = False + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->global_timestamp); + __Pyx_DECREF(__pyx_v_self->global_timestamp); + __pyx_v_self->global_timestamp = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1425 + * self.handle = [] + * self.global_timestamp = [] + * self.gtsDate = [] # <<<<<<<<<<<<<< + * self.isBS = False + * self.nPV = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->gtsDate); + __Pyx_DECREF(__pyx_v_self->gtsDate); + __pyx_v_self->gtsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1426 + * self.global_timestamp = [] + * self.gtsDate = [] + * self.isBS = False # <<<<<<<<<<<<<< + * self.nPV = 0 + * self.nBSEnabled = 0 + */ + __pyx_v_self->isBS = 0; + + /* "PyCafeDefs.pxi":1427 + * self.gtsDate = [] + * self.isBS = False + * self.nPV = 0 # <<<<<<<<<<<<<< + * self.nBSEnabled = 0 + * self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + */ + __pyx_v_self->nPV = 0; + + /* "PyCafeDefs.pxi":1428 + * self.isBS = False + * self.nPV = 0 + * self.nBSEnabled = 0 # <<<<<<<<<<<<<< + * self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + */ + __pyx_v_self->nBSEnabled = 0; + + /* "PyCafeDefs.pxi":1429 + * self.nPV = 0 + * self.nBSEnabled = 0 + * self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK # <<<<<<<<<<<<<< + * self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + * self.nChannels = 0 # Diagnostics + */ + __pyx_v_self->nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK; + + /* "PyCafeDefs.pxi":1430 + * self.nBSEnabled = 0 + * self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS # <<<<<<<<<<<<<< + * self.nChannels = 0 # Diagnostics + * self.nNullData = 0 + */ + __pyx_v_self->timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS; + + /* "PyCafeDefs.pxi":1431 + * self.nhwm = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + * self.nChannels = 0 # Diagnostics # <<<<<<<<<<<<<< + * self.nNullData = 0 + * self.pGoodData = 0 + */ + __pyx_v_self->nChannels = 0; + + /* "PyCafeDefs.pxi":1432 + * self.timeoutMS = BSREAD_ZEROMQ_TIMEOUT_MS + * self.nChannels = 0 # Diagnostics + * self.nNullData = 0 # <<<<<<<<<<<<<< + * self.pGoodData = 0 + * self.status = ICAFE_NORMAL + */ + __pyx_v_self->nNullData = 0; + + /* "PyCafeDefs.pxi":1433 + * self.nChannels = 0 # Diagnostics + * self.nNullData = 0 + * self.pGoodData = 0 # <<<<<<<<<<<<<< + * self.status = ICAFE_NORMAL + * self.statusAsString = 'ICAFE_NORMAL' + */ + __pyx_v_self->pGoodData = 0.0; + + /* "PyCafeDefs.pxi":1434 + * self.nNullData = 0 + * self.pGoodData = 0 + * self.status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.statusAsString = 'ICAFE_NORMAL' + * self.daqStop = False + */ + __pyx_v_self->status = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":1435 + * self.pGoodData = 0 + * self.status = ICAFE_NORMAL + * self.statusAsString = 'ICAFE_NORMAL' # <<<<<<<<<<<<<< + * self.daqStop = False + * self.hasNewData = [] + */ + __Pyx_INCREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GIVEREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = __pyx_n_u_ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":1436 + * self.status = ICAFE_NORMAL + * self.statusAsString = 'ICAFE_NORMAL' + * self.daqStop = False # <<<<<<<<<<<<<< + * self.hasNewData = [] + * + */ + __pyx_v_self->daqStop = 0; + + /* "PyCafeDefs.pxi":1437 + * self.statusAsString = 'ICAFE_NORMAL' + * self.daqStop = False + * self.hasNewData = [] # <<<<<<<<<<<<<< + * + * def __copy__(self): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->hasNewData); + __Pyx_DECREF(__pyx_v_self->hasNewData); + __pyx_v_self->hasNewData = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1418 + * cdef readonly list pvdata + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.pulse_id = 0 + * self.htype = (< bytes > ("")).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.BSData.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1439 + * self.hasNewData = [] + * + * def __copy__(self): # <<<<<<<<<<<<<< + * return self + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_3__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_3__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_2__copy__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_2__copy__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__copy__", 0); + + /* "PyCafeDefs.pxi":1440 + * + * def __copy__(self): + * return self # <<<<<<<<<<<<<< + * + * def __deepcopy__(self, memo): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1439 + * self.hasNewData = [] + * + * def __copy__(self): # <<<<<<<<<<<<<< + * return self + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1442 + * return self + * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * cdef BSData res = BSData() + * cpdef p1List = [] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_5__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_v_memo) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_4__deepcopy__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((PyObject *)__pyx_v_memo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_4__deepcopy__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) { + struct __pyx_obj_6PyCafe_BSData *__pyx_v_res = 0; + PyObject *__pyx_v_p1List = 0; + PyObject *__pyx_v_bscList = 0; + Py_ssize_t __pyx_v_lenPV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_bschannel *__pyx_v_bsc = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::string __pyx_t_2; + unsigned PY_LONG_LONG __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + unsigned int __pyx_t_7; + int __pyx_t_8; + unsigned short __pyx_t_9; + float __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + Py_ssize_t __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + __Pyx_RefNannySetupContext("__deepcopy__", 0); + + /* "PyCafeDefs.pxi":1443 + * + * def __deepcopy__(self, memo): + * cdef BSData res = BSData() # <<<<<<<<<<<<<< + * cpdef p1List = [] + * cpdef bscList = [] + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_BSData)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_res = ((struct __pyx_obj_6PyCafe_BSData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1444 + * def __deepcopy__(self, memo): + * cdef BSData res = BSData() + * cpdef p1List = [] # <<<<<<<<<<<<<< + * cpdef bscList = [] + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_p1List = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1445 + * cdef BSData res = BSData() + * cpdef p1List = [] + * cpdef bscList = [] # <<<<<<<<<<<<<< + * + * res.htype = self.htype + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bscList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1447 + * cpdef bscList = [] + * + * res.htype = self.htype # <<<<<<<<<<<<<< + * res.pulse_id = self.pulse_id + * res.pv = deepcopy(self.pv) + */ + __pyx_t_2 = __pyx_v_self->htype; + __pyx_v_res->htype = __pyx_t_2; + + /* "PyCafeDefs.pxi":1448 + * + * res.htype = self.htype + * res.pulse_id = self.pulse_id # <<<<<<<<<<<<<< + * res.pv = deepcopy(self.pv) + * res.handle = deepcopy(self.handle) + */ + __pyx_t_3 = __pyx_v_self->pulse_id; + __pyx_v_res->pulse_id = __pyx_t_3; + + /* "PyCafeDefs.pxi":1449 + * res.htype = self.htype + * res.pulse_id = self.pulse_id + * res.pv = deepcopy(self.pv) # <<<<<<<<<<<<<< + * res.handle = deepcopy(self.handle) + * res.isBS = self.isBS + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->pv) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->pv); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1449, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->pv); + __Pyx_DECREF(__pyx_v_res->pv); + __pyx_v_res->pv = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1450 + * res.pulse_id = self.pulse_id + * res.pv = deepcopy(self.pv) + * res.handle = deepcopy(self.handle) # <<<<<<<<<<<<<< + * res.isBS = self.isBS + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->handle) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->handle); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1450, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->handle); + __Pyx_DECREF(__pyx_v_res->handle); + __pyx_v_res->handle = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1451 + * res.pv = deepcopy(self.pv) + * res.handle = deepcopy(self.handle) + * res.isBS = self.isBS # <<<<<<<<<<<<<< + * + * #res.pvIdx = dict([(self.pv[i], i) for i in range(0,len(self.pv))] ) + */ + __pyx_t_6 = __pyx_v_self->isBS; + __pyx_v_res->isBS = __pyx_t_6; + + /* "PyCafeDefs.pxi":1455 + * #res.pvIdx = dict([(self.pv[i], i) for i in range(0,len(self.pv))] ) + * + * res.pvIdx = deepcopy(self.pvIdx) # <<<<<<<<<<<<<< + * + * # print(res.pvIdx.items()) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->pvIdx) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->pvIdx); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1455, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->pvIdx); + __Pyx_DECREF(__pyx_v_res->pvIdx); + __pyx_v_res->pvIdx = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1459 + * # print(res.pvIdx.items()) + * + * res.global_timestamp = deepcopy(self.global_timestamp) # <<<<<<<<<<<<<< + * res.gtsDate = deepcopy(self.gtsDate) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->global_timestamp) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->global_timestamp); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1459, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->global_timestamp); + __Pyx_DECREF(__pyx_v_res->global_timestamp); + __pyx_v_res->global_timestamp = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1460 + * + * res.global_timestamp = deepcopy(self.global_timestamp) + * res.gtsDate = deepcopy(self.gtsDate) # <<<<<<<<<<<<<< + * + * res.hasNewData = deepcopy(self.hasNewData) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->gtsDate) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->gtsDate); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1460, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->gtsDate); + __Pyx_DECREF(__pyx_v_res->gtsDate); + __pyx_v_res->gtsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1462 + * res.gtsDate = deepcopy(self.gtsDate) + * + * res.hasNewData = deepcopy(self.hasNewData) # <<<<<<<<<<<<<< + * + * res.nPV = self.nPV + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->hasNewData) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->hasNewData); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1462, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->hasNewData); + __Pyx_DECREF(__pyx_v_res->hasNewData); + __pyx_v_res->hasNewData = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1464 + * res.hasNewData = deepcopy(self.hasNewData) + * + * res.nPV = self.nPV # <<<<<<<<<<<<<< + * res.timeoutMS = self.timeoutMS + * res.nhwm = self.nhwm + */ + __pyx_t_7 = __pyx_v_self->nPV; + __pyx_v_res->nPV = __pyx_t_7; + + /* "PyCafeDefs.pxi":1465 + * + * res.nPV = self.nPV + * res.timeoutMS = self.timeoutMS # <<<<<<<<<<<<<< + * res.nhwm = self.nhwm + * res.status = self.status + */ + __pyx_t_8 = __pyx_v_self->timeoutMS; + __pyx_v_res->timeoutMS = __pyx_t_8; + + /* "PyCafeDefs.pxi":1466 + * res.nPV = self.nPV + * res.timeoutMS = self.timeoutMS + * res.nhwm = self.nhwm # <<<<<<<<<<<<<< + * res.status = self.status + * res.statusAsString = self.statusAsString + */ + __pyx_t_9 = __pyx_v_self->nhwm; + __pyx_v_res->nhwm = __pyx_t_9; + + /* "PyCafeDefs.pxi":1467 + * res.timeoutMS = self.timeoutMS + * res.nhwm = self.nhwm + * res.status = self.status # <<<<<<<<<<<<<< + * res.statusAsString = self.statusAsString + * + */ + __pyx_t_8 = __pyx_v_self->status; + __pyx_v_res->status = __pyx_t_8; + + /* "PyCafeDefs.pxi":1468 + * res.nhwm = self.nhwm + * res.status = self.status + * res.statusAsString = self.statusAsString # <<<<<<<<<<<<<< + * + * res.nChannels = self.nChannels + */ + __pyx_t_1 = __pyx_v_self->statusAsString; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->statusAsString); + __Pyx_DECREF(__pyx_v_res->statusAsString); + __pyx_v_res->statusAsString = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1470 + * res.statusAsString = self.statusAsString + * + * res.nChannels = self.nChannels # <<<<<<<<<<<<<< + * res.nNullData = self.nNullData + * res.pGoodData = self.pGoodData + */ + __pyx_t_7 = __pyx_v_self->nChannels; + __pyx_v_res->nChannels = __pyx_t_7; + + /* "PyCafeDefs.pxi":1471 + * + * res.nChannels = self.nChannels + * res.nNullData = self.nNullData # <<<<<<<<<<<<<< + * res.pGoodData = self.pGoodData + * + */ + __pyx_t_7 = __pyx_v_self->nNullData; + __pyx_v_res->nNullData = __pyx_t_7; + + /* "PyCafeDefs.pxi":1472 + * res.nChannels = self.nChannels + * res.nNullData = self.nNullData + * res.pGoodData = self.pGoodData # <<<<<<<<<<<<<< + * + * res.daqStop = self.daqStop + */ + __pyx_t_10 = __pyx_v_self->pGoodData; + __pyx_v_res->pGoodData = __pyx_t_10; + + /* "PyCafeDefs.pxi":1474 + * res.pGoodData = self.pGoodData + * + * res.daqStop = self.daqStop # <<<<<<<<<<<<<< + * + * lenPV = len(self.pvdata) + */ + __pyx_t_6 = __pyx_v_self->daqStop; + __pyx_v_res->daqStop = __pyx_t_6; + + /* "PyCafeDefs.pxi":1476 + * res.daqStop = self.daqStop + * + * lenPV = len(self.pvdata) # <<<<<<<<<<<<<< + * + * # Should never happen + */ + __pyx_t_1 = __pyx_v_self->pvdata; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1476, __pyx_L1_error) + } + __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_lenPV = __pyx_t_11; + + /* "PyCafeDefs.pxi":1479 + * + * # Should never happen + * if lenPV != len(self.BSChannel): # <<<<<<<<<<<<<< + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + * if lenPV > len(self.BSChannel): + */ + __pyx_t_1 = __pyx_v_self->BSChannel; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1479, __pyx_L1_error) + } + __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1479, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = ((__pyx_v_lenPV != __pyx_t_11) != 0); + if (__pyx_t_6) { + + /* "PyCafeDefs.pxi":1480 + * # Should never happen + * if lenPV != len(self.BSChannel): + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") # <<<<<<<<<<<<<< + * if lenPV > len(self.BSChannel): + * lenPV = len(self.BSChannel) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1481 + * if lenPV != len(self.BSChannel): + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + * if lenPV > len(self.BSChannel): # <<<<<<<<<<<<<< + * lenPV = len(self.BSChannel) + * + */ + __pyx_t_1 = __pyx_v_self->BSChannel; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1481, __pyx_L1_error) + } + __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1481, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = ((__pyx_v_lenPV > __pyx_t_11) != 0); + if (__pyx_t_6) { + + /* "PyCafeDefs.pxi":1482 + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + * if lenPV > len(self.BSChannel): + * lenPV = len(self.BSChannel) # <<<<<<<<<<<<<< + * + * for i in range(0, lenPV): + */ + __pyx_t_1 = __pyx_v_self->BSChannel; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1482, __pyx_L1_error) + } + __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1482, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_lenPV = __pyx_t_11; + + /* "PyCafeDefs.pxi":1481 + * if lenPV != len(self.BSChannel): + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + * if lenPV > len(self.BSChannel): # <<<<<<<<<<<<<< + * lenPV = len(self.BSChannel) + * + */ + } + + /* "PyCafeDefs.pxi":1479 + * + * # Should never happen + * if lenPV != len(self.BSChannel): # <<<<<<<<<<<<<< + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") + * if lenPV > len(self.BSChannel): + */ + } + + /* "PyCafeDefs.pxi":1484 + * lenPV = len(self.BSChannel) + * + * for i in range(0, lenPV): # <<<<<<<<<<<<<< + * + * # for i in range(0,len(self.BSChannel)): + */ + __pyx_t_11 = __pyx_v_lenPV; + __pyx_t_12 = __pyx_t_11; + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { + __pyx_v_i = __pyx_t_13; + + /* "PyCafeDefs.pxi":1487 + * + * # for i in range(0,len(self.BSChannel)): + * bsc = bschannel() # <<<<<<<<<<<<<< + * bsc.name = self.BSChannel[i].name + * bsc.type = self.BSChannel[i].type + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_bschannel)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_bsc, ((struct __pyx_obj_6PyCafe_bschannel *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1488 + * # for i in range(0,len(self.BSChannel)): + * bsc = bschannel() + * bsc.name = self.BSChannel[i].name # <<<<<<<<<<<<<< + * bsc.type = self.BSChannel[i].type + * bsc.modulo = self.BSChannel[i].modulo + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1488, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1488, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_bsc->name = __pyx_t_2; + + /* "PyCafeDefs.pxi":1489 + * bsc = bschannel() + * bsc.name = self.BSChannel[i].name + * bsc.type = self.BSChannel[i].type # <<<<<<<<<<<<<< + * bsc.modulo = self.BSChannel[i].modulo + * bsc.offset = self.BSChannel[i].offset + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1489, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_type_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_bsc->type = __pyx_t_2; + + /* "PyCafeDefs.pxi":1490 + * bsc.name = self.BSChannel[i].name + * bsc.type = self.BSChannel[i].type + * bsc.modulo = self.BSChannel[i].modulo # <<<<<<<<<<<<<< + * bsc.offset = self.BSChannel[i].offset + * bsc.nelem = self.BSChannel[i].nelem + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1490, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modulo); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1490, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_bsc->modulo = __pyx_t_8; + + /* "PyCafeDefs.pxi":1491 + * bsc.type = self.BSChannel[i].type + * bsc.modulo = self.BSChannel[i].modulo + * bsc.offset = self.BSChannel[i].offset # <<<<<<<<<<<<<< + * bsc.nelem = self.BSChannel[i].nelem + * bsc.BSEnabled = self.BSChannel[i].BSEnabled + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1491, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1491, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_bsc->offset = __pyx_t_8; + + /* "PyCafeDefs.pxi":1492 + * bsc.modulo = self.BSChannel[i].modulo + * bsc.offset = self.BSChannel[i].offset + * bsc.nelem = self.BSChannel[i].nelem # <<<<<<<<<<<<<< + * bsc.BSEnabled = self.BSChannel[i].BSEnabled + * + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1492, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nelem_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1492, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_bsc->nelem = __pyx_t_7; + + /* "PyCafeDefs.pxi":1493 + * bsc.offset = self.BSChannel[i].offset + * bsc.nelem = self.BSChannel[i].nelem + * bsc.BSEnabled = self.BSChannel[i].BSEnabled # <<<<<<<<<<<<<< + * + * bscList.append(bsc) + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1493, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BSEnabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_bsc->BSEnabled = __pyx_t_6; + + /* "PyCafeDefs.pxi":1495 + * bsc.BSEnabled = self.BSChannel[i].BSEnabled + * + * bscList.append(bsc) # <<<<<<<<<<<<<< + * + * # res.BSChannel=bscList + */ + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_bscList, ((PyObject *)__pyx_v_bsc)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(2, 1495, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1501 + * # for i in range(0,len(self.pvdata)): + * + * p1 = pvdata() # <<<<<<<<<<<<<< + * # value=[] + * # value.append(self.pvdata[i].value[0]) + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1505 + * # value.append(self.pvdata[i].value[0]) + * # p1.value.append(value) + * p1.value = deepcopy(self.pvdata[i].value) # <<<<<<<<<<<<<< + * p1.status = self.pvdata[i].status + * p1.statusAsString = self.pvdata[i].statusAsString + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1505, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1505, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1506 + * # p1.value.append(value) + * p1.value = deepcopy(self.pvdata[i].value) + * p1.status = self.pvdata[i].status # <<<<<<<<<<<<<< + * p1.statusAsString = self.pvdata[i].statusAsString + * p1.nelem = self.pvdata[i].nelem + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1506, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_status_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1506, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_p1->status = __pyx_t_8; + + /* "PyCafeDefs.pxi":1507 + * p1.value = deepcopy(self.pvdata[i].value) + * p1.status = self.pvdata[i].status + * p1.statusAsString = self.pvdata[i].statusAsString # <<<<<<<<<<<<<< + * p1.nelem = self.pvdata[i].nelem + * p1.alarmStatus = self.pvdata[i].alarmStatus + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1507, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_statusAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1507, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->statusAsString); + __Pyx_DECREF(__pyx_v_p1->statusAsString); + __pyx_v_p1->statusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1508 + * p1.status = self.pvdata[i].status + * p1.statusAsString = self.pvdata[i].statusAsString + * p1.nelem = self.pvdata[i].nelem # <<<<<<<<<<<<<< + * p1.alarmStatus = self.pvdata[i].alarmStatus + * p1.alarmSeverity = self.pvdata[i].alarmSeverity + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1508, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nelem_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1508, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_p1->nelem = __pyx_t_7; + + /* "PyCafeDefs.pxi":1509 + * p1.statusAsString = self.pvdata[i].statusAsString + * p1.nelem = self.pvdata[i].nelem + * p1.alarmStatus = self.pvdata[i].alarmStatus # <<<<<<<<<<<<<< + * p1.alarmSeverity = self.pvdata[i].alarmSeverity + * p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1509, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_alarmStatus_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1509, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_p1->alarmStatus = __pyx_t_8; + + /* "PyCafeDefs.pxi":1510 + * p1.nelem = self.pvdata[i].nelem + * p1.alarmStatus = self.pvdata[i].alarmStatus + * p1.alarmSeverity = self.pvdata[i].alarmSeverity # <<<<<<<<<<<<<< + * p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + * p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1510, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_alarmSeverity_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_p1->alarmSeverity = __pyx_t_8; + + /* "PyCafeDefs.pxi":1511 + * p1.alarmStatus = self.pvdata[i].alarmStatus + * p1.alarmSeverity = self.pvdata[i].alarmSeverity + * p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString # <<<<<<<<<<<<<< + * p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + * p1.pulseID = self.pvdata[i].pulseID + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1511, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_alarmStatusAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1511, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->alarmStatusAsString); + __Pyx_DECREF(__pyx_v_p1->alarmStatusAsString); + __pyx_v_p1->alarmStatusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1512 + * p1.alarmSeverity = self.pvdata[i].alarmSeverity + * p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + * p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString # <<<<<<<<<<<<<< + * p1.pulseID = self.pvdata[i].pulseID + * p1.dataType = self.pvdata[i].dataType + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1512, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_alarmSeverityAsString); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 1512, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_p1->alarmSeverityAsString); + __Pyx_DECREF(__pyx_v_p1->alarmSeverityAsString); + __pyx_v_p1->alarmSeverityAsString = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1513 + * p1.alarmStatusAsString = self.pvdata[i].alarmStatusAsString + * p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + * p1.pulseID = self.pvdata[i].pulseID # <<<<<<<<<<<<<< + * p1.dataType = self.pvdata[i].dataType + * p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1513, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pulseID_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 1513, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_p1->pulseID = __pyx_t_3; + + /* "PyCafeDefs.pxi":1514 + * p1.alarmSeverityAsString = self.pvdata[i].alarmSeverityAsString + * p1.pulseID = self.pvdata[i].pulseID + * p1.dataType = self.pvdata[i].dataType # <<<<<<<<<<<<<< + * p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + * p1.tsDateAsString = self.pvdata[i].tsDateAsString + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1514, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dataType_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_p1->dataType = __pyx_t_8; + + /* "PyCafeDefs.pxi":1515 + * p1.pulseID = self.pvdata[i].pulseID + * p1.dataType = self.pvdata[i].dataType + * p1.dataTypeAsString = self.pvdata[i].dataTypeAsString # <<<<<<<<<<<<<< + * p1.tsDateAsString = self.pvdata[i].tsDateAsString + * p1.bsDateAsString = self.pvdata[i].bsDateAsString + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1515, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dataTypeAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1515, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->dataTypeAsString); + __Pyx_DECREF(__pyx_v_p1->dataTypeAsString); + __pyx_v_p1->dataTypeAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1516 + * p1.dataType = self.pvdata[i].dataType + * p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + * p1.tsDateAsString = self.pvdata[i].tsDateAsString # <<<<<<<<<<<<<< + * p1.bsDateAsString = self.pvdata[i].bsDateAsString + * p1.ts = deepcopy(self.pvdata[i].ts) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1516, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tsDateAsString); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 1516, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_p1->tsDateAsString); + __Pyx_DECREF(__pyx_v_p1->tsDateAsString); + __pyx_v_p1->tsDateAsString = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1517 + * p1.dataTypeAsString = self.pvdata[i].dataTypeAsString + * p1.tsDateAsString = self.pvdata[i].tsDateAsString + * p1.bsDateAsString = self.pvdata[i].bsDateAsString # <<<<<<<<<<<<<< + * p1.ts = deepcopy(self.pvdata[i].ts) + * p1.tsDate = deepcopy(self.pvdata[i].tsDate) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1517, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bsDateAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1517, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->bsDateAsString); + __Pyx_DECREF(__pyx_v_p1->bsDateAsString); + __pyx_v_p1->bsDateAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1518 + * p1.tsDateAsString = self.pvdata[i].tsDateAsString + * p1.bsDateAsString = self.pvdata[i].bsDateAsString + * p1.ts = deepcopy(self.pvdata[i].ts) # <<<<<<<<<<<<<< + * p1.tsDate = deepcopy(self.pvdata[i].tsDate) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1518, __pyx_L1_error) + } + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_15, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1518, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1519 + * p1.bsDateAsString = self.pvdata[i].bsDateAsString + * p1.ts = deepcopy(self.pvdata[i].ts) + * p1.tsDate = deepcopy(self.pvdata[i].tsDate) # <<<<<<<<<<<<<< + * + * p1List.append(p1) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1519, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1519, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1521 + * p1.tsDate = deepcopy(self.pvdata[i].tsDate) + * + * p1List.append(p1) # <<<<<<<<<<<<<< + * + * res.pvdata = p1List + */ + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_p1List, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(2, 1521, __pyx_L1_error) + } + + /* "PyCafeDefs.pxi":1523 + * p1List.append(p1) + * + * res.pvdata = p1List # <<<<<<<<<<<<<< + * res.BSChannel = bscList + * + */ + if (!(likely(PyList_CheckExact(__pyx_v_p1List))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_p1List)->tp_name), 0))) __PYX_ERR(2, 1523, __pyx_L1_error) + __pyx_t_1 = __pyx_v_p1List; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->pvdata); + __Pyx_DECREF(__pyx_v_res->pvdata); + __pyx_v_res->pvdata = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1524 + * + * res.pvdata = p1List + * res.BSChannel = bscList # <<<<<<<<<<<<<< + * + * # for i in range(0,len(res.pvdata)): + */ + if (!(likely(PyList_CheckExact(__pyx_v_bscList))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_bscList)->tp_name), 0))) __PYX_ERR(2, 1524, __pyx_L1_error) + __pyx_t_1 = __pyx_v_bscList; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_res->BSChannel); + __Pyx_DECREF(__pyx_v_res->BSChannel); + __pyx_v_res->BSChannel = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1529 + * # res.pvdata[i].show() + * + * return res # <<<<<<<<<<<<<< + * + * def compare(self, list _pvdata): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_res)); + __pyx_r = ((PyObject *)__pyx_v_res); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1442 + * return self + * + * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< + * cdef BSData res = BSData() + * cpdef p1List = [] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("PyCafe.BSData.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_res); + __Pyx_XDECREF(__pyx_v_p1List); + __Pyx_XDECREF(__pyx_v_bscList); + __Pyx_XDECREF((PyObject *)__pyx_v_bsc); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1531 + * return res + * + * def compare(self, list _pvdata): # <<<<<<<<<<<<<< + * self.hasNewData = [0]*len(self.pv) + * cdef unsigned short newDataFlag = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v__pvdata); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_7compare(PyObject *__pyx_v_self, PyObject *__pyx_v__pvdata) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("compare (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvdata), (&PyList_Type), 1, "_pvdata", 1))) __PYX_ERR(2, 1531, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6BSData_6compare(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((PyObject*)__pyx_v__pvdata)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_6compare(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v__pvdata) { + unsigned short __pyx_v_newDataFlag; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("compare", 0); + + /* "PyCafeDefs.pxi":1532 + * + * def compare(self, list _pvdata): + * self.hasNewData = [0]*len(self.pv) # <<<<<<<<<<<<<< + * cdef unsigned short newDataFlag = 0 + * + */ + __pyx_t_1 = __pyx_v_self->pv; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1532, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1532, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1 * ((__pyx_t_2<0) ? 0:__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_t_2; __pyx_temp++) { + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0); + } + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->hasNewData); + __Pyx_DECREF(__pyx_v_self->hasNewData); + __pyx_v_self->hasNewData = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1533 + * def compare(self, list _pvdata): + * self.hasNewData = [0]*len(self.pv) + * cdef unsigned short newDataFlag = 0 # <<<<<<<<<<<<<< + * + * for i in range(0, len(self.pv)): + */ + __pyx_v_newDataFlag = 0; + + /* "PyCafeDefs.pxi":1535 + * cdef unsigned short newDataFlag = 0 + * + * for i in range(0, len(self.pv)): # <<<<<<<<<<<<<< + * if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: + * self.hasNewData[i] = 1 + */ + __pyx_t_1 = __pyx_v_self->pv; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1535, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafeDefs.pxi":1536 + * + * for i in range(0, len(self.pv)): + * if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: # <<<<<<<<<<<<<< + * self.hasNewData[i] = 1 + * newDataFlag = 1 + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1536, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v__pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1536, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v__pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1536, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1537 + * for i in range(0, len(self.pv)): + * if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: + * self.hasNewData[i] = 1 # <<<<<<<<<<<<<< + * newDataFlag = 1 + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + */ + if (unlikely(__pyx_v_self->hasNewData == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1537, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_self->hasNewData, __pyx_v_i, __pyx_int_1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(2, 1537, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1538 + * if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: + * self.hasNewData[i] = 1 + * newDataFlag = 1 # <<<<<<<<<<<<<< + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + * self.hasNewData[i] = 1 + */ + __pyx_v_newDataFlag = 1; + + /* "PyCafeDefs.pxi":1536 + * + * for i in range(0, len(self.pv)): + * if self.pvdata[i].ts[1] != _pvdata[i].ts[1]: # <<<<<<<<<<<<<< + * self.hasNewData[i] = 1 + * newDataFlag = 1 + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1539 + * self.hasNewData[i] = 1 + * newDataFlag = 1 + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: # <<<<<<<<<<<<<< + * self.hasNewData[i] = 1 + * newDataFlag = 1 + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1539, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v__pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1539, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v__pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1540 + * newDataFlag = 1 + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + * self.hasNewData[i] = 1 # <<<<<<<<<<<<<< + * newDataFlag = 1 + * # Catch disconnect events(!!) and set newDataFlag only + */ + if (unlikely(__pyx_v_self->hasNewData == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1540, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_self->hasNewData, __pyx_v_i, __pyx_int_1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(2, 1540, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1541 + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: + * self.hasNewData[i] = 1 + * newDataFlag = 1 # <<<<<<<<<<<<<< + * # Catch disconnect events(!!) and set newDataFlag only + * elif self.pvdata[i].status != _pvdata[i].status: + */ + __pyx_v_newDataFlag = 1; + + /* "PyCafeDefs.pxi":1539 + * self.hasNewData[i] = 1 + * newDataFlag = 1 + * elif self.pvdata[i].ts[0] != _pvdata[i].ts[0]: # <<<<<<<<<<<<<< + * self.hasNewData[i] = 1 + * newDataFlag = 1 + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1543 + * newDataFlag = 1 + * # Catch disconnect events(!!) and set newDataFlag only + * elif self.pvdata[i].status != _pvdata[i].status: # <<<<<<<<<<<<<< + * newDataFlag = 1 + * return newDataFlag + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1543, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_status_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v__pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1543, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v__pvdata, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_status_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1543, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1544 + * # Catch disconnect events(!!) and set newDataFlag only + * elif self.pvdata[i].status != _pvdata[i].status: + * newDataFlag = 1 # <<<<<<<<<<<<<< + * return newDataFlag + * + */ + __pyx_v_newDataFlag = 1; + + /* "PyCafeDefs.pxi":1543 + * newDataFlag = 1 + * # Catch disconnect events(!!) and set newDataFlag only + * elif self.pvdata[i].status != _pvdata[i].status: # <<<<<<<<<<<<<< + * newDataFlag = 1 + * return newDataFlag + */ + } + __pyx_L5:; + } + + /* "PyCafeDefs.pxi":1545 + * elif self.pvdata[i].status != _pvdata[i].status: + * newDataFlag = 1 + * return newDataFlag # <<<<<<<<<<<<<< + * + * def getIdxFromPVName(self, str _name): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_newDataFlag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1531 + * return res + * + * def compare(self, list _pvdata): # <<<<<<<<<<<<<< + * self.hasNewData = [0]*len(self.pv) + * cdef unsigned short newDataFlag = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.BSData.compare", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1547 + * return newDataFlag + * + * def getIdxFromPVName(self, str _name): # <<<<<<<<<<<<<< + * for i in range(0, len(self.pv)): + * if _name == self.pv[i]: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9getIdxFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v__name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9getIdxFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v__name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIdxFromPVName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__name), (&PyUnicode_Type), 1, "_name", 1))) __PYX_ERR(2, 1547, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6BSData_8getIdxFromPVName(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((PyObject*)__pyx_v__name)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_8getIdxFromPVName(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v__name) { + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("getIdxFromPVName", 0); + + /* "PyCafeDefs.pxi":1548 + * + * def getIdxFromPVName(self, str _name): + * for i in range(0, len(self.pv)): # <<<<<<<<<<<<<< + * if _name == self.pv[i]: + * return i + */ + __pyx_t_1 = __pyx_v_self->pv; + __Pyx_INCREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1548, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1548, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafeDefs.pxi":1549 + * def getIdxFromPVName(self, str _name): + * for i in range(0, len(self.pv)): + * if _name == self.pv[i]: # <<<<<<<<<<<<<< + * return i + * return -1 + */ + if (unlikely(__pyx_v_self->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1549, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__name, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(2, 1549, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1550 + * for i in range(0, len(self.pv)): + * if _name == self.pv[i]: + * return i # <<<<<<<<<<<<<< + * return -1 + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1549 + * def getIdxFromPVName(self, str _name): + * for i in range(0, len(self.pv)): + * if _name == self.pv[i]: # <<<<<<<<<<<<<< + * return i + * return -1 + */ + } + } + + /* "PyCafeDefs.pxi":1551 + * if _name == self.pv[i]: + * return i + * return -1 # <<<<<<<<<<<<<< + * + * def getDaqStop(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_neg_1); + __pyx_r = __pyx_int_neg_1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1547 + * return newDataFlag + * + * def getIdxFromPVName(self, str _name): # <<<<<<<<<<<<<< + * for i in range(0, len(self.pv)): + * if _name == self.pv[i]: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.getIdxFromPVName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1553 + * return -1 + * + * def getDaqStop(self): # <<<<<<<<<<<<<< + * return self.daqStop + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_11getDaqStop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_11getDaqStop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDaqStop (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_10getDaqStop(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_10getDaqStop(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getDaqStop", 0); + + /* "PyCafeDefs.pxi":1554 + * + * def getDaqStop(self): + * return self.daqStop # <<<<<<<<<<<<<< + * + * def setDaqStop(self, bint ds): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->daqStop); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1553 + * return -1 + * + * def getDaqStop(self): # <<<<<<<<<<<<<< + * return self.daqStop + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.getDaqStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1556 + * return self.daqStop + * + * def setDaqStop(self, bint ds): # <<<<<<<<<<<<<< + * self.daqStop = ds + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_13setDaqStop(PyObject *__pyx_v_self, PyObject *__pyx_arg_ds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_13setDaqStop(PyObject *__pyx_v_self, PyObject *__pyx_arg_ds) { + int __pyx_v_ds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setDaqStop (wrapper)", 0); + assert(__pyx_arg_ds); { + __pyx_v_ds = __Pyx_PyObject_IsTrue(__pyx_arg_ds); if (unlikely((__pyx_v_ds == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1556, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.BSData.setDaqStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6BSData_12setDaqStop(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((int)__pyx_v_ds)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_12setDaqStop(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, int __pyx_v_ds) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setDaqStop", 0); + + /* "PyCafeDefs.pxi":1557 + * + * def setDaqStop(self, bint ds): + * self.daqStop = ds # <<<<<<<<<<<<<< + * + * def getVal(self, iElem=None): + */ + __pyx_v_self->daqStop = __pyx_v_ds; + + /* "PyCafeDefs.pxi":1556 + * return self.daqStop + * + * def setDaqStop(self, bint ds): # <<<<<<<<<<<<<< + * self.daqStop = ds + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1559 + * self.daqStop = ds + * + * def getVal(self, iElem=None): # <<<<<<<<<<<<<< + * + * cdef int idx = -1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_15getVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_15getVal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_iElem = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getVal (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iElem,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iElem); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVal") < 0)) __PYX_ERR(2, 1559, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_iElem = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getVal", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1559, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.BSData.getVal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6BSData_14getVal(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), __pyx_v_iElem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_14getVal(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_iElem) { + int __pyx_v_idx; + PyObject *__pyx_v_vall = NULL; + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + unsigned int __pyx_t_8; + unsigned int __pyx_t_9; + long __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("getVal", 0); + __Pyx_INCREF(__pyx_v_iElem); + + /* "PyCafeDefs.pxi":1561 + * def getVal(self, iElem=None): + * + * cdef int idx = -1 # <<<<<<<<<<<<<< + * + * if isinstance(iElem, (str)): + */ + __pyx_v_idx = -1; + + /* "PyCafeDefs.pxi":1563 + * cdef int idx = -1 + * + * if isinstance(iElem, (str)): # <<<<<<<<<<<<<< + * # iElem=self.getIdxFromPVName(iElem) + * iElem = self.pvIdx.get(iElem) + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_iElem); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1565 + * if isinstance(iElem, (str)): + * # iElem=self.getIdxFromPVName(iElem) + * iElem = self.pvIdx.get(iElem) # <<<<<<<<<<<<<< + * if iElem is None: + * return None + */ + if (unlikely(__pyx_v_self->pvIdx == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(2, 1565, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->pvIdx, __pyx_v_iElem, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_iElem, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1566 + * # iElem=self.getIdxFromPVName(iElem) + * iElem = self.pvIdx.get(iElem) + * if iElem is None: # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + __pyx_t_2 = (__pyx_v_iElem == Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1567 + * iElem = self.pvIdx.get(iElem) + * if iElem is None: + * return None # <<<<<<<<<<<<<< + * idx = iElem + * elif isinstance(iElem, (int, long)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1566 + * # iElem=self.getIdxFromPVName(iElem) + * iElem = self.pvIdx.get(iElem) + * if iElem is None: # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + } + + /* "PyCafeDefs.pxi":1568 + * if iElem is None: + * return None + * idx = iElem # <<<<<<<<<<<<<< + * elif isinstance(iElem, (int, long)): + * if iElem < 0: + */ + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_iElem); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1568, __pyx_L1_error) + __pyx_v_idx = __pyx_t_4; + + /* "PyCafeDefs.pxi":1563 + * cdef int idx = -1 + * + * if isinstance(iElem, (str)): # <<<<<<<<<<<<<< + * # iElem=self.getIdxFromPVName(iElem) + * iElem = self.pvIdx.get(iElem) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1569 + * return None + * idx = iElem + * elif isinstance(iElem, (int, long)): # <<<<<<<<<<<<<< + * if iElem < 0: + * print("Invalid input:", iElem, "Idx must be non-negative!") + */ + __pyx_t_2 = PyInt_Check(__pyx_v_iElem); + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_1 = __pyx_t_5; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_iElem); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1570 + * idx = iElem + * elif isinstance(iElem, (int, long)): + * if iElem < 0: # <<<<<<<<<<<<<< + * print("Invalid input:", iElem, "Idx must be non-negative!") + * return None + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_iElem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1570, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1571 + * elif isinstance(iElem, (int, long)): + * if iElem < 0: + * print("Invalid input:", iElem, "Idx must be non-negative!") # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Invalid_input); + __Pyx_GIVEREF(__pyx_kp_u_Invalid_input); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Invalid_input); + __Pyx_INCREF(__pyx_v_iElem); + __Pyx_GIVEREF(__pyx_v_iElem); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_iElem); + __Pyx_INCREF(__pyx_kp_u_Idx_must_be_non_negative); + __Pyx_GIVEREF(__pyx_kp_u_Idx_must_be_non_negative); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Idx_must_be_non_negative); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1572 + * if iElem < 0: + * print("Invalid input:", iElem, "Idx must be non-negative!") + * return None # <<<<<<<<<<<<<< + * idx = iElem + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1570 + * idx = iElem + * elif isinstance(iElem, (int, long)): + * if iElem < 0: # <<<<<<<<<<<<<< + * print("Invalid input:", iElem, "Idx must be non-negative!") + * return None + */ + } + + /* "PyCafeDefs.pxi":1573 + * print("Invalid input:", iElem, "Idx must be non-negative!") + * return None + * idx = iElem # <<<<<<<<<<<<<< + * + * if iElem is not None: + */ + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_iElem); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1573, __pyx_L1_error) + __pyx_v_idx = __pyx_t_4; + + /* "PyCafeDefs.pxi":1569 + * return None + * idx = iElem + * elif isinstance(iElem, (int, long)): # <<<<<<<<<<<<<< + * if iElem < 0: + * print("Invalid input:", iElem, "Idx must be non-negative!") + */ + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1575 + * idx = iElem + * + * if iElem is not None: # <<<<<<<<<<<<<< + * if len(self.pvdata[idx].value) == 1: + * return self.pvdata[idx].value[0] + */ + __pyx_t_2 = (__pyx_v_iElem != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1576 + * + * if iElem is not None: + * if len(self.pvdata[idx].value) == 1: # <<<<<<<<<<<<<< + * return self.pvdata[idx].value[0] + * else: + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1576, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_value_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1576, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((__pyx_t_7 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1577 + * if iElem is not None: + * if len(self.pvdata[idx].value) == 1: + * return self.pvdata[idx].value[0] # <<<<<<<<<<<<<< + * else: + * return self.pvdata[idx].value + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1577, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1576 + * + * if iElem is not None: + * if len(self.pvdata[idx].value) == 1: # <<<<<<<<<<<<<< + * return self.pvdata[idx].value[0] + * else: + */ + goto __pyx_L9; + } + + /* "PyCafeDefs.pxi":1579 + * return self.pvdata[idx].value[0] + * else: + * return self.pvdata[idx].value # <<<<<<<<<<<<<< + * vall = [] + * for i in range(0, self.nPV): + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1579, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L9:; + + /* "PyCafeDefs.pxi":1575 + * idx = iElem + * + * if iElem is not None: # <<<<<<<<<<<<<< + * if len(self.pvdata[idx].value) == 1: + * return self.pvdata[idx].value[0] + */ + } + + /* "PyCafeDefs.pxi":1580 + * else: + * return self.pvdata[idx].value + * vall = [] # <<<<<<<<<<<<<< + * for i in range(0, self.nPV): + * if len(self.pvdata[i].value) == 1: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_vall = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1581 + * return self.pvdata[idx].value + * vall = [] + * for i in range(0, self.nPV): # <<<<<<<<<<<<<< + * if len(self.pvdata[i].value) == 1: + * vall.append(self.pvdata[i].value[0]) + */ + __pyx_t_8 = __pyx_v_self->nPV; + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafeDefs.pxi":1582 + * vall = [] + * for i in range(0, self.nPV): + * if len(self.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * vall.append(self.pvdata[i].value[0]) + * else: + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1582, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_value_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1582, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((__pyx_t_7 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1583 + * for i in range(0, self.nPV): + * if len(self.pvdata[i].value) == 1: + * vall.append(self.pvdata[i].value[0]) # <<<<<<<<<<<<<< + * else: + * vall.append(self.pvdata[i].value) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1583, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_vall, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1582 + * vall = [] + * for i in range(0, self.nPV): + * if len(self.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * vall.append(self.pvdata[i].value[0]) + * else: + */ + goto __pyx_L12; + } + + /* "PyCafeDefs.pxi":1585 + * vall.append(self.pvdata[i].value[0]) + * else: + * vall.append(self.pvdata[i].value) # <<<<<<<<<<<<<< + * return vall + * + */ + /*else*/ { + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1585, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_vall, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1585, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L12:; + } + + /* "PyCafeDefs.pxi":1586 + * else: + * vall.append(self.pvdata[i].value) + * return vall # <<<<<<<<<<<<<< + * + * def getPV(self, iElem=None): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_vall); + __pyx_r = __pyx_v_vall; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1559 + * self.daqStop = ds + * + * def getVal(self, iElem=None): # <<<<<<<<<<<<<< + * + * cdef int idx = -1 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.BSData.getVal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_vall); + __Pyx_XDECREF(__pyx_v_iElem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1588 + * return vall + * + * def getPV(self, iElem=None): # <<<<<<<<<<<<<< + * + * cdef int idx = -1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_17getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_17getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_iElem = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPV (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iElem,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iElem); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPV") < 0)) __PYX_ERR(2, 1588, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_iElem = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPV", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1588, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.BSData.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6BSData_16getPV(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), __pyx_v_iElem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_16getPV(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_iElem) { + int __pyx_v_idx; + PyObject *__pyx_v_vall = NULL; + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + unsigned int __pyx_t_8; + long __pyx_t_9; + int __pyx_t_10; + __Pyx_RefNannySetupContext("getPV", 0); + __Pyx_INCREF(__pyx_v_iElem); + + /* "PyCafeDefs.pxi":1590 + * def getPV(self, iElem=None): + * + * cdef int idx = -1 # <<<<<<<<<<<<<< + * + * if isinstance(iElem, (str)): + */ + __pyx_v_idx = -1; + + /* "PyCafeDefs.pxi":1592 + * cdef int idx = -1 + * + * if isinstance(iElem, (str)): # <<<<<<<<<<<<<< + * iElem = self.pvIdx.get(iElem) + * if iElem is None: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_iElem); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1593 + * + * if isinstance(iElem, (str)): + * iElem = self.pvIdx.get(iElem) # <<<<<<<<<<<<<< + * if iElem is None: + * return None + */ + if (unlikely(__pyx_v_self->pvIdx == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); + __PYX_ERR(2, 1593, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->pvIdx, __pyx_v_iElem, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_iElem, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1594 + * if isinstance(iElem, (str)): + * iElem = self.pvIdx.get(iElem) + * if iElem is None: # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + __pyx_t_2 = (__pyx_v_iElem == Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1595 + * iElem = self.pvIdx.get(iElem) + * if iElem is None: + * return None # <<<<<<<<<<<<<< + * idx = iElem + * elif isinstance(iElem, (int, long)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1594 + * if isinstance(iElem, (str)): + * iElem = self.pvIdx.get(iElem) + * if iElem is None: # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + } + + /* "PyCafeDefs.pxi":1596 + * if iElem is None: + * return None + * idx = iElem # <<<<<<<<<<<<<< + * elif isinstance(iElem, (int, long)): + * if iElem < 0: + */ + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_iElem); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1596, __pyx_L1_error) + __pyx_v_idx = __pyx_t_4; + + /* "PyCafeDefs.pxi":1592 + * cdef int idx = -1 + * + * if isinstance(iElem, (str)): # <<<<<<<<<<<<<< + * iElem = self.pvIdx.get(iElem) + * if iElem is None: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1597 + * return None + * idx = iElem + * elif isinstance(iElem, (int, long)): # <<<<<<<<<<<<<< + * if iElem < 0: + * print("Invalid input:", iElem, " Idx must be non-negative!") + */ + __pyx_t_2 = PyInt_Check(__pyx_v_iElem); + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_1 = __pyx_t_5; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_iElem); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1598 + * idx = iElem + * elif isinstance(iElem, (int, long)): + * if iElem < 0: # <<<<<<<<<<<<<< + * print("Invalid input:", iElem, " Idx must be non-negative!") + * return None + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_iElem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1598, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1598, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1599 + * elif isinstance(iElem, (int, long)): + * if iElem < 0: + * print("Invalid input:", iElem, " Idx must be non-negative!") # <<<<<<<<<<<<<< + * return None + * idx = iElem + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Invalid_input); + __Pyx_GIVEREF(__pyx_kp_u_Invalid_input); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Invalid_input); + __Pyx_INCREF(__pyx_v_iElem); + __Pyx_GIVEREF(__pyx_v_iElem); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_iElem); + __Pyx_INCREF(__pyx_kp_u_Idx_must_be_non_negative_2); + __Pyx_GIVEREF(__pyx_kp_u_Idx_must_be_non_negative_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Idx_must_be_non_negative_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1600 + * if iElem < 0: + * print("Invalid input:", iElem, " Idx must be non-negative!") + * return None # <<<<<<<<<<<<<< + * idx = iElem + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1598 + * idx = iElem + * elif isinstance(iElem, (int, long)): + * if iElem < 0: # <<<<<<<<<<<<<< + * print("Invalid input:", iElem, " Idx must be non-negative!") + * return None + */ + } + + /* "PyCafeDefs.pxi":1601 + * print("Invalid input:", iElem, " Idx must be non-negative!") + * return None + * idx = iElem # <<<<<<<<<<<<<< + * + * if iElem is not None: + */ + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_iElem); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1601, __pyx_L1_error) + __pyx_v_idx = __pyx_t_4; + + /* "PyCafeDefs.pxi":1597 + * return None + * idx = iElem + * elif isinstance(iElem, (int, long)): # <<<<<<<<<<<<<< + * if iElem < 0: + * print("Invalid input:", iElem, " Idx must be non-negative!") + */ + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1603 + * idx = iElem + * + * if iElem is not None: # <<<<<<<<<<<<<< + * return self.pvdata[idx] + * vall = [] + */ + __pyx_t_2 = (__pyx_v_iElem != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1604 + * + * if iElem is not None: + * return self.pvdata[idx] # <<<<<<<<<<<<<< + * vall = [] + * for i in range(0, self.nPV): + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1604, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1603 + * idx = iElem + * + * if iElem is not None: # <<<<<<<<<<<<<< + * return self.pvdata[idx] + * vall = [] + */ + } + + /* "PyCafeDefs.pxi":1605 + * if iElem is not None: + * return self.pvdata[idx] + * vall = [] # <<<<<<<<<<<<<< + * for i in range(0, self.nPV): + * vall.append(self.pvdata[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_vall = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1606 + * return self.pvdata[idx] + * vall = [] + * for i in range(0, self.nPV): # <<<<<<<<<<<<<< + * vall.append(self.pvdata[i]) + * return vall + */ + __pyx_t_7 = __pyx_v_self->nPV; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafeDefs.pxi":1607 + * vall = [] + * for i in range(0, self.nPV): + * vall.append(self.pvdata[i]) # <<<<<<<<<<<<<< + * return vall + * + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1607, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_vall, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 1607, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafeDefs.pxi":1608 + * for i in range(0, self.nPV): + * vall.append(self.pvdata[i]) + * return vall # <<<<<<<<<<<<<< + * + * def show(self, str BSCA=None, int wf=1): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_vall); + __pyx_r = __pyx_v_vall; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1588 + * return vall + * + * def getPV(self, iElem=None): # <<<<<<<<<<<<<< + * + * cdef int idx = -1 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.BSData.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_vall); + __Pyx_XDECREF(__pyx_v_iElem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1610 + * return vall + * + * def show(self, str BSCA=None, int wf=1): # <<<<<<<<<<<<<< + * + * for i in range(0, self.nPV): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_19show(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_19show(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_BSCA = 0; + int __pyx_v_wf; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_BSCA,&__pyx_n_s_wf,0}; + PyObject* values[2] = {0,0}; + values[0] = ((PyObject*)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_BSCA); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wf); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "show") < 0)) __PYX_ERR(2, 1610, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_BSCA = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_wf = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_wf == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1610, __pyx_L3_error) + } else { + __pyx_v_wf = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("show", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1610, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.BSData.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_BSCA), (&PyUnicode_Type), 1, "BSCA", 1))) __PYX_ERR(2, 1610, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6BSData_18show(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), __pyx_v_BSCA, __pyx_v_wf); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_18show(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_BSCA, int __pyx_v_wf) { + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + unsigned int __pyx_t_2; + long __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_UCS4 __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":1612 + * def show(self, str BSCA=None, int wf=1): + * + * for i in range(0, self.nPV): # <<<<<<<<<<<<<< + * + * if self.BSChannel[i].BSEnabled and self.isBS: + */ + __pyx_t_1 = __pyx_v_self->nPV; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafeDefs.pxi":1614 + * for i in range(0, self.nPV): + * + * if self.BSChannel[i].BSEnabled and self.isBS: # <<<<<<<<<<<<<< + * if BSCA in (None, 'BS'): + * print("---------------------------------") + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1614, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_BSEnabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1614, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_4 = __pyx_t_7; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_7 = (__pyx_v_self->isBS != 0); + __pyx_t_4 = __pyx_t_7; + __pyx_L6_bool_binop_done:; + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1615 + * + * if self.BSChannel[i].BSEnabled and self.isBS: + * if BSCA in (None, 'BS'): # <<<<<<<<<<<<<< + * print("---------------------------------") + * print("pv= %s [%d] BS" % (self.pv[i], i)) + */ + __Pyx_INCREF(__pyx_v_BSCA); + __pyx_t_8 = __pyx_v_BSCA; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_8, Py_None, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1615, __pyx_L1_error) + if (!__pyx_t_7) { + } else { + __pyx_t_4 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_BS, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1615, __pyx_L1_error) + __pyx_t_9 = (__pyx_t_7 != 0); + __pyx_t_4 = __pyx_t_9; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = (__pyx_t_4 != 0); + if (__pyx_t_9) { + + /* "PyCafeDefs.pxi":1616 + * if self.BSChannel[i].BSEnabled and self.isBS: + * if BSCA in (None, 'BS'): + * print("---------------------------------") # <<<<<<<<<<<<<< + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * if wf > 1: + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1617 + * if BSCA in (None, 'BS'): + * print("---------------------------------") + * print("pv= %s [%d] BS" % (self.pv[i], i)) # <<<<<<<<<<<<<< + * if wf > 1: + * self.pvdata[i].showMax(wf) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_pv); + __pyx_t_10 += 4; + __Pyx_GIVEREF(__pyx_kp_u_pv); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_pv); + if (unlikely(__pyx_v_self->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1617, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->pv, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u__36); + __pyx_t_10 += 2; + __Pyx_GIVEREF(__pyx_kp_u__36); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__36); + __pyx_t_12 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u_BS_2); + __pyx_t_10 += 4; + __Pyx_GIVEREF(__pyx_kp_u_BS_2); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_BS_2); + __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1618 + * print("---------------------------------") + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + __pyx_t_9 = ((__pyx_v_wf > 1) != 0); + if (__pyx_t_9) { + + /* "PyCafeDefs.pxi":1619 + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * if wf > 1: + * self.pvdata[i].showMax(wf) # <<<<<<<<<<<<<< + * else: + * self.pvdata[i].show() + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1619, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_showMax); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_wf); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1618 + * print("---------------------------------") + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + goto __pyx_L11; + } + + /* "PyCafeDefs.pxi":1621 + * self.pvdata[i].showMax(wf) + * else: + * self.pvdata[i].show() # <<<<<<<<<<<<<< + * else: + * if BSCA in (None, 'CA'): + */ + /*else*/ { + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1621, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_show); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L11:; + + /* "PyCafeDefs.pxi":1615 + * + * if self.BSChannel[i].BSEnabled and self.isBS: + * if BSCA in (None, 'BS'): # <<<<<<<<<<<<<< + * print("---------------------------------") + * print("pv= %s [%d] BS" % (self.pv[i], i)) + */ + } + + /* "PyCafeDefs.pxi":1614 + * for i in range(0, self.nPV): + * + * if self.BSChannel[i].BSEnabled and self.isBS: # <<<<<<<<<<<<<< + * if BSCA in (None, 'BS'): + * print("---------------------------------") + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1623 + * self.pvdata[i].show() + * else: + * if BSCA in (None, 'CA'): # <<<<<<<<<<<<<< + * print("---------------------------------") + * print("pv= %s [%d] CA" % (self.pv[i], i)) + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_BSCA); + __pyx_t_8 = __pyx_v_BSCA; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_8, Py_None, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1623, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_9 = __pyx_t_4; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_CA, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1623, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_4 != 0); + __pyx_t_9 = __pyx_t_7; + __pyx_L13_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_7 = (__pyx_t_9 != 0); + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1624 + * else: + * if BSCA in (None, 'CA'): + * print("---------------------------------") # <<<<<<<<<<<<<< + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1625 + * if BSCA in (None, 'CA'): + * print("---------------------------------") + * print("pv= %s [%d] CA" % (self.pv[i], i)) # <<<<<<<<<<<<<< + * if wf > 1: + * self.pvdata[i].showMax(wf) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_pv); + __pyx_t_10 += 4; + __Pyx_GIVEREF(__pyx_kp_u_pv); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_pv); + if (unlikely(__pyx_v_self->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1625, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->pv, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_12), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__36); + __pyx_t_10 += 2; + __Pyx_GIVEREF(__pyx_kp_u__36); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__36); + __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u_CA_2); + __pyx_t_10 += 4; + __Pyx_GIVEREF(__pyx_kp_u_CA_2); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_CA_2); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1626 + * print("---------------------------------") + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + __pyx_t_7 = ((__pyx_v_wf > 1) != 0); + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1627 + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: + * self.pvdata[i].showMax(wf) # <<<<<<<<<<<<<< + * else: + * self.pvdata[i].show() + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1627, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_showMax); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_wf); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_6 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1626 + * print("---------------------------------") + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + goto __pyx_L15; + } + + /* "PyCafeDefs.pxi":1629 + * self.pvdata[i].showMax(wf) + * else: + * self.pvdata[i].show() # <<<<<<<<<<<<<< + * print("---------------------------------") + * + */ + /*else*/ { + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1629, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_show); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L15:; + + /* "PyCafeDefs.pxi":1623 + * self.pvdata[i].show() + * else: + * if BSCA in (None, 'CA'): # <<<<<<<<<<<<<< + * print("---------------------------------") + * print("pv= %s [%d] CA" % (self.pv[i], i)) + */ + } + } + __pyx_L5:; + } + + /* "PyCafeDefs.pxi":1630 + * else: + * self.pvdata[i].show() + * print("---------------------------------") # <<<<<<<<<<<<<< + * + * print("overallStatus = %d (%s)" % + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1632 + * print("---------------------------------") + * + * print("overallStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.status, self.statusAsString)) + * if self.pulse_id > 0: + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_overallStatus); + __pyx_t_10 += 19; + __Pyx_GIVEREF(__pyx_kp_u_overallStatus); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_overallStatus); + + /* "PyCafeDefs.pxi":1633 + * + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) # <<<<<<<<<<<<<< + * if self.pulse_id > 0: + * print("pulse_id = %d" % self.pulse_id) + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_10 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__4); + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->statusAsString), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1632 + * print("---------------------------------") + * + * print("overallStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.status, self.statusAsString)) + * if self.pulse_id > 0: + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1634 + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) + * if self.pulse_id > 0: # <<<<<<<<<<<<<< + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % + */ + __pyx_t_7 = ((__pyx_v_self->pulse_id > 0) != 0); + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1635 + * (self.status, self.statusAsString)) + * if self.pulse_id > 0: + * print("pulse_id = %d" % self.pulse_id) # <<<<<<<<<<<<<< + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulse_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_pulse_id_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1636 + * if self.pulse_id > 0: + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % # <<<<<<<<<<<<<< + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_global_timestamp); + __pyx_t_10 += 19; + __Pyx_GIVEREF(__pyx_kp_u_global_timestamp); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_global_timestamp); + + /* "PyCafeDefs.pxi":1637 + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) # <<<<<<<<<<<<<< + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + */ + if (unlikely(__pyx_v_self->global_timestamp == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1637, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->global_timestamp, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u_sec); + __pyx_t_10 += 6; + __Pyx_GIVEREF(__pyx_kp_u_sec); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_sec); + if (unlikely(__pyx_v_self->global_timestamp == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1637, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->global_timestamp, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_12, __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u_nsec); + __pyx_t_10 += 5; + __Pyx_GIVEREF(__pyx_kp_u_nsec); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_nsec); + + /* "PyCafeDefs.pxi":1636 + * if self.pulse_id > 0: + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % # <<<<<<<<<<<<<< + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1638 + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ # <<<<<<<<<<<<<< + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + * self.gtsDate[5], self.gtsDate[6])) + */ + __pyx_t_6 = PyTuple_New(14); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_gtsDate); + __pyx_t_10 += 19; + __Pyx_GIVEREF(__pyx_kp_u_gtsDate); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_gtsDate); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1638, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__10); + + /* "PyCafeDefs.pxi":1639 + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ # <<<<<<<<<<<<<< + * self.gtsDate[5], self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + */ + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1639, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_12, __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1639, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1639, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_12, __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1639, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_kp_u__10); + + /* "PyCafeDefs.pxi":1640 + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + * self.gtsDate[5], self.gtsDate[6])) # <<<<<<<<<<<<<< + * print("nPV = %d" % self.nPV) + * if self.isBS: + */ + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1640, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_12, __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 11, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 12, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1640, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 13, __pyx_t_12); + __pyx_t_12 = 0; + + /* "PyCafeDefs.pxi":1638 + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], \ # <<<<<<<<<<<<<< + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + * self.gtsDate[5], self.gtsDate[6])) + */ + __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_6, 14, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1634 + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) + * if self.pulse_id > 0: # <<<<<<<<<<<<<< + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % + */ + } + + /* "PyCafeDefs.pxi":1641 + * self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], \ + * self.gtsDate[5], self.gtsDate[6])) + * print("nPV = %d" % self.nPV) # <<<<<<<<<<<<<< + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nPV); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_nPV_d, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1642 + * self.gtsDate[5], self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + * if self.isBS: # <<<<<<<<<<<<<< + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + */ + __pyx_t_7 = (__pyx_v_self->isBS != 0); + if (__pyx_t_7) { + + /* "PyCafeDefs.pxi":1643 + * print("nPV = %d" % self.nPV) + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % # <<<<<<<<<<<<<< + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV - self.nChannels)) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_of_which_BS); + __pyx_t_10 += 19; + __Pyx_GIVEREF(__pyx_kp_u_of_which_BS); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_of_which_BS); + + /* "PyCafeDefs.pxi":1644 + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) # <<<<<<<<<<<<<< + * print("of which CA = %d" % (self.nPV - self.nChannels)) + * else: + */ + __pyx_t_12 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_self->nChannels, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_INCREF(__pyx_kp_u_Percentage_with_data); + __pyx_t_10 += 26; + __Pyx_GIVEREF(__pyx_kp_u_Percentage_with_data); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_Percentage_with_data); + __pyx_t_12 = PyFloat_FromDouble(((double)__pyx_v_self->pGoodData)); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_12, __pyx_n_u_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11; + __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_10 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1643 + * print("nPV = %d" % self.nPV) + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % # <<<<<<<<<<<<<< + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV - self.nChannels)) + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1645 + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV - self.nChannels)) # <<<<<<<<<<<<<< + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->nPV - __pyx_v_self->nChannels)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_of_which_CA_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1642 + * self.gtsDate[5], self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + * if self.isBS: # <<<<<<<<<<<<<< + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + */ + goto __pyx_L17; + } + + /* "PyCafeDefs.pxi":1647 + * print("of which CA = %d" % (self.nPV - self.nChannels)) + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) # <<<<<<<<<<<<<< + * print("---------------------------------") + * return + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nPV); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_of_which_CA_d_i_e_all, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L17:; + + /* "PyCafeDefs.pxi":1648 + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + * print("---------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1649 + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + * print("---------------------------------") + * return # <<<<<<<<<<<<<< + * + * def showAll(self, int wf=1): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1610 + * return vall + * + * def show(self, str BSCA=None, int wf=1): # <<<<<<<<<<<<<< + * + * for i in range(0, self.nPV): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("PyCafe.BSData.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1651 + * return + * + * def showAll(self, int wf=1): # <<<<<<<<<<<<<< + * + * for i in range(0, self.nPV): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_21showAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_21showAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_wf; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showAll (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_wf,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wf); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "showAll") < 0)) __PYX_ERR(2, 1651, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_wf = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_wf == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1651, __pyx_L3_error) + } else { + __pyx_v_wf = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("showAll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1651, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.BSData.showAll", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6BSData_20showAll(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), __pyx_v_wf); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_20showAll(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, int __pyx_v_wf) { + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + unsigned int __pyx_t_2; + long __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_UCS4 __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("showAll", 0); + + /* "PyCafeDefs.pxi":1653 + * def showAll(self, int wf=1): + * + * for i in range(0, self.nPV): # <<<<<<<<<<<<<< + * print("---------------------------------") + * if self.BSChannel[i].BSEnabled and self.isBS: + */ + __pyx_t_1 = __pyx_v_self->nPV; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafeDefs.pxi":1654 + * + * for i in range(0, self.nPV): + * print("---------------------------------") # <<<<<<<<<<<<<< + * if self.BSChannel[i].BSEnabled and self.isBS: + * print("pv= %s [%d] BS" % (self.pv[i], i)) + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1655 + * for i in range(0, self.nPV): + * print("---------------------------------") + * if self.BSChannel[i].BSEnabled and self.isBS: # <<<<<<<<<<<<<< + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * else: + */ + if (unlikely(__pyx_v_self->BSChannel == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1655, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->BSChannel, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BSEnabled); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(2, 1655, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_7 = (__pyx_v_self->isBS != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L6_bool_binop_done:; + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1656 + * print("---------------------------------") + * if self.BSChannel[i].BSEnabled and self.isBS: + * print("pv= %s [%d] BS" % (self.pv[i], i)) # <<<<<<<<<<<<<< + * else: + * print("pv= %s [%d] CA" % (self.pv[i], i)) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_pv); + __pyx_t_8 += 4; + __Pyx_GIVEREF(__pyx_kp_u_pv); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_pv); + if (unlikely(__pyx_v_self->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1656, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pv, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__36); + __pyx_t_8 += 2; + __Pyx_GIVEREF(__pyx_kp_u__36); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__36); + __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u_BS_2); + __pyx_t_8 += 4; + __Pyx_GIVEREF(__pyx_kp_u_BS_2); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_BS_2); + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1655 + * for i in range(0, self.nPV): + * print("---------------------------------") + * if self.BSChannel[i].BSEnabled and self.isBS: # <<<<<<<<<<<<<< + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1658 + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * else: + * print("pv= %s [%d] CA" % (self.pv[i], i)) # <<<<<<<<<<<<<< + * if wf > 1: + * self.pvdata[i].showMax(wf) + */ + /*else*/ { + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_pv); + __pyx_t_8 += 4; + __Pyx_GIVEREF(__pyx_kp_u_pv); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_pv); + if (unlikely(__pyx_v_self->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1658, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pv, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_10), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__36); + __pyx_t_8 += 2; + __Pyx_GIVEREF(__pyx_kp_u__36); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__36); + __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u_CA_2); + __pyx_t_8 += 4; + __Pyx_GIVEREF(__pyx_kp_u_CA_2); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_CA_2); + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L5:; + + /* "PyCafeDefs.pxi":1659 + * else: + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + __pyx_t_5 = ((__pyx_v_wf > 1) != 0); + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1660 + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: + * self.pvdata[i].showMax(wf) # <<<<<<<<<<<<<< + * else: + * self.pvdata[i].show() + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1660, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_showMax); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_wf); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1659 + * else: + * print("pv= %s [%d] CA" % (self.pv[i], i)) + * if wf > 1: # <<<<<<<<<<<<<< + * self.pvdata[i].showMax(wf) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafeDefs.pxi":1662 + * self.pvdata[i].showMax(wf) + * else: + * self.pvdata[i].show() # <<<<<<<<<<<<<< + * print("---------------------------------") + * print("overallStatus = %d (%s)" % + */ + /*else*/ { + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1662, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_show); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L8:; + } + + /* "PyCafeDefs.pxi":1663 + * else: + * self.pvdata[i].show() + * print("---------------------------------") # <<<<<<<<<<<<<< + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1664 + * self.pvdata[i].show() + * print("---------------------------------") + * print("overallStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.status, self.statusAsString)) + * print("pulse_id = %d" % self.pulse_id) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_overallStatus); + __pyx_t_8 += 19; + __Pyx_GIVEREF(__pyx_kp_u_overallStatus); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_overallStatus); + + /* "PyCafeDefs.pxi":1665 + * print("---------------------------------") + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) # <<<<<<<<<<<<<< + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % + */ + __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->status, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__4); + __pyx_t_8 += 2; + __Pyx_GIVEREF(__pyx_kp_u__4); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__4); + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->statusAsString), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1664 + * self.pvdata[i].show() + * print("---------------------------------") + * print("overallStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.status, self.statusAsString)) + * print("pulse_id = %d" % self.pulse_id) + */ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1666 + * print("overallStatus = %d (%s)" % + * (self.status, self.statusAsString)) + * print("pulse_id = %d" % self.pulse_id) # <<<<<<<<<<<<<< + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulse_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_pulse_id_d, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1667 + * (self.status, self.statusAsString)) + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % # <<<<<<<<<<<<<< + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_global_timestamp); + __pyx_t_8 += 19; + __Pyx_GIVEREF(__pyx_kp_u_global_timestamp); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_global_timestamp); + + /* "PyCafeDefs.pxi":1668 + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) # <<<<<<<<<<<<<< + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + * self.gtsDate[6])) + */ + if (unlikely(__pyx_v_self->global_timestamp == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1668, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->global_timestamp, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u_sec); + __pyx_t_8 += 6; + __Pyx_GIVEREF(__pyx_kp_u_sec); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_sec); + if (unlikely(__pyx_v_self->global_timestamp == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1668, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->global_timestamp, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u_nsec); + __pyx_t_8 += 5; + __Pyx_GIVEREF(__pyx_kp_u_nsec); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_nsec); + + /* "PyCafeDefs.pxi":1667 + * (self.status, self.statusAsString)) + * print("pulse_id = %d" % self.pulse_id) + * print("global_timestamp = %d sec. %d nsec" % # <<<<<<<<<<<<<< + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + */ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1669 + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], # <<<<<<<<<<<<<< + * self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + */ + __pyx_t_6 = PyTuple_New(14); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_gtsDate); + __pyx_t_8 += 19; + __Pyx_GIVEREF(__pyx_kp_u_gtsDate); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_gtsDate); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_kp_u__10); + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1669, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 11, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__10); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__10); + PyTuple_SET_ITEM(__pyx_t_6, 12, __pyx_kp_u__10); + + /* "PyCafeDefs.pxi":1670 + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + * self.gtsDate[6])) # <<<<<<<<<<<<<< + * print("nPV = %d" % self.nPV) + * if self.isBS: + */ + if (unlikely(__pyx_v_self->gtsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1670, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->gtsDate, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 13, __pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafeDefs.pxi":1669 + * print("global_timestamp = %d sec. %d nsec" % + * (self.global_timestamp[0], self.global_timestamp[1])) + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], # <<<<<<<<<<<<<< + * self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 14, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1671 + * print("gtsDate = %d %d %d %d %d %d %d" % (self.gtsDate[0], self.gtsDate[1], self.gtsDate[2], self.gtsDate[3], self.gtsDate[4], self.gtsDate[5], + * self.gtsDate[6])) + * print("nPV = %d" % self.nPV) # <<<<<<<<<<<<<< + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nPV); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_nPV_d, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1672 + * self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + * if self.isBS: # <<<<<<<<<<<<<< + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + */ + __pyx_t_5 = (__pyx_v_self->isBS != 0); + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1673 + * print("nPV = %d" % self.nPV) + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % # <<<<<<<<<<<<<< + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV-self.nChannels)) + */ + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = 0; + __pyx_t_9 = 127; + __Pyx_INCREF(__pyx_kp_u_of_which_BS); + __pyx_t_8 += 19; + __Pyx_GIVEREF(__pyx_kp_u_of_which_BS); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_of_which_BS); + + /* "PyCafeDefs.pxi":1674 + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) # <<<<<<<<<<<<<< + * print("of which CA = %d" % (self.nPV-self.nChannels)) + * else: + */ + __pyx_t_10 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_self->nChannels, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u_Percentage_with_data); + __pyx_t_8 += 26; + __Pyx_GIVEREF(__pyx_kp_u_Percentage_with_data); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_Percentage_with_data); + __pyx_t_10 = PyFloat_FromDouble(((double)__pyx_v_self->pGoodData)); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_10, __pyx_n_u_f); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_9; + __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_t_8 += 1; + __Pyx_GIVEREF(__pyx_kp_u__5); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__5); + + /* "PyCafeDefs.pxi":1673 + * print("nPV = %d" % self.nPV) + * if self.isBS: + * print("of which BS = %d (Percentage with data = %f)" % # <<<<<<<<<<<<<< + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV-self.nChannels)) + */ + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1675 + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + * print("of which CA = %d" % (self.nPV-self.nChannels)) # <<<<<<<<<<<<<< + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->nPV - __pyx_v_self->nChannels)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_of_which_CA_d, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1672 + * self.gtsDate[6])) + * print("nPV = %d" % self.nPV) + * if self.isBS: # <<<<<<<<<<<<<< + * print("of which BS = %d (Percentage with data = %f)" % + * (self.nChannels, float(self.pGoodData))) + */ + goto __pyx_L9; + } + + /* "PyCafeDefs.pxi":1677 + * print("of which CA = %d" % (self.nPV-self.nChannels)) + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) # <<<<<<<<<<<<<< + * print("pvIdx = ", self.pvIdx) + * print("pv = ", self.pv) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nPV); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_of_which_CA_d_i_e_all, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L9:; + + /* "PyCafeDefs.pxi":1678 + * else: + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + * print("pvIdx = ", self.pvIdx) # <<<<<<<<<<<<<< + * print("pv = ", self.pv) + * print("handle = ", self.handle) + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_pvIdx); + __Pyx_GIVEREF(__pyx_kp_u_pvIdx); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_pvIdx); + __Pyx_INCREF(__pyx_v_self->pvIdx); + __Pyx_GIVEREF(__pyx_v_self->pvIdx); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->pvIdx); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1679 + * print("of which CA = %d (i.e., all)" % (self.nPV) ) + * print("pvIdx = ", self.pvIdx) + * print("pv = ", self.pv) # <<<<<<<<<<<<<< + * print("handle = ", self.handle) + * print("isBS = %d" % self.isBS) + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_pv_2); + __Pyx_GIVEREF(__pyx_kp_u_pv_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_pv_2); + __Pyx_INCREF(__pyx_v_self->pv); + __Pyx_GIVEREF(__pyx_v_self->pv); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->pv); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafeDefs.pxi":1680 + * print("pvIdx = ", self.pvIdx) + * print("pv = ", self.pv) + * print("handle = ", self.handle) # <<<<<<<<<<<<<< + * print("isBS = %d" % self.isBS) + * #print ("nBSEnabled = %d" % self.nBSEnabled) + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_handle_4); + __Pyx_GIVEREF(__pyx_kp_u_handle_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_handle_4); + __Pyx_INCREF(__pyx_v_self->handle); + __Pyx_GIVEREF(__pyx_v_self->handle); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->handle); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1681 + * print("pv = ", self.pv) + * print("handle = ", self.handle) + * print("isBS = %d" % self.isBS) # <<<<<<<<<<<<<< + * #print ("nBSEnabled = %d" % self.nBSEnabled) + * print("nhwm = %d" % self.nhwm) + */ + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->isBS); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_isBS_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1683 + * print("isBS = %d" % self.isBS) + * #print ("nBSEnabled = %d" % self.nBSEnabled) + * print("nhwm = %d" % self.nhwm) # <<<<<<<<<<<<<< + * print("timeoutMS = %d" % self.timeoutMS) + * print("nChannels = %d" % self.nChannels) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->nhwm); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_nhwm_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1684 + * #print ("nBSEnabled = %d" % self.nBSEnabled) + * print("nhwm = %d" % self.nhwm) + * print("timeoutMS = %d" % self.timeoutMS) # <<<<<<<<<<<<<< + * print("nChannels = %d" % self.nChannels) + * print("nNullData = %d" % self.nNullData) + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->timeoutMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_timeoutMS_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1685 + * print("nhwm = %d" % self.nhwm) + * print("timeoutMS = %d" % self.timeoutMS) + * print("nChannels = %d" % self.nChannels) # <<<<<<<<<<<<<< + * print("nNullData = %d" % self.nNullData) + * print("pGoodData = %f" % float(self.pGoodData)) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nChannels); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_nChannels_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1686 + * print("timeoutMS = %d" % self.timeoutMS) + * print("nChannels = %d" % self.nChannels) + * print("nNullData = %d" % self.nNullData) # <<<<<<<<<<<<<< + * print("pGoodData = %f" % float(self.pGoodData)) + * print("---------------------------------") + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nNullData); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_nNullData_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1687 + * print("nChannels = %d" % self.nChannels) + * print("nNullData = %d" % self.nNullData) + * print("pGoodData = %f" % float(self.pGoodData)) # <<<<<<<<<<<<<< + * print("---------------------------------") + * return + */ + __pyx_t_4 = PyFloat_FromDouble(((double)__pyx_v_self->pGoodData)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_pGoodData_f, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1688 + * print("nNullData = %d" % self.nNullData) + * print("pGoodData = %f" % float(self.pGoodData)) + * print("---------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1689 + * print("pGoodData = %f" % float(self.pGoodData)) + * print("---------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1651 + * return + * + * def showAll(self, int wf=1): # <<<<<<<<<<<<<< + * + * for i in range(0, self.nPV): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.BSData.showAll", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1395 + * + * cdef class BSData: + * cdef readonly string htype # <<<<<<<<<<<<<< + * cdef readonly unsigned long long pulse_id + * cdef readonly list BSChannel + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_5htype_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_5htype_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_5htype___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_5htype___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->htype); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.htype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1396 + * cdef class BSData: + * cdef readonly string htype + * cdef readonly unsigned long long pulse_id # <<<<<<<<<<<<<< + * cdef readonly list BSChannel + * cdef readonly list pv + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_8pulse_id_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_8pulse_id_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_8pulse_id___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_8pulse_id___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulse_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.pulse_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1397 + * cdef readonly string htype + * cdef readonly unsigned long long pulse_id + * cdef readonly list BSChannel # <<<<<<<<<<<<<< + * cdef readonly list pv + * cdef readonly dict pvIdx + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9BSChannel_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9BSChannel_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_9BSChannel___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_9BSChannel___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->BSChannel); + __pyx_r = __pyx_v_self->BSChannel; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1398 + * cdef readonly unsigned long long pulse_id + * cdef readonly list BSChannel + * cdef readonly list pv # <<<<<<<<<<<<<< + * cdef readonly dict pvIdx + * cdef readonly list handle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_2pv_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_2pv_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_2pv___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_2pv___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pv); + __pyx_r = __pyx_v_self->pv; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1399 + * cdef readonly list BSChannel + * cdef readonly list pv + * cdef readonly dict pvIdx # <<<<<<<<<<<<<< + * cdef readonly list handle + * cdef readonly list global_timestamp + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_5pvIdx_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_5pvIdx_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_5pvIdx___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_5pvIdx___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pvIdx); + __pyx_r = __pyx_v_self->pvIdx; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1400 + * cdef readonly list pv + * cdef readonly dict pvIdx + * cdef readonly list handle # <<<<<<<<<<<<<< + * cdef readonly list global_timestamp + * cdef readonly list gtsDate + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_6handle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_6handle___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_6handle___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->handle); + __pyx_r = __pyx_v_self->handle; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1401 + * cdef readonly dict pvIdx + * cdef readonly list handle + * cdef readonly list global_timestamp # <<<<<<<<<<<<<< + * cdef readonly list gtsDate + * cdef readonly bint isBS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_16global_timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_16global_timestamp_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_16global_timestamp___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_16global_timestamp___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->global_timestamp); + __pyx_r = __pyx_v_self->global_timestamp; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1402 + * cdef readonly list handle + * cdef readonly list global_timestamp + * cdef readonly list gtsDate # <<<<<<<<<<<<<< + * cdef readonly bint isBS + * cdef readonly unsigned int nPV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_7gtsDate_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_7gtsDate_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_7gtsDate___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_7gtsDate___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->gtsDate); + __pyx_r = __pyx_v_self->gtsDate; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1403 + * cdef readonly list global_timestamp + * cdef readonly list gtsDate + * cdef readonly bint isBS # <<<<<<<<<<<<<< + * cdef readonly unsigned int nPV + * cdef readonly unsigned int nBSEnabled + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_4isBS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_4isBS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_4isBS___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_4isBS___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->isBS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.isBS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1404 + * cdef readonly list gtsDate + * cdef readonly bint isBS + * cdef readonly unsigned int nPV # <<<<<<<<<<<<<< + * cdef readonly unsigned int nBSEnabled + * cdef readonly unsigned short nhwm + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_3nPV_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_3nPV_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_3nPV___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_3nPV___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nPV); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.nPV.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1405 + * cdef readonly bint isBS + * cdef readonly unsigned int nPV + * cdef readonly unsigned int nBSEnabled # <<<<<<<<<<<<<< + * cdef readonly unsigned short nhwm + * cdef readonly int timeoutMS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_10nBSEnabled_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_10nBSEnabled_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_10nBSEnabled___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_10nBSEnabled___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nBSEnabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.nBSEnabled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1406 + * cdef readonly unsigned int nPV + * cdef readonly unsigned int nBSEnabled + * cdef readonly unsigned short nhwm # <<<<<<<<<<<<<< + * cdef readonly int timeoutMS + * cdef readonly unsigned int nChannels + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_4nhwm_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_4nhwm_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_4nhwm___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_4nhwm___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->nhwm); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.nhwm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1407 + * cdef readonly unsigned int nBSEnabled + * cdef readonly unsigned short nhwm + * cdef readonly int timeoutMS # <<<<<<<<<<<<<< + * cdef readonly unsigned int nChannels + * cdef readonly unsigned int nNullData + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9timeoutMS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9timeoutMS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_9timeoutMS___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_9timeoutMS___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->timeoutMS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.timeoutMS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1408 + * cdef readonly unsigned short nhwm + * cdef readonly int timeoutMS + * cdef readonly unsigned int nChannels # <<<<<<<<<<<<<< + * cdef readonly unsigned int nNullData + * cdef readonly float pGoodData + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9nChannels_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9nChannels_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_9nChannels___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_9nChannels___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.nChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1409 + * cdef readonly int timeoutMS + * cdef readonly unsigned int nChannels + * cdef readonly unsigned int nNullData # <<<<<<<<<<<<<< + * cdef readonly float pGoodData + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9nNullData_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9nNullData_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_9nNullData___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_9nNullData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nNullData); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.nNullData.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1410 + * cdef readonly unsigned int nChannels + * cdef readonly unsigned int nNullData + * cdef readonly float pGoodData # <<<<<<<<<<<<<< + * cdef readonly int status + * cdef readonly statusAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_9pGoodData_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_9pGoodData_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_9pGoodData___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_9pGoodData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pGoodData); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.pGoodData.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1411 + * cdef readonly unsigned int nNullData + * cdef readonly float pGoodData + * cdef readonly int status # <<<<<<<<<<<<<< + * cdef readonly statusAsString + * cdef public bint daqStop + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_6status___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_6status___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1412 + * cdef readonly float pGoodData + * cdef readonly int status + * cdef readonly statusAsString # <<<<<<<<<<<<<< + * cdef public bint daqStop + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_14statusAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_14statusAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_14statusAsString___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_14statusAsString___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->statusAsString); + __pyx_r = __pyx_v_self->statusAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1413 + * cdef readonly int status + * cdef readonly statusAsString + * cdef public bint daqStop # <<<<<<<<<<<<<< + * + * cdef readonly list hasNewData + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_7daqStop_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_7daqStop_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_7daqStop___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_7daqStop___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->daqStop); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.daqStop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6BSData_7daqStop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_6BSData_7daqStop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_7daqStop_2__set__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6BSData_7daqStop_2__set__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1413, __pyx_L1_error) + __pyx_v_self->daqStop = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.BSData.daqStop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1415 + * cdef public bint daqStop + * + * cdef readonly list hasNewData # <<<<<<<<<<<<<< + * cdef readonly list pvdata + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_10hasNewData_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_10hasNewData_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_10hasNewData___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_10hasNewData___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->hasNewData); + __pyx_r = __pyx_v_self->hasNewData; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1416 + * + * cdef readonly list hasNewData + * cdef readonly list pvdata # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_6pvdata_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_6pvdata_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_6pvdata___get__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_6pvdata___get__(struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pvdata); + __pyx_r = __pyx_v_self->pvdata; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_22__reduce_cython__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_BSData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6BSData_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6BSData_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6BSData_24__setstate_cython__(((struct __pyx_obj_6PyCafe_BSData *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6BSData_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_BSData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.BSData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1712 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.isAllOK = False + * self.isAllXOK = False + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_10SFDBPMData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_10SFDBPMData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData___cinit__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_10SFDBPMData___cinit__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":1713 + * + * def __cinit__(self): + * self.isAllOK = False # <<<<<<<<<<<<<< + * self.isAllXOK = False + * self.isAllYOK = False + */ + __pyx_v_self->isAllOK = 0; + + /* "PyCafeDefs.pxi":1714 + * def __cinit__(self): + * self.isAllOK = False + * self.isAllXOK = False # <<<<<<<<<<<<<< + * self.isAllYOK = False + * self.isAllQOK = False + */ + __pyx_v_self->isAllXOK = 0; + + /* "PyCafeDefs.pxi":1715 + * self.isAllOK = False + * self.isAllXOK = False + * self.isAllYOK = False # <<<<<<<<<<<<<< + * self.isAllQOK = False + * self.x = [] + */ + __pyx_v_self->isAllYOK = 0; + + /* "PyCafeDefs.pxi":1716 + * self.isAllXOK = False + * self.isAllYOK = False + * self.isAllQOK = False # <<<<<<<<<<<<<< + * self.x = [] + * self.y = [] + */ + __pyx_v_self->isAllQOK = 0; + + /* "PyCafeDefs.pxi":1717 + * self.isAllYOK = False + * self.isAllQOK = False + * self.x = [] # <<<<<<<<<<<<<< + * self.y = [] + * self.q = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->x); + __Pyx_DECREF(__pyx_v_self->x); + __pyx_v_self->x = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1718 + * self.isAllQOK = False + * self.x = [] + * self.y = [] # <<<<<<<<<<<<<< + * self.q = [] + * self.Energy = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->y); + __Pyx_DECREF(__pyx_v_self->y); + __pyx_v_self->y = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1719 + * self.x = [] + * self.y = [] + * self.q = [] # <<<<<<<<<<<<<< + * self.Energy = [] + * self.xStatus = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->q); + __Pyx_DECREF(__pyx_v_self->q); + __pyx_v_self->q = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1720 + * self.y = [] + * self.q = [] + * self.Energy = [] # <<<<<<<<<<<<<< + * self.xStatus = [] + * self.yStatus = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->Energy); + __Pyx_DECREF(__pyx_v_self->Energy); + __pyx_v_self->Energy = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1721 + * self.q = [] + * self.Energy = [] + * self.xStatus = [] # <<<<<<<<<<<<<< + * self.yStatus = [] + * self.qStatus = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->xStatus); + __Pyx_DECREF(__pyx_v_self->xStatus); + __pyx_v_self->xStatus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1722 + * self.Energy = [] + * self.xStatus = [] + * self.yStatus = [] # <<<<<<<<<<<<<< + * self.qStatus = [] + * self.EnergyStatus = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->yStatus); + __Pyx_DECREF(__pyx_v_self->yStatus); + __pyx_v_self->yStatus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1723 + * self.xStatus = [] + * self.yStatus = [] + * self.qStatus = [] # <<<<<<<<<<<<<< + * self.EnergyStatus = [] + * self.device = [] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->qStatus); + __Pyx_DECREF(__pyx_v_self->qStatus); + __pyx_v_self->qStatus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1724 + * self.yStatus = [] + * self.qStatus = [] + * self.EnergyStatus = [] # <<<<<<<<<<<<<< + * self.device = [] + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->EnergyStatus); + __Pyx_DECREF(__pyx_v_self->EnergyStatus); + __pyx_v_self->EnergyStatus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1725 + * self.qStatus = [] + * self.EnergyStatus = [] + * self.device = [] # <<<<<<<<<<<<<< + * + * # self.offs_x=[] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->device); + __Pyx_DECREF(__pyx_v_self->device); + __pyx_v_self->device = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1712 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.isAllOK = False + * self.isAllXOK = False + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1693 + * + * cdef class SFDBPMData: + * cdef readonly list x # <<<<<<<<<<<<<< + * cdef readonly list y + * cdef readonly list q + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1x_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1x_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_1x___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1x___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->x); + __pyx_r = __pyx_v_self->x; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1694 + * cdef class SFDBPMData: + * cdef readonly list x + * cdef readonly list y # <<<<<<<<<<<<<< + * cdef readonly list q + * cdef readonly list Energy + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1y_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1y_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_1y___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1y___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->y); + __pyx_r = __pyx_v_self->y; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1695 + * cdef readonly list x + * cdef readonly list y + * cdef readonly list q # <<<<<<<<<<<<<< + * cdef readonly list Energy + * cdef readonly list xStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1q_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_1q_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_1q___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_1q___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->q); + __pyx_r = __pyx_v_self->q; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1696 + * cdef readonly list y + * cdef readonly list q + * cdef readonly list Energy # <<<<<<<<<<<<<< + * cdef readonly list xStatus + * cdef readonly list yStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6Energy_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6Energy_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_6Energy___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6Energy___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->Energy); + __pyx_r = __pyx_v_self->Energy; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1697 + * cdef readonly list q + * cdef readonly list Energy + * cdef readonly list xStatus # <<<<<<<<<<<<<< + * cdef readonly list yStatus + * cdef readonly list qStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7xStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7xStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_7xStatus___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7xStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->xStatus); + __pyx_r = __pyx_v_self->xStatus; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1698 + * cdef readonly list Energy + * cdef readonly list xStatus + * cdef readonly list yStatus # <<<<<<<<<<<<<< + * cdef readonly list qStatus + * cdef readonly list EnergyStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7yStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7yStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_7yStatus___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7yStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->yStatus); + __pyx_r = __pyx_v_self->yStatus; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1699 + * cdef readonly list xStatus + * cdef readonly list yStatus + * cdef readonly list qStatus # <<<<<<<<<<<<<< + * cdef readonly list EnergyStatus + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7qStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7qStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_7qStatus___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7qStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->qStatus); + __pyx_r = __pyx_v_self->qStatus; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1700 + * cdef readonly list yStatus + * cdef readonly list qStatus + * cdef readonly list EnergyStatus # <<<<<<<<<<<<<< + * + * # cdef readonly list offs_x + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_12EnergyStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_12EnergyStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_12EnergyStatus___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_12EnergyStatus___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->EnergyStatus); + __pyx_r = __pyx_v_self->EnergyStatus; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1705 + * # cdef readonly list offs_y + * + * cdef readonly bint isAllXOK # <<<<<<<<<<<<<< + * cdef readonly bint isAllYOK + * cdef readonly bint isAllQOK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllXOK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllXOK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_8isAllXOK___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllXOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->isAllXOK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.isAllXOK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1706 + * + * cdef readonly bint isAllXOK + * cdef readonly bint isAllYOK # <<<<<<<<<<<<<< + * cdef readonly bint isAllQOK + * cdef readonly bint isAllOK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllYOK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllYOK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_8isAllYOK___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllYOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->isAllYOK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.isAllYOK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1707 + * cdef readonly bint isAllXOK + * cdef readonly bint isAllYOK + * cdef readonly bint isAllQOK # <<<<<<<<<<<<<< + * cdef readonly bint isAllOK + * cdef readonly list device + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllQOK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_8isAllQOK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_8isAllQOK___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_8isAllQOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->isAllQOK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.isAllQOK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1708 + * cdef readonly bint isAllYOK + * cdef readonly bint isAllQOK + * cdef readonly bint isAllOK # <<<<<<<<<<<<<< + * cdef readonly list device + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7isAllOK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_7isAllOK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_7isAllOK___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_7isAllOK___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->isAllOK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.isAllOK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1709 + * cdef readonly bint isAllQOK + * cdef readonly bint isAllOK + * cdef readonly list device # <<<<<<<<<<<<<< + * cdef readonly int status + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6device_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6device_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_6device___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6device___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->device); + __pyx_r = __pyx_v_self->device; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1710 + * cdef readonly bint isAllOK + * cdef readonly list device + * cdef readonly int status # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_6status___get__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_6status___get__(struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_2__reduce_cython__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_10SFDBPMData_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_10SFDBPMData_4__setstate_cython__(((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_10SFDBPMData_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.SFDBPMData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1733 + * ################################################################################# + * + * cdef SFDBPMData dbpmHolderToStruct(DBPMKeeper d): # <<<<<<<<<<<<<< + * cdef SFDBPMData dbpm = SFDBPMData() + * + */ + +static struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_f_6PyCafe_dbpmHolderToStruct(DBPMKeeper __pyx_v_d) { + struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_v_dbpm = 0; + unsigned int __pyx_v_i; + struct __pyx_obj_6PyCafe_SFDBPMData *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::vector ::size_type __pyx_t_2; + std::vector ::size_type __pyx_t_3; + unsigned int __pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("dbpmHolderToStruct", 0); + + /* "PyCafeDefs.pxi":1734 + * + * cdef SFDBPMData dbpmHolderToStruct(DBPMKeeper d): + * cdef SFDBPMData dbpm = SFDBPMData() # <<<<<<<<<<<<<< + * + * cdef unsigned int i + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_SFDBPMData)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_dbpm = ((struct __pyx_obj_6PyCafe_SFDBPMData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1744 + * # dbpm.x=np.array(mvDouble) + * + * for i in range(0, d.getX().size()): # <<<<<<<<<<<<<< + * + * dbpm.x.append(d.getX()[i].getValue()) + */ + __pyx_t_2 = __pyx_v_d.getX().size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafeDefs.pxi":1746 + * for i in range(0, d.getX().size()): + * + * dbpm.x.append(d.getX()[i].getValue()) # <<<<<<<<<<<<<< + * dbpm.y.append(d.getY()[i].getValue()) + * dbpm.q.append(d.getQ()[i].getValue()) + */ + if (unlikely(__pyx_v_dbpm->x == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1746, __pyx_L1_error) + } + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_d.getX()[__pyx_v_i]).getValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->x, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1746, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1747 + * + * dbpm.x.append(d.getX()[i].getValue()) + * dbpm.y.append(d.getY()[i].getValue()) # <<<<<<<<<<<<<< + * dbpm.q.append(d.getQ()[i].getValue()) + * dbpm.Energy.append(d.getEnergy()[i].getValue()) + */ + if (unlikely(__pyx_v_dbpm->y == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1747, __pyx_L1_error) + } + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_d.getY()[__pyx_v_i]).getValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->y, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1747, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1748 + * dbpm.x.append(d.getX()[i].getValue()) + * dbpm.y.append(d.getY()[i].getValue()) + * dbpm.q.append(d.getQ()[i].getValue()) # <<<<<<<<<<<<<< + * dbpm.Energy.append(d.getEnergy()[i].getValue()) + * dbpm.xStatus.append(d.getX()[i].getStatus()) + */ + if (unlikely(__pyx_v_dbpm->q == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1748, __pyx_L1_error) + } + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_d.getQ()[__pyx_v_i]).getValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->q, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1748, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1749 + * dbpm.y.append(d.getY()[i].getValue()) + * dbpm.q.append(d.getQ()[i].getValue()) + * dbpm.Energy.append(d.getEnergy()[i].getValue()) # <<<<<<<<<<<<<< + * dbpm.xStatus.append(d.getX()[i].getStatus()) + * dbpm.yStatus.append(d.getY()[i].getStatus()) + */ + if (unlikely(__pyx_v_dbpm->Energy == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1749, __pyx_L1_error) + } + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_d.getEnergy()[__pyx_v_i]).getValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->Energy, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1749, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1750 + * dbpm.q.append(d.getQ()[i].getValue()) + * dbpm.Energy.append(d.getEnergy()[i].getValue()) + * dbpm.xStatus.append(d.getX()[i].getStatus()) # <<<<<<<<<<<<<< + * dbpm.yStatus.append(d.getY()[i].getStatus()) + * dbpm.qStatus.append(d.getQ()[i].getStatus()) + */ + if (unlikely(__pyx_v_dbpm->xStatus == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1750, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_d.getX()[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->xStatus, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1750, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1751 + * dbpm.Energy.append(d.getEnergy()[i].getValue()) + * dbpm.xStatus.append(d.getX()[i].getStatus()) + * dbpm.yStatus.append(d.getY()[i].getStatus()) # <<<<<<<<<<<<<< + * dbpm.qStatus.append(d.getQ()[i].getStatus()) + * dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) + */ + if (unlikely(__pyx_v_dbpm->yStatus == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1751, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_d.getY()[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->yStatus, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1752 + * dbpm.xStatus.append(d.getX()[i].getStatus()) + * dbpm.yStatus.append(d.getY()[i].getStatus()) + * dbpm.qStatus.append(d.getQ()[i].getStatus()) # <<<<<<<<<<<<<< + * dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) + * + */ + if (unlikely(__pyx_v_dbpm->qStatus == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1752, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_d.getQ()[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->qStatus, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1752, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1753 + * dbpm.yStatus.append(d.getY()[i].getStatus()) + * dbpm.qStatus.append(d.getQ()[i].getStatus()) + * dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) # <<<<<<<<<<<<<< + * + * dbpm.isAllXOK = d.getIsAllXOK() + */ + if (unlikely(__pyx_v_dbpm->EnergyStatus == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); + __PYX_ERR(2, 1753, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_d.getEnergy()[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_dbpm->EnergyStatus, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 1753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1755 + * dbpm.EnergyStatus.append(d.getEnergy()[i].getStatus()) + * + * dbpm.isAllXOK = d.getIsAllXOK() # <<<<<<<<<<<<<< + * dbpm.isAllYOK = d.getIsAllYOK() + * dbpm.isAllQOK = d.getIsAllQOK() + */ + __pyx_v_dbpm->isAllXOK = __pyx_v_d.getIsAllXOK(); + + /* "PyCafeDefs.pxi":1756 + * + * dbpm.isAllXOK = d.getIsAllXOK() + * dbpm.isAllYOK = d.getIsAllYOK() # <<<<<<<<<<<<<< + * dbpm.isAllQOK = d.getIsAllQOK() + * dbpm.isAllOK = d.getIsAllOK() + */ + __pyx_v_dbpm->isAllYOK = __pyx_v_d.getIsAllYOK(); + + /* "PyCafeDefs.pxi":1757 + * dbpm.isAllXOK = d.getIsAllXOK() + * dbpm.isAllYOK = d.getIsAllYOK() + * dbpm.isAllQOK = d.getIsAllQOK() # <<<<<<<<<<<<<< + * dbpm.isAllOK = d.getIsAllOK() + * dbpm.status = d.getStatus() + */ + __pyx_v_dbpm->isAllQOK = __pyx_v_d.getIsAllQOK(); + + /* "PyCafeDefs.pxi":1758 + * dbpm.isAllYOK = d.getIsAllYOK() + * dbpm.isAllQOK = d.getIsAllQOK() + * dbpm.isAllOK = d.getIsAllOK() # <<<<<<<<<<<<<< + * dbpm.status = d.getStatus() + * return dbpm + */ + __pyx_v_dbpm->isAllOK = __pyx_v_d.getIsAllOK(); + + /* "PyCafeDefs.pxi":1759 + * dbpm.isAllQOK = d.getIsAllQOK() + * dbpm.isAllOK = d.getIsAllOK() + * dbpm.status = d.getStatus() # <<<<<<<<<<<<<< + * return dbpm + * + */ + __pyx_v_dbpm->status = __pyx_v_d.getStatus(); + + /* "PyCafeDefs.pxi":1760 + * dbpm.isAllOK = d.getIsAllOK() + * dbpm.status = d.getStatus() + * return dbpm # <<<<<<<<<<<<<< + * + * ################################################################################# + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_dbpm)); + __pyx_r = __pyx_v_dbpm; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1733 + * ################################################################################# + * + * cdef SFDBPMData dbpmHolderToStruct(DBPMKeeper d): # <<<<<<<<<<<<<< + * cdef SFDBPMData dbpm = SFDBPMData() + * + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_SFDBPMData *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.dbpmHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_dbpm); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1767 + * ################################################################################# + * + * cdef BSDataHolderToStruct(BSDataHolder b): # <<<<<<<<<<<<<< + * + * cdef BSData bsd = BSData() + */ + +static PyObject *__pyx_f_6PyCafe_BSDataHolderToStruct(BSDataHolder __pyx_v_b) { + struct __pyx_obj_6PyCafe_BSData *__pyx_v_bsd = 0; + std::vector __pyx_v_pvd; + unsigned int __pyx_v_i; + etsNorm __pyx_v__etsNorm; + etsDate __pyx_v__etsDate; + HandleHelper __pyx_v_hh; + CAFEStatusCode __pyx_v_csc; + PyObject *__pyx_v_localListToStruct = NULL; + PyObject *__pyx_v_localBSCToStruct = NULL; + PyObject *__pyx_v_ll = 0; + PyObject *__pyx_v_ld = 0; + PyObject *__pyx_v_lt = 0; + CYTHON_UNUSED PyObject *__pyx_v_bscList = 0; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = NULL; + struct __pyx_obj_6PyCafe_bschannel *__pyx_v_bsc = NULL; + unsigned int __pyx_7genexpr__pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + std::vector ::size_type __pyx_t_9; + std::vector ::size_type __pyx_t_10; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + __Pyx_RefNannySetupContext("BSDataHolderToStruct", 0); + + /* "PyCafeDefs.pxi":1769 + * cdef BSDataHolderToStruct(BSDataHolder b): + * + * cdef BSData bsd = BSData() # <<<<<<<<<<<<<< + * cdef vector[PVDataHolder] pvd + * cdef unsigned int i + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_BSData)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bsd = ((struct __pyx_obj_6PyCafe_BSData *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1776 + * cdef HandleHelper hh + * cdef CAFEStatusCode csc + * localListToStruct = [] # <<<<<<<<<<<<<< + * localBSCToStruct = [] + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localListToStruct = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1777 + * cdef CAFEStatusCode csc + * localListToStruct = [] + * localBSCToStruct = [] # <<<<<<<<<<<<<< + * + * bsd.pulse_id = b.getPulse_id() + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localBSCToStruct = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1779 + * localBSCToStruct = [] + * + * bsd.pulse_id = b.getPulse_id() # <<<<<<<<<<<<<< + * bsd.pv = b.getPV() + * bsd.handle = b.getHandles() + */ + __pyx_v_bsd->pulse_id = __pyx_v_b.getPulse_id(); + + /* "PyCafeDefs.pxi":1780 + * + * bsd.pulse_id = b.getPulse_id() + * bsd.pv = b.getPV() # <<<<<<<<<<<<<< + * bsd.handle = b.getHandles() + * bsd.isBS = b.getIsBS() + */ + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_b.getPV()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1780, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_bsd->pv); + __Pyx_DECREF(__pyx_v_bsd->pv); + __pyx_v_bsd->pv = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1781 + * bsd.pulse_id = b.getPulse_id() + * bsd.pv = b.getPV() + * bsd.handle = b.getHandles() # <<<<<<<<<<<<<< + * bsd.isBS = b.getIsBS() + * + */ + __pyx_t_1 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_b.getHandles()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1781, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_bsd->handle); + __Pyx_DECREF(__pyx_v_bsd->handle); + __pyx_v_bsd->handle = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1782 + * bsd.pv = b.getPV() + * bsd.handle = b.getHandles() + * bsd.isBS = b.getIsBS() # <<<<<<<<<<<<<< + * + * bsd.pvIdx = dict([(bsd.pv[i], i) for i in range(0, len(bsd.pv))]) + */ + __pyx_v_bsd->isBS = __pyx_v_b.getIsBS(); + + /* "PyCafeDefs.pxi":1784 + * bsd.isBS = b.getIsBS() + * + * bsd.pvIdx = dict([(bsd.pv[i], i) for i in range(0, len(bsd.pv))]) # <<<<<<<<<<<<<< + * + * # print(bsd.pvIdx.items()) + */ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_bsd->pv; + __Pyx_INCREF(__pyx_t_2); + if (unlikely(__pyx_t_2 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 1784, __pyx_L1_error) + } + __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_7genexpr__pyx_v_i = __pyx_t_5; + if (unlikely(__pyx_v_bsd->pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1784, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_bsd->pv, __pyx_7genexpr__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + } /* exit inner scope */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_bsd->pvIdx); + __Pyx_DECREF(__pyx_v_bsd->pvIdx); + __pyx_v_bsd->pvIdx = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1788 + * # print(bsd.pvIdx.items()) + * + * _etsNorm = b.getGlobal_timestamp() # <<<<<<<<<<<<<< + * + * #print ("pulse_id " , b.getPulse_id()) + */ + __pyx_v__etsNorm = __pyx_v_b.getGlobal_timestamp(); + + /* "PyCafeDefs.pxi":1793 + * #print ("gto ", b.getGlobal_timestamp()) + * + * cpdef ll = [] # <<<<<<<<<<<<<< + * ll.append(_etsNorm.secPastEpoch) + * ll.append(_etsNorm.nsec) + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_ll = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1794 + * + * cpdef ll = [] + * ll.append(_etsNorm.secPastEpoch) # <<<<<<<<<<<<<< + * ll.append(_etsNorm.nsec) + * bsd.global_timestamp = ll + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v__etsNorm.secPastEpoch); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1794, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1795 + * cpdef ll = [] + * ll.append(_etsNorm.secPastEpoch) + * ll.append(_etsNorm.nsec) # <<<<<<<<<<<<<< + * bsd.global_timestamp = ll + * + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v__etsNorm.nsec); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1796 + * ll.append(_etsNorm.secPastEpoch) + * ll.append(_etsNorm.nsec) + * bsd.global_timestamp = ll # <<<<<<<<<<<<<< + * + * _etsDate = hh.unixTimeToDate(_etsNorm) + */ + if (!(likely(PyList_CheckExact(__pyx_v_ll))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ll)->tp_name), 0))) __PYX_ERR(2, 1796, __pyx_L1_error) + __pyx_t_7 = __pyx_v_ll; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_bsd->global_timestamp); + __Pyx_DECREF(__pyx_v_bsd->global_timestamp); + __pyx_v_bsd->global_timestamp = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1798 + * bsd.global_timestamp = ll + * + * _etsDate = hh.unixTimeToDate(_etsNorm) # <<<<<<<<<<<<<< + * cpdef ld = [] + * ld.append(_etsDate.year) + */ + __pyx_v__etsDate = __pyx_v_hh.unixTimeToDate(__pyx_v__etsNorm); + + /* "PyCafeDefs.pxi":1799 + * + * _etsDate = hh.unixTimeToDate(_etsNorm) + * cpdef ld = [] # <<<<<<<<<<<<<< + * ld.append(_etsDate.year) + * ld.append(_etsDate.mon) + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_ld = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1800 + * _etsDate = hh.unixTimeToDate(_etsNorm) + * cpdef ld = [] + * ld.append(_etsDate.year) # <<<<<<<<<<<<<< + * ld.append(_etsDate.mon) + * ld.append(_etsDate.day) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.year); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1800, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1801 + * cpdef ld = [] + * ld.append(_etsDate.year) + * ld.append(_etsDate.mon) # <<<<<<<<<<<<<< + * ld.append(_etsDate.day) + * ld.append(_etsDate.hour) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.mon); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1801, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1802 + * ld.append(_etsDate.year) + * ld.append(_etsDate.mon) + * ld.append(_etsDate.day) # <<<<<<<<<<<<<< + * ld.append(_etsDate.hour) + * ld.append(_etsDate.min) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.day); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1802, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1803 + * ld.append(_etsDate.mon) + * ld.append(_etsDate.day) + * ld.append(_etsDate.hour) # <<<<<<<<<<<<<< + * ld.append(_etsDate.min) + * ld.append(_etsDate.sec) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1803, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1804 + * ld.append(_etsDate.day) + * ld.append(_etsDate.hour) + * ld.append(_etsDate.min) # <<<<<<<<<<<<<< + * ld.append(_etsDate.sec) + * ld.append(_etsDate.nsec) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.min); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1804, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1805 + * ld.append(_etsDate.hour) + * ld.append(_etsDate.min) + * ld.append(_etsDate.sec) # <<<<<<<<<<<<<< + * ld.append(_etsDate.nsec) + * + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.sec); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1806 + * ld.append(_etsDate.min) + * ld.append(_etsDate.sec) + * ld.append(_etsDate.nsec) # <<<<<<<<<<<<<< + * + * bsd.gtsDate = ld + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v__etsDate.nsec); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1806, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1808 + * ld.append(_etsDate.nsec) + * + * bsd.gtsDate = ld # <<<<<<<<<<<<<< + * + * #bsd.isBS = b.getIsBS() + */ + if (!(likely(PyList_CheckExact(__pyx_v_ld))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ld)->tp_name), 0))) __PYX_ERR(2, 1808, __pyx_L1_error) + __pyx_t_7 = __pyx_v_ld; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_bsd->gtsDate); + __Pyx_DECREF(__pyx_v_bsd->gtsDate); + __pyx_v_bsd->gtsDate = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1811 + * + * #bsd.isBS = b.getIsBS() + * bsd.nPV = b.getNPV() # <<<<<<<<<<<<<< + * bsd.timeoutMS = b.getTimeout() + * bsd.nhwm = b.getHWM() + */ + __pyx_v_bsd->nPV = __pyx_v_b.getNPV(); + + /* "PyCafeDefs.pxi":1812 + * #bsd.isBS = b.getIsBS() + * bsd.nPV = b.getNPV() + * bsd.timeoutMS = b.getTimeout() # <<<<<<<<<<<<<< + * bsd.nhwm = b.getHWM() + * + */ + __pyx_v_bsd->timeoutMS = __pyx_v_b.getTimeout(); + + /* "PyCafeDefs.pxi":1813 + * bsd.nPV = b.getNPV() + * bsd.timeoutMS = b.getTimeout() + * bsd.nhwm = b.getHWM() # <<<<<<<<<<<<<< + * + * bsd.status = b.getStatus() + */ + __pyx_v_bsd->nhwm = __pyx_v_b.getHWM(); + + /* "PyCafeDefs.pxi":1815 + * bsd.nhwm = b.getHWM() + * + * bsd.status = b.getStatus() # <<<<<<<<<<<<<< + * bsd.statusAsString = csc.msgIDAsString(bsd.status) + * + */ + __pyx_v_bsd->status = __pyx_v_b.getStatus(); + + /* "PyCafeDefs.pxi":1816 + * + * bsd.status = b.getStatus() + * bsd.statusAsString = csc.msgIDAsString(bsd.status) # <<<<<<<<<<<<<< + * + * pvd = b.getPVDataV() + */ + __pyx_t_7 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_csc.msgIDAsString(__pyx_v_bsd->status)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_bsd->statusAsString); + __Pyx_DECREF(__pyx_v_bsd->statusAsString); + __pyx_v_bsd->statusAsString = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1818 + * bsd.statusAsString = csc.msgIDAsString(bsd.status) + * + * pvd = b.getPVDataV() # <<<<<<<<<<<<<< + * cpdef lt = [] + * cpdef bscList = [] + */ + __pyx_v_pvd = __pyx_v_b.getPVDataV(); + + /* "PyCafeDefs.pxi":1819 + * + * pvd = b.getPVDataV() + * cpdef lt = [] # <<<<<<<<<<<<<< + * cpdef bscList = [] + * + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_lt = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1820 + * pvd = b.getPVDataV() + * cpdef lt = [] + * cpdef bscList = [] # <<<<<<<<<<<<<< + * + * # Would be quicker to have p1 = pvdata() outside loop - check this + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_bscList = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1823 + * + * # Would be quicker to have p1 = pvdata() outside loop - check this + * for i in range(0, pvd.size()): # <<<<<<<<<<<<<< + * p1 = pvdata() + * p1 = PVDataHolderToStruct(pvd[i], dt='native') + */ + __pyx_t_9 = __pyx_v_pvd.size(); + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_10; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1824 + * # Would be quicker to have p1 = pvdata() outside loop - check this + * for i in range(0, pvd.size()): + * p1 = pvdata() # <<<<<<<<<<<<<< + * p1 = PVDataHolderToStruct(pvd[i], dt='native') + * + */ + __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1825 + * for i in range(0, pvd.size()): + * p1 = pvdata() + * p1 = PVDataHolderToStruct(pvd[i], dt='native') # <<<<<<<<<<<<<< + * + * #print ("a: ", p1.tsDate) + */ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.dt = __pyx_n_u_native; + __pyx_t_7 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_11)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1828 + * + * #print ("a: ", p1.tsDate) + * lt = [] # <<<<<<<<<<<<<< + * bsc = bschannel() + * + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF_SET(__pyx_v_lt, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1829 + * #print ("a: ", p1.tsDate) + * lt = [] + * bsc = bschannel() # <<<<<<<<<<<<<< + * + * if b.getBSChannel(i).isBSEnabled() and bsd.isBS: + */ + __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_bschannel)); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_bsc, ((struct __pyx_obj_6PyCafe_bschannel *)__pyx_t_7)); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1831 + * bsc = bschannel() + * + * if b.getBSChannel(i).isBSEnabled() and bsd.isBS: # <<<<<<<<<<<<<< + * bsc.BSEnabled = True + * _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + */ + __pyx_t_13 = (__pyx_v_b.getBSChannel(__pyx_v_i).isBSEnabled() != 0); + if (__pyx_t_13) { + } else { + __pyx_t_12 = __pyx_t_13; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_13 = (__pyx_v_bsd->isBS != 0); + __pyx_t_12 = __pyx_t_13; + __pyx_L8_bool_binop_done:; + if (__pyx_t_12) { + + /* "PyCafeDefs.pxi":1832 + * + * if b.getBSChannel(i).isBSEnabled() and bsd.isBS: + * bsc.BSEnabled = True # <<<<<<<<<<<<<< + * _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) + */ + __pyx_v_bsc->BSEnabled = 1; + + /* "PyCafeDefs.pxi":1833 + * if b.getBSChannel(i).isBSEnabled() and bsd.isBS: + * bsc.BSEnabled = True + * _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) + * else: + */ + __pyx_v__etsNorm = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsUInt32(); + + /* "PyCafeDefs.pxi":1834 + * bsc.BSEnabled = True + * _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) # <<<<<<<<<<<<<< + * else: + * _etsDate = pvd[i].getEpicsTimeStampAsDate() + */ + __pyx_v__etsDate = (__pyx_v_pvd[__pyx_v_i]).getUnixTimeAsDate(__pyx_v__etsNorm); + + /* "PyCafeDefs.pxi":1831 + * bsc = bschannel() + * + * if b.getBSChannel(i).isBSEnabled() and bsd.isBS: # <<<<<<<<<<<<<< + * bsc.BSEnabled = True + * _etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + */ + goto __pyx_L7; + } + + /* "PyCafeDefs.pxi":1836 + * _etsDate = pvd[i].getUnixTimeAsDate(_etsNorm) + * else: + * _etsDate = pvd[i].getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * lt.append(_etsDate.year) + * lt.append(_etsDate.mon) + */ + /*else*/ { + __pyx_v__etsDate = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsDate(); + } + __pyx_L7:; + + /* "PyCafeDefs.pxi":1837 + * else: + * _etsDate = pvd[i].getEpicsTimeStampAsDate() + * lt.append(_etsDate.year) # <<<<<<<<<<<<<< + * lt.append(_etsDate.mon) + * lt.append(_etsDate.day) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.year); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1837, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1838 + * _etsDate = pvd[i].getEpicsTimeStampAsDate() + * lt.append(_etsDate.year) + * lt.append(_etsDate.mon) # <<<<<<<<<<<<<< + * lt.append(_etsDate.day) + * lt.append(_etsDate.hour) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.mon); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1838, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1839 + * lt.append(_etsDate.year) + * lt.append(_etsDate.mon) + * lt.append(_etsDate.day) # <<<<<<<<<<<<<< + * lt.append(_etsDate.hour) + * lt.append(_etsDate.min) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.day); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1840 + * lt.append(_etsDate.mon) + * lt.append(_etsDate.day) + * lt.append(_etsDate.hour) # <<<<<<<<<<<<<< + * lt.append(_etsDate.min) + * lt.append(_etsDate.sec) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1840, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1841 + * lt.append(_etsDate.day) + * lt.append(_etsDate.hour) + * lt.append(_etsDate.min) # <<<<<<<<<<<<<< + * lt.append(_etsDate.sec) + * lt.append(_etsDate.nsec) + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.min); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1841, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1842 + * lt.append(_etsDate.hour) + * lt.append(_etsDate.min) + * lt.append(_etsDate.sec) # <<<<<<<<<<<<<< + * lt.append(_etsDate.nsec) + * p1.tsDate = lt + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v__etsDate.sec); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1842, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1843 + * lt.append(_etsDate.min) + * lt.append(_etsDate.sec) + * lt.append(_etsDate.nsec) # <<<<<<<<<<<<<< + * p1.tsDate = lt + * #print ("b: ", p1.tsDate) + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v__etsDate.nsec); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_lt, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1843, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1844 + * lt.append(_etsDate.sec) + * lt.append(_etsDate.nsec) + * p1.tsDate = lt # <<<<<<<<<<<<<< + * #print ("b: ", p1.tsDate) + * localListToStruct.append(p1) + */ + if (!(likely(PyList_CheckExact(__pyx_v_lt))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_lt)->tp_name), 0))) __PYX_ERR(2, 1844, __pyx_L1_error) + __pyx_t_7 = __pyx_v_lt; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":1846 + * p1.tsDate = lt + * #print ("b: ", p1.tsDate) + * localListToStruct.append(p1) # <<<<<<<<<<<<<< + * localBSCToStruct.append(bsc) + * + */ + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_localListToStruct, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1846, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1847 + * #print ("b: ", p1.tsDate) + * localListToStruct.append(p1) + * localBSCToStruct.append(bsc) # <<<<<<<<<<<<<< + * + * bsd.pvdata = localListToStruct + */ + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_localBSCToStruct, ((PyObject *)__pyx_v_bsc)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(2, 1847, __pyx_L1_error) + } + + /* "PyCafeDefs.pxi":1849 + * localBSCToStruct.append(bsc) + * + * bsd.pvdata = localListToStruct # <<<<<<<<<<<<<< + * bsd.BSChannel = localBSCToStruct + * + */ + __Pyx_INCREF(__pyx_v_localListToStruct); + __Pyx_GIVEREF(__pyx_v_localListToStruct); + __Pyx_GOTREF(__pyx_v_bsd->pvdata); + __Pyx_DECREF(__pyx_v_bsd->pvdata); + __pyx_v_bsd->pvdata = __pyx_v_localListToStruct; + + /* "PyCafeDefs.pxi":1850 + * + * bsd.pvdata = localListToStruct + * bsd.BSChannel = localBSCToStruct # <<<<<<<<<<<<<< + * + * bsd.nChannels = b.getNChannels() + */ + __Pyx_INCREF(__pyx_v_localBSCToStruct); + __Pyx_GIVEREF(__pyx_v_localBSCToStruct); + __Pyx_GOTREF(__pyx_v_bsd->BSChannel); + __Pyx_DECREF(__pyx_v_bsd->BSChannel); + __pyx_v_bsd->BSChannel = __pyx_v_localBSCToStruct; + + /* "PyCafeDefs.pxi":1852 + * bsd.BSChannel = localBSCToStruct + * + * bsd.nChannels = b.getNChannels() # <<<<<<<<<<<<<< + * bsd.nNullData = b.getNNullData() + * bsd.pGoodData = b.getPGoodData() + */ + __pyx_v_bsd->nChannels = __pyx_v_b.getNChannels(); + + /* "PyCafeDefs.pxi":1853 + * + * bsd.nChannels = b.getNChannels() + * bsd.nNullData = b.getNNullData() # <<<<<<<<<<<<<< + * bsd.pGoodData = b.getPGoodData() + * + */ + __pyx_v_bsd->nNullData = __pyx_v_b.getNNullData(); + + /* "PyCafeDefs.pxi":1854 + * bsd.nChannels = b.getNChannels() + * bsd.nNullData = b.getNNullData() + * bsd.pGoodData = b.getPGoodData() # <<<<<<<<<<<<<< + * + * bsd.daqStop = False + */ + __pyx_v_bsd->pGoodData = __pyx_v_b.getPGoodData(); + + /* "PyCafeDefs.pxi":1856 + * bsd.pGoodData = b.getPGoodData() + * + * bsd.daqStop = False # <<<<<<<<<<<<<< + * return bsd + * + */ + __pyx_v_bsd->daqStop = 0; + + /* "PyCafeDefs.pxi":1857 + * + * bsd.daqStop = False + * return bsd # <<<<<<<<<<<<<< + * + * ################################################################################# + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_bsd)); + __pyx_r = ((PyObject *)__pyx_v_bsd); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1767 + * ################################################################################# + * + * cdef BSDataHolderToStruct(BSDataHolder b): # <<<<<<<<<<<<<< + * + * cdef BSData bsd = BSData() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.BSDataHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_bsd); + __Pyx_XDECREF(__pyx_v_localListToStruct); + __Pyx_XDECREF(__pyx_v_localBSCToStruct); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XDECREF(__pyx_v_lt); + __Pyx_XDECREF(__pyx_v_bscList); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF((PyObject *)__pyx_v_bsc); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_1verify_handlepv(PyObject *__pyx_self, PyObject *__pyx_v_func); /*proto*/ +static char __pyx_doc_6PyCafe_verify_handlepv[] = "Decorator to validate handle/PV input argument.\n\n PyCafe methods that act on a single channel accept either the PV name or \n the handle (object reference) to the PV as returned by the ``open`` method. \n If a PV name is given, the decorator retrieves the associated handle to\n pass on to the underlying C++ CAFE method. \n\n Args:\n func: The function to be wrapped\n\n Returns:\n The modified input function \n \n Raises:\n TypeError: If handle/PV is not `int` or `str`, respectively.\n ValueError: If handle is invalid. \n\n "; +static PyMethodDef __pyx_mdef_6PyCafe_1verify_handlepv = {"verify_handlepv", (PyCFunction)__pyx_pw_6PyCafe_1verify_handlepv, METH_O, __pyx_doc_6PyCafe_verify_handlepv}; +static PyObject *__pyx_pw_6PyCafe_1verify_handlepv(PyObject *__pyx_self, PyObject *__pyx_v_func) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("verify_handlepv (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_verify_handlepv(__pyx_self, ((PyObject *)__pyx_v_func)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":88 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15verify_handlepv_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6PyCafe_15verify_handlepv_1wrapper = {"wrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_15verify_handlepv_1wrapper, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6PyCafe_15verify_handlepv_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrapper (wrapper)", 0); + __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + if (PyTuple_GET_SIZE(__pyx_args) > 1) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "wrapper") < 0)) __PYX_ERR(3, 88, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrapper", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 88, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("PyCafe.verify_handlepv.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_15verify_handlepv_wrapper(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15verify_handlepv_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_cur_scope; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_outer_scope; + PyObject *__pyx_v_handlePV = NULL; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + unsigned int __pyx_t_12; + __Pyx_RefNannySetupContext("wrapper", 0); + __pyx_outer_scope = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "PyCafe.pyx":93 + * #print('The keyword arguments are', kwargs) + * + * handlePV = args[0] # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * + */ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handlePV = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":94 + * + * handlePV = args[0] + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":98 + * + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): # <<<<<<<<<<<<<< + * if len(handlePV) == 1: + * handlePV = handlePV[0] + */ + __pyx_t_2 = PyList_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":99 + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): + * if len(handlePV) == 1: # <<<<<<<<<<<<<< + * handlePV = handlePV[0] + * + */ + __pyx_t_4 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 99, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":100 + * if isinstance(handlePV, list): + * if len(handlePV) == 1: + * handlePV = handlePV[0] # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_handlePV, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_handlePV, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":99 + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): + * if len(handlePV) == 1: # <<<<<<<<<<<<<< + * handlePV = handlePV[0] + * + */ + } + + /* "PyCafe.pyx":98 + * + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): # <<<<<<<<<<<<<< + * if len(handlePV) == 1: + * handlePV = handlePV[0] + */ + } + + /* "PyCafe.pyx":102 + * handlePV = handlePV[0] + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * if handlePV < 0: + * raise ValueError( + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":103 + * + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_handlePV, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 103, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":105 + * if handlePV < 0: + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("A handle can never hold a negative value! "))) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":106 + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("A handle can never hold a negative value! "))) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_appname); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 106, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_Exception_raised_in, __pyx_t_7, __pyx_t_8, __pyx_kp_u_A_handle_can_never_hold_a_negati}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_Exception_raised_in, __pyx_t_7, __pyx_t_8, __pyx_kp_u_A_handle_can_never_hold_a_negati}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_A_handle_can_never_hold_a_negati); + __Pyx_GIVEREF(__pyx_kp_u_A_handle_can_never_hold_a_negati); + PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_kp_u_A_handle_can_never_hold_a_negati); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":104 + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 104, __pyx_L1_error) + + /* "PyCafe.pyx":103 + * + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + } + + /* "PyCafe.pyx":109 + * ("A handle can never hold a negative value! "))) + * + * handle = handlePV # <<<<<<<<<<<<<< + * + * if not self.isValid(handle): + */ + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 109, __pyx_L1_error) + __pyx_v_handle = __pyx_t_12; + + /* "PyCafe.pyx":111 + * handle = handlePV + * + * if not self.isValid(handle): # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isValid); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":113 + * if not self.isValid(handle): + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("Invalid handle of type . If handle is not " + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":114 + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("Invalid handle of type . If handle is not " + * "known, \nsuggest using PV name of type " + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_appname); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 114, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_kp_u_Exception_raised_in, __pyx_t_11, __pyx_t_8, __pyx_kp_u_Invalid_handle_of_type_class_int}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 113, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_kp_u_Exception_raised_in, __pyx_t_11, __pyx_t_8, __pyx_kp_u_Invalid_handle_of_type_class_int}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 113, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_Invalid_handle_of_type_class_int); + __Pyx_GIVEREF(__pyx_kp_u_Invalid_handle_of_type_class_int); + PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_kp_u_Invalid_handle_of_type_class_int); + __pyx_t_11 = 0; + __pyx_t_8 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":112 + * + * if not self.isValid(handle): + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(3, 112, __pyx_L1_error) + + /* "PyCafe.pyx":111 + * handle = handlePV + * + * if not self.isValid(handle): # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + } + + /* "PyCafe.pyx":102 + * handlePV = handlePV[0] + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * if handlePV < 0: + * raise ValueError( + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":119 + * "as input argument instead. "))) + * + * elif isinstance(handlePV, str): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":120 + * + * elif isinstance(handlePV, str): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_handle = __pyx_t_12; + + /* "PyCafe.pyx":119 + * "as input argument instead. "))) + * + * elif isinstance(handlePV, str): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":122 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + /*else*/ { + + /* "PyCafe.pyx":123 + * else: + * raise TypeError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("First input argument, should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":124 + * raise TypeError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("First input argument, should be of type " + * "if handle, else if PV"))) + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_appname); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 124, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_kp_u_Exception_raised_in, __pyx_t_9, __pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 123, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_kp_u_Exception_raised_in, __pyx_t_9, __pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 123, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_10, __pyx_kp_u_First_input_argument_should_be_o); + __pyx_t_9 = 0; + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":122 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 122, __pyx_L1_error) + } + __pyx_L5:; + + /* "PyCafe.pyx":132 + * + * + * if not kwargs: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 132, __pyx_L1_error) + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":133 + * + * if not kwargs: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle) + */ + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 133, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":135 + * if len(args) == 1: + * + * return func(self, handle) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 135, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func); + __pyx_t_7 = __pyx_cur_scope->__pyx_v_func; __pyx_t_8 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 135, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 135, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":133 + * + * if not kwargs: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle) + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":138 + * + * else: + * return func(self, handle, *args[1:]) # <<<<<<<<<<<<<< + * + * elif len(kwargs) > 0: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 138, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L11:; + + /* "PyCafe.pyx":132 + * + * + * if not kwargs: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + goto __pyx_L10; + } + + /* "PyCafe.pyx":140 + * return func(self, handle, *args[1:]) + * + * elif len(kwargs) > 0: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + __pyx_t_4 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 140, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 > 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":141 + * + * elif len(kwargs) > 0: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle, **kwargs) + */ + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(3, 141, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":143 + * if len(args) == 1: + * + * return func(self, handle, **kwargs) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 143, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_9, __pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":141 + * + * elif len(kwargs) > 0: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle, **kwargs) + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":146 + * + * else: + * return func(self, handle, *args[1:], **kwargs) #dt=kwargs[kwargs_keys[0]]) # <<<<<<<<<<<<<< + * + * return wrapper + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(3, 146, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_7, __pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L12:; + + /* "PyCafe.pyx":140 + * return func(self, handle, *args[1:]) + * + * elif len(kwargs) > 0: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + } + __pyx_L10:; + + /* "PyCafe.pyx":88 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.verify_handlepv.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_handlePV); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + +static PyObject *__pyx_pf_6PyCafe_verify_handlepv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_cur_scope; + PyObject *__pyx_v_wrapper = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("verify_handlepv", 0); + __pyx_cur_scope = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(__pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(3, 66, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_func = __pyx_v_func; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func); + + /* "PyCafe.pyx":88 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6PyCafe_15verify_handlepv_1wrapper, 0, __pyx_n_s_verify_handlepv_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_PyCafe, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrapper = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":148 + * return func(self, handle, *args[1:], **kwargs) #dt=kwargs[kwargs_keys[0]]) + * + * return wrapper # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrapper); + __pyx_r = __pyx_v_wrapper; + goto __pyx_L0; + + /* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.verify_handlepv", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrapper); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":195 + * + * ########################################################################### + * def __cinit__(self): # <<<<<<<<<<<<<< + * """Initializes CAFE and CyCafe class attributes. + * + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6CyCafe_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6CyCafe_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe___cinit__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6CyCafe___cinit__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_e = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + CAFE *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafe.pyx":199 + * + * """ + * cdef str _METHOD = "__cinit__" # <<<<<<<<<<<<<< + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + */ + __Pyx_INCREF(__pyx_n_u_cinit); + __pyx_v__METHOD = __pyx_n_u_cinit; + + /* "PyCafe.pyx":200 + * """ + * cdef str _METHOD = "__cinit__" + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## # <<<<<<<<<<<<<< + * + * if self._c_cafe is NULL: + */ + try { + __pyx_t_1 = new CAFE(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 200, __pyx_L1_error) + } + __pyx_v_self->_c_cafe = __pyx_t_1; + + /* "PyCafe.pyx":202 + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError("Failed to instantiate CAFE()") + * + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe == NULL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":203 + * + * if self._c_cafe is NULL: + * raise MemoryError("Failed to instantiate CAFE()") # <<<<<<<<<<<<<< + * + * self.cs = self._c_cafe.getCafeStatus() + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 203, __pyx_L1_error) + + /* "PyCafe.pyx":202 + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError("Failed to instantiate CAFE()") + * + */ + } + + /* "PyCafe.pyx":205 + * raise MemoryError("Failed to instantiate CAFE()") + * + * self.cs = self._c_cafe.getCafeStatus() # <<<<<<<<<<<<<< + * + * self._exception_text = "Exception raised in PyCafe.pyx:" + */ + __pyx_v_self->cs = __pyx_v_self->_c_cafe->getCafeStatus(); + + /* "PyCafe.pyx":207 + * self.cs = self._c_cafe.getCafeStatus() + * + * self._exception_text = "Exception raised in PyCafe.pyx:" # <<<<<<<<<<<<<< + * self._enable_exceptions = False + * + */ + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in_PyCafe_pyx); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in_PyCafe_pyx); + __Pyx_GOTREF(__pyx_v_self->_exception_text); + __Pyx_DECREF(__pyx_v_self->_exception_text); + __pyx_v_self->_exception_text = __pyx_kp_u_Exception_raised_in_PyCafe_pyx; + + /* "PyCafe.pyx":208 + * + * self._exception_text = "Exception raised in PyCafe.pyx:" + * self._enable_exceptions = False # <<<<<<<<<<<<<< + * + * self._min_timeout = 0.001 #cannot be zero + */ + __pyx_v_self->_enable_exceptions = 0; + + /* "PyCafe.pyx":210 + * self._enable_exceptions = False + * + * self._min_timeout = 0.001 #cannot be zero # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v_self->_min_timeout = 0.001; + + /* "PyCafe.pyx":212 + * self._min_timeout = 0.001 #cannot be zero + * + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + { + (void)__pyx_t_4; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */ + /*try:*/ { + + /* "PyCafe.pyx":213 + * + * try: + * self._c_cafe.init() # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance(e.args, (tuple)): + */ + (void)(__pyx_v_self->_c_cafe->init()); + + /* "PyCafe.pyx":212 + * self._min_timeout = 0.001 #cannot be zero + * + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + } + } + + /* "PyCafe.pyx":226 + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + * self.dbpmInitialized = False # <<<<<<<<<<<<<< + * self.BSInitialized = False + * self.isBSinCAOnly = False + */ + __pyx_v_self->dbpmInitialized = 0; + + /* "PyCafe.pyx":227 + * + * self.dbpmInitialized = False + * self.BSInitialized = False # <<<<<<<<<<<<<< + * self.isBSinCAOnly = False + * + */ + __pyx_v_self->BSInitialized = 0; + + /* "PyCafe.pyx":228 + * self.dbpmInitialized = False + * self.BSInitialized = False + * self.isBSinCAOnly = False # <<<<<<<<<<<<<< + * + * print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) + */ + __pyx_v_self->isBSinCAOnly = 0; + + /* "PyCafe.pyx":230 + * self.isBSinCAOnly = False + * + * print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_PY_VERSION_HEX_is); + __Pyx_GIVEREF(__pyx_kp_u_PY_VERSION_HEX_is); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_PY_VERSION_HEX_is); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":233 + * + * IF PY_EXT_C: + * print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS") # <<<<<<<<<<<<<< + * ELSE: + * print("USING API PyCafe_api.h INTERFACE FOR CALLBACKS") + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":195 + * + * ########################################################################### + * def __cinit__(self): # <<<<<<<<<<<<<< + * """Initializes CAFE and CyCafe class attributes. + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":243 + * + * ########################################################################### + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self._c_cafe + * + */ + +/* Python wrapper */ +static void __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "PyCafe.pyx":244 + * ########################################################################### + * def __dealloc__(self): + * del self._c_cafe # <<<<<<<<<<<<<< + * + * ########################################################################### + */ + delete __pyx_v_self->_c_cafe; + + /* "PyCafe.pyx":243 + * + * ########################################################################### + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self._c_cafe + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafe.pyx":250 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5setPyConnectCallbackFn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5setPyConnectCallbackFn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPyConnectCallbackFn (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPyConnectCallbackFn") < 0)) __PYX_ERR(3, 250, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setPyConnectCallbackFn", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 250, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPyConnectCallbackFn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_4setPyConnectCallbackFn(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_4setPyConnectCallbackFn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v_pv_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + unsigned int __pyx_t_3; + __Pyx_RefNannySetupContext("setPyConnectCallbackFn", 0); + + /* "PyCafe.pyx":251 + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: # <<<<<<<<<<<<<< + * return + * pv_name = handlePV + */ + __pyx_t_1 = (__pyx_v_cb == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":252 + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: + * return # <<<<<<<<<<<<<< + * pv_name = handlePV + * #global openCallbackDictGlobal + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":251 + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: # <<<<<<<<<<<<<< + * return + * pv_name = handlePV + */ + } + + /* "PyCafe.pyx":253 + * if cb is None: + * return + * pv_name = handlePV # <<<<<<<<<<<<<< + * #global openCallbackDictGlobal + * #openCallbackDictGlobal[cb] = handlePV + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_pv_name = __pyx_v_handlePV; + + /* "PyCafe.pyx":258 + * #september 21 2021 + * global openDictGlobal + * openDictGlobal[pv_name] = cb # <<<<<<<<<<<<<< + * + * #handle = self.hh.getHandleFromPV(pv_name) + */ + if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 258, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_openDictGlobal, __pyx_v_pv_name, __pyx_v_cb) < 0)) __PYX_ERR(3, 258, __pyx_L1_error) + + /* "PyCafe.pyx":261 + * + * #handle = self.hh.getHandleFromPV(pv_name) + * self.hh.setPyConnectCallbackFn(handlePV, cb) # <<<<<<<<<<<<<< + * + * #self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 261, __pyx_L1_error) + (void)(__pyx_v_self->hh.setPyConnectCallbackFn(__pyx_t_3, ((void *)__pyx_v_cb))); + + /* "PyCafe.pyx":250 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPyConnectCallbackFn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pv_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":268 + * #false + * + * def setPyCallbackConnect(self, pv: str = None, cb: object = None): # <<<<<<<<<<<<<< + * if None in (pv, cb): + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7setPyCallbackConnect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7setPyCallbackConnect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPyCallbackConnect (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[0] = ((PyObject*)Py_None); + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPyCallbackConnect") < 0)) __PYX_ERR(3, 268, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = ((PyObject*)values[0]); + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setPyCallbackConnect", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 268, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPyCallbackConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyUnicode_Type), 1, "pv", 1))) __PYX_ERR(3, 268, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_6setPyCallbackConnect(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_cb); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_6setPyCallbackConnect(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("setPyCallbackConnect", 0); + + /* "PyCafe.pyx":269 + * + * def setPyCallbackConnect(self, pv: str = None, cb: object = None): + * if None in (pv, cb): # <<<<<<<<<<<<<< + * return + * global openDictGlobal + */ + __Pyx_INCREF(Py_None); + __pyx_t_1 = Py_None; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_v_pv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 269, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cb, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 269, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 269, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":270 + * def setPyCallbackConnect(self, pv: str = None, cb: object = None): + * if None in (pv, cb): + * return # <<<<<<<<<<<<<< + * global openDictGlobal + * openDictGlobal[pv] = cb + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":269 + * + * def setPyCallbackConnect(self, pv: str = None, cb: object = None): + * if None in (pv, cb): # <<<<<<<<<<<<<< + * return + * global openDictGlobal + */ + } + + /* "PyCafe.pyx":272 + * return + * global openDictGlobal + * openDictGlobal[pv] = cb # <<<<<<<<<<<<<< + * + * ##self.hh.setPyConnectCallbackFn(handle, cb) + */ + if (unlikely(__pyx_v_6PyCafe_openDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 272, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_openDictGlobal, __pyx_v_pv, __pyx_v_cb) < 0)) __PYX_ERR(3, 272, __pyx_L1_error) + + /* "PyCafe.pyx":268 + * #false + * + * def setPyCallbackConnect(self, pv: str = None, cb: object = None): # <<<<<<<<<<<<<< + * if None in (pv, cb): + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.setPyCallbackConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":277 + * + * ############################################################################ + * def init(self): # <<<<<<<<<<<<<< + * """Initialize channel access. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_8init[] = "Initialize channel access.\n\n This method is called by ``__cinit__`` when instantiating CyCafe. \n It may, optionally, be called by the user when creating a new channel \n access context, e.g., if in a separate thread. If omitted, it will \n otherwise be called internally by CAFE. \n \n Raises:\n MemoryError: If insufficient memory to initialize channel access. \n Epics status reports ECA_ALLOCMEM. Application cannot continue.\n\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("init (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_8init(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("init", 0); + + /* "PyCafe.pyx":290 + * + * """ + * cdef str _METHOD = "init" # <<<<<<<<<<<<<< + * try: + * self._c_cafe.init() + */ + __Pyx_INCREF(__pyx_n_u_init); + __pyx_v__METHOD = __pyx_n_u_init; + + /* "PyCafe.pyx":291 + * """ + * cdef str _METHOD = "init" + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + { + (void)__pyx_t_1; (void)__pyx_t_2; (void)__pyx_t_3; /* mark used */ + /*try:*/ { + + /* "PyCafe.pyx":292 + * cdef str _METHOD = "init" + * try: + * self._c_cafe.init() # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance(e.args, (tuple)): + */ + (void)(__pyx_v_self->_c_cafe->init()); + + /* "PyCafe.pyx":291 + * """ + * cdef str _METHOD = "init" + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + } + } + + /* "PyCafe.pyx":277 + * + * ############################################################################ + * def init(self): # <<<<<<<<<<<<<< + * """Initialize channel access. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":313 + * + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_10withExceptions[] = "Activate/deactivate CAFE exceptions for single channel operations.\n\n If the input argument, exceptions, is set to False, the user is obliged\n to examine the return code of any set/get method that instigates a CAFE\n transaction on a single channel.\n\n Args:\n exceptions (bool): Activates/deactivates CAFE exceptions if\n True/False for single channel operations. The default is True.\n\n Returns:\n bool: Confirmation of the set value\n ::\n\n res = cafe.withExceptions(True|False)\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_exceptions; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("withExceptions (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exceptions,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exceptions); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "withExceptions") < 0)) __PYX_ERR(3, 313, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_exceptions = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_exceptions == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 313, __pyx_L3_error) + } else { + __pyx_v_exceptions = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("withExceptions", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 313, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.withExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_10withExceptions(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_exceptions); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("withExceptions", 0); + + /* "PyCafe.pyx":331 + * """ + * + * self._enable_exceptions = exceptions # <<<<<<<<<<<<<< + * return self._enable_exceptions + * + */ + __pyx_v_self->_enable_exceptions = __pyx_v_exceptions; + + /* "PyCafe.pyx":332 + * + * self._enable_exceptions = exceptions + * return self._enable_exceptions # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_enable_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":313 + * + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.withExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":336 + * + * @property + * def enableExceptions(self): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "PyCafe.pyx":352 + * """ + * + * return self._enable_exceptions # <<<<<<<<<<<<<< + * + * @enableExceptions.setter + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_enable_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":336 + * + * @property + * def enableExceptions(self): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.enableExceptions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":355 + * + * @enableExceptions.setter + * def enableExceptions(self, bint enable): # <<<<<<<<<<<<<< + * self._enable_exceptions = enable + * + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable); /*proto*/ +static int __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable) { + int __pyx_v_enable; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + assert(__pyx_arg_enable); { + __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 355, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.enableExceptions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_enable)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_enable) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + + /* "PyCafe.pyx":356 + * @enableExceptions.setter + * def enableExceptions(self, bint enable): + * self._enable_exceptions = enable # <<<<<<<<<<<<<< + * + * cdef prepareCafeException( + */ + __pyx_v_self->_enable_exceptions = __pyx_v_enable; + + /* "PyCafe.pyx":355 + * + * @enableExceptions.setter + * def enableExceptions(self, bint enable): # <<<<<<<<<<<<<< + * self._enable_exceptions = enable + * + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":358 + * self._enable_exceptions = enable + * + * cdef prepareCafeException( # <<<<<<<<<<<<<< + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + */ + +static PyObject *__pyx_f_6PyCafe_6CyCafe_prepareCafeException(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_status, PyObject *__pyx_v__METHOD, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args) { + unsigned int __pyx_v_handle = ((unsigned int)0); + + /* "PyCafe.pyx":360 + * cdef prepareCafeException( + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): # <<<<<<<<<<<<<< + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) + */ + PyObject *__pyx_v_pv_name = ((PyObject*)Py_None); + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("prepareCafeException", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_handle = __pyx_optional_args->handle; + if (__pyx_optional_args->__pyx_n > 1) { + __pyx_v_pv_name = __pyx_optional_args->pv_name; + } + } + } + __Pyx_INCREF(__pyx_v_pv_name); + + /* "PyCafe.pyx":361 + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: # <<<<<<<<<<<<<< + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + */ + __pyx_t_2 = ((__pyx_v_handle > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_pv_name == ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "PyCafe.pyx":362 + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_pv_name, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":361 + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: # <<<<<<<<<<<<<< + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":364 + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":365 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * return _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_v_pv_name) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + + /* "PyCafe.pyx":366 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * return _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":363 + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":367 + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * return _cafeException # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v__cafeException)); + __pyx_r = ((PyObject *)__pyx_v__cafeException); + goto __pyx_L0; + + /* "PyCafe.pyx":358 + * self._enable_exceptions = enable + * + * cdef prepareCafeException( # <<<<<<<<<<<<<< + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.prepareCafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_pv_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":371 + * ############################################################################ + * + * def isValid(self, unsigned int handle): # <<<<<<<<<<<<<< + * return self._c_cafe.isValid(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13isValid(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13isValid(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isValid (wrapper)", 0); + assert(__pyx_arg_handle); { + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 371, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isValid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_12isValid(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((unsigned int)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12isValid(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isValid", 0); + + /* "PyCafe.pyx":372 + * + * def isValid(self, unsigned int handle): + * return self._c_cafe.isValid(handle) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isValid(__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":371 + * ############################################################################ + * + * def isValid(self, unsigned int handle): # <<<<<<<<<<<<<< + * return self._c_cafe.isValid(handle) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isValid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":376 + * + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.removeWidget(handle, widget) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15removeWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15removeWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + unsigned int __pyx_v_handle; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("removeWidget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_5,&__pyx_n_s_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_5)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("removeWidget", 1, 2, 2, 1); __PYX_ERR(3, 376, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "removeWidget") < 0)) __PYX_ERR(3, 376, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 376, __pyx_L3_error) + __pyx_v_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("removeWidget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 376, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.removeWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_14removeWidget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handle, __pyx_v_widget); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14removeWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("removeWidget", 0); + + /* "PyCafe.pyx":377 + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): + * return self.hh.removeWidget(handle, widget) # <<<<<<<<<<<<<< + * + * def addWidget(self, unsigned int handle, object widget): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hh.removeWidget(__pyx_v_handle, ((void *)__pyx_v_widget))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":376 + * + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.removeWidget(handle, widget) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.removeWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":379 + * return self.hh.removeWidget(handle, widget) + * + * def addWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.addWidget(handle, widget) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17addWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17addWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + unsigned int __pyx_v_handle; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("addWidget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_5,&__pyx_n_s_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_5)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addWidget", 1, 2, 2, 1); __PYX_ERR(3, 379, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addWidget") < 0)) __PYX_ERR(3, 379, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 379, __pyx_L3_error) + __pyx_v_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("addWidget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 379, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.addWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16addWidget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handle, __pyx_v_widget); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16addWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("addWidget", 0); + + /* "PyCafe.pyx":380 + * + * def addWidget(self, unsigned int handle, object widget): + * return self.hh.addWidget(handle, widget) # <<<<<<<<<<<<<< + * + * def getWidgets(self, unsigned int handle): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hh.addWidget(__pyx_v_handle, ((void *)__pyx_v_widget))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":379 + * return self.hh.removeWidget(handle, widget) + * + * def addWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.addWidget(handle, widget) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.addWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":382 + * return self.hh.addWidget(handle, widget) + * + * def getWidgets(self, unsigned int handle): # <<<<<<<<<<<<<< + * cdef vector[void *] widgetV + * widgetV.reserve(2) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19getWidgets(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19getWidgets(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWidgets (wrapper)", 0); + assert(__pyx_arg_handle); { + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 382, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getWidgets", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_18getWidgets(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((unsigned int)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_18getWidgets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle) { + std::vector __pyx_v_widgetV; + PyObject *__pyx_v_widgetList = NULL; + CYTHON_UNUSED int __pyx_v_status; + std::vector ::size_type __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::vector ::size_type __pyx_t_2; + std::vector ::size_type __pyx_t_3; + std::vector ::size_type __pyx_t_4; + void *__pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("getWidgets", 0); + + /* "PyCafe.pyx":384 + * def getWidgets(self, unsigned int handle): + * cdef vector[void *] widgetV + * widgetV.reserve(2) # <<<<<<<<<<<<<< + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) + */ + __pyx_v_widgetV.reserve(2); + + /* "PyCafe.pyx":385 + * cdef vector[void *] widgetV + * widgetV.reserve(2) + * widgetList = [] # <<<<<<<<<<<<<< + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_widgetList = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":386 + * widgetV.reserve(2) + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) # <<<<<<<<<<<<<< + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) + */ + __pyx_v_status = __pyx_v_self->hh.getWidgets(__pyx_v_handle, __pyx_v_widgetV); + + /* "PyCafe.pyx":387 + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): # <<<<<<<<<<<<<< + * widgetList.append( < object > widgetV[i]) + * return widgetList + */ + __pyx_t_2 = __pyx_v_widgetV.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":388 + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) # <<<<<<<<<<<<<< + * return widgetList + * ############################################################################ + */ + __pyx_t_5 = (__pyx_v_widgetV[__pyx_v_i]); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_widgetList, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 388, __pyx_L1_error) + } + + /* "PyCafe.pyx":389 + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) + * return widgetList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_widgetList); + __pyx_r = __pyx_v_widgetList; + goto __pyx_L0; + + /* "PyCafe.pyx":382 + * return self.hh.addWidget(handle, widget) + * + * def getWidgets(self, unsigned int handle): # <<<<<<<<<<<<<< + * cdef vector[void *] widgetV + * widgetV.reserve(2) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getWidgets", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_widgetList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":398 + * + * + * def open(self, pv, cb: object = None): # <<<<<<<<<<<<<< + * """Returns handle (object reference) for given process variable. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_20open[] = "Returns handle (object reference) for given process variable.\n \n Establishes a channel access virtual circuit to the given process \n variable, pv. The optional user supplied callback function reports on \n the connection state. Within the callback, all cafe operations that \n retrieve data from cache and send data values to the process variable\n are permitted. Typically, such callback functions are used in GUI \n development, and in complex procedures, such as feedback systems in \n virtual accelerators.\n\n Args:\n pv (:obj:`str`, :obj:`bytes`, :obj:`list` of :obj:`str` or :obj:`bytes`): \n The process variable name(s)\n cb (:obj:`object`, optional): A user supplied callback function to \n be invoked upon first connection and subsequent changes to the\n connection state. Defaults to None. The callback function must\n have the required signature (:obj:`int`, :obj:`str`, :obj:`int`)\n\n Returns:\n :obj:`int` | :obj:`list` of :obj:`int`: handle(s) to the given pv(s).\n\n\n Raises:\n TypeError: If handle/PV is not instance of `int` or (`str`,`bytes`), \n respectively.\n\n .. code-block:: python\n\n py_connect_callback(handle, pv_name, status): \n if status == cyca.ICAFE_CS_CONN: \n value = cafe.getCache(handle[, dt=`str`])\n ...\n elif status == cyca.ICAFE_CS_DISCONN: \n ...\n\n ::\n \n handle = cafe.open(pv=pv_name[, cb=py_connect_callback])\n\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("open (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open") < 0)) __PYX_ERR(3, 398, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("open", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 398, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_20open(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_pvV; + std::vector __pyx_v_handleV; + Py_ssize_t __pyx_v_i; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_errors = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_handle; + char *__pyx_v_pvStr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + std::string __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + char const *__pyx_t_19; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + int __pyx_t_26; + char *__pyx_t_27; + char const *__pyx_t_28; + __Pyx_RefNannySetupContext("open", 0); + + /* "PyCafe.pyx":439 + * + * """ + * cdef str _METHOD = "open" # <<<<<<<<<<<<<< + * cdef vector[string] pvV + * cdef vector[unsigned int] handleV + */ + __Pyx_INCREF(__pyx_n_u_open); + __pyx_v__METHOD = __pyx_n_u_open; + + /* "PyCafe.pyx":444 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + */ + __pyx_t_1 = PyList_Check(__pyx_v_pv); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":445 + * + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): # <<<<<<<<<<<<<< + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_pv); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 445, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":446 + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":447 + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) # <<<<<<<<<<<<<< + * elif isinstance(pv[i], bytes): + * pvV.push_back(pv[i].decode('utf_8') ) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 447, __pyx_L1_error) + } + + /* "PyCafe.pyx":446 + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":448 + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":449 + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + * pvV.push_back(pv[i].decode('utf_8') ) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_u_utf_8); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 449, __pyx_L1_error) + } + + /* "PyCafe.pyx":448 + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":451 + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("The pv name entered within list should be " + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":452 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("The pv name entered within list should be " + * "of type or "))) + */ + __pyx_t_8 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_The_pv_name_entered_within_list}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_The_pv_name_entered_within_list}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_The_pv_name_entered_within_list); + __Pyx_GIVEREF(__pyx_kp_u_The_pv_name_entered_within_list); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_kp_u_The_pv_name_entered_within_list); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":451 + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("The pv name entered within list should be " + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 451, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":455 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * for i in range(0, len(pvV)): + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":456 + * "of type or "))) + * try: + * if cb is not None: # <<<<<<<<<<<<<< + * for i in range(0, len(pvV)): + * self.setPyCallbackConnect(pvV[i], cb) + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":457 + * try: + * if cb is not None: + * for i in range(0, len(pvV)): # <<<<<<<<<<<<<< + * self.setPyCallbackConnect(pvV[i], cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + __pyx_t_9 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 457, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 457, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":458 + * if cb is not None: + * for i in range(0, len(pvV)): + * self.setPyCallbackConnect(pvV[i], cb) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setPyCallbackConnect); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvV[__pyx_v_i])); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_v_cb}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_v_cb}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } else + #endif + { + __pyx_t_15 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_10, __pyx_t_11); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_10, __pyx_v_cb); + __pyx_t_11 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 458, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":459 + * for i in range(0, len(pvV)): + * self.setPyCallbackConnect(pvV[i], cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(1); + + /* "PyCafe.pyx":460 + * self.setPyCallbackConnect(pvV[i], cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyConnectHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":456 + * "of type or "))) + * try: + * if cb is not None: # <<<<<<<<<<<<<< + * for i in range(0, len(pvV)): + * self.setPyCallbackConnect(pvV[i], cb) + */ + } + + /* "PyCafe.pyx":463 + * + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.openV(pvV, handleV) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":464 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.openV(pvV, handleV) # <<<<<<<<<<<<<< + * ELSE: + * #Gil acquired and released within conduit.h + */ + try { + __pyx_t_10 = __pyx_v_self->_c_cafe->openV(__pyx_v_pvV, __pyx_v_handleV); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(3, 464, __pyx_L17_error) + } + __pyx_v_status = __pyx_t_10; + } + + /* "PyCafe.pyx":463 + * + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.openV(pvV, handleV) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L18; + } + __pyx_L17_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L7_error; + } + __pyx_L18:; + } + } + + /* "PyCafe.pyx":469 + * #with nogil: + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): # <<<<<<<<<<<<<< + * time.sleep(0.2) + * else: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initCallbackComplete); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 469, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_handleV); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 469, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_15); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 469, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 469, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":470 + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): + * time.sleep(0.2) # <<<<<<<<<<<<<< + * else: + * time.sleep(0.02) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + } + } + __pyx_t_9 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_6, __pyx_float_0_2) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_float_0_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 470, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":469 + * #with nogil: + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): # <<<<<<<<<<<<<< + * time.sleep(0.2) + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":472 + * time.sleep(0.2) + * else: + * time.sleep(0.02) # <<<<<<<<<<<<<< + * except RuntimeError as e: + * # Reset + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 472, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 472, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_15, __pyx_float_0_02) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_02); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 472, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L19:; + + /* "PyCafe.pyx":455 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * for i in range(0, len(pvV)): + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":473 + * else: + * time.sleep(0.02) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError); + if (__pyx_t_10) { + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_6, &__pyx_t_15) < 0) __PYX_ERR(3, 473, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_e = __pyx_t_6; + /*try:*/ { + + /* "PyCafe.pyx":475 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":476 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * + * if isinstance(e.args, (tuple)): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":475 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + */ + } + + /* "PyCafe.pyx":478 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 478, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_1 = PyTuple_Check(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":480 + * if isinstance(e.args, (tuple)): + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") + * if len(errors) > 5: + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 480, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 480, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 480, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":481 + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # <<<<<<<<<<<<<< + * if len(errors) > 5: + * _cafeException = CafeException( + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 481, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 481, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 481, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_16)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_8 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_16, __pyx_kp_u__47) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u__47); + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 481, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_errors = __pyx_t_8; + __pyx_t_8 = 0; + + /* "PyCafe.pyx":482 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_3 = PyObject_Length(__pyx_v_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 482, __pyx_L25_error) + __pyx_t_1 = ((__pyx_t_3 > 5) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":484 + * if len(errors) > 5: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), + */ + __pyx_t_8 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + + /* "PyCafe.pyx":485 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), # <<<<<<<<<<<<<< + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_errors, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 485, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_pv_name, __pyx_t_11) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_errors, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 485, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = __Pyx_PyNumber_Int(__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 485, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_handle, __pyx_t_16) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafe.pyx":486 + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), # <<<<<<<<<<<<<< + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + */ + __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_errors, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 486, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 486, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_code, __pyx_t_11) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":487 + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) # <<<<<<<<<<<<<< + * raise _cafeException + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_errors, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 487, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_text, __pyx_t_11) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_errors, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 487, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_info, __pyx_t_11) < 0) __PYX_ERR(3, 484, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":483 + * errors = e.args[0].split(",") + * if len(errors) > 5: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 483, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":488 + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException # <<<<<<<<<<<<<< + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 488, __pyx_L25_error) + + /* "PyCafe.pyx":482 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":480 + * if isinstance(e.args, (tuple)): + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") + * if len(errors) > 5: + */ + } + + /* "PyCafe.pyx":478 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + */ + } + + /* "PyCafe.pyx":489 + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) # <<<<<<<<<<<<<< + * + * if cb is not None: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_16)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_GOTREF(__pyx_t_11); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_GOTREF(__pyx_t_11); + } else + #endif + { + __pyx_t_17 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_17); + if (__pyx_t_16) { + __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_10, __pyx_v_e); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 489, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(3, 489, __pyx_L25_error) + } + + /* "PyCafe.pyx":473 + * else: + * time.sleep(0.02) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_XDECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L26; + } + __pyx_L25_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __pyx_t_10 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25); + } + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22); + __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; + __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; + goto __pyx_L9_except_error; + } + __pyx_L26:; + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + __pyx_L9_except_error:; + + /* "PyCafe.pyx":455 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * for i in range(0, len(pvV)): + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L12_try_end:; + } + + /* "PyCafe.pyx":491 + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + * if cb is not None: # <<<<<<<<<<<<<< + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":493 + * if cb is not None: + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * return handleV + * + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":491 + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + * if cb is not None: # <<<<<<<<<<<<<< + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + */ + } + + /* "PyCafe.pyx":494 + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * return handleV # <<<<<<<<<<<<<< + * + * elif not isinstance(pv, (bytes, str)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_15 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_handleV); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_r = __pyx_t_15; + __pyx_t_15 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":444 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":496 + * return handleV + * + * elif not isinstance(pv, (bytes, str)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_1 = PyBytes_Check(__pyx_v_pv); + __pyx_t_26 = (__pyx_t_1 != 0); + if (!__pyx_t_26) { + } else { + __pyx_t_2 = __pyx_t_26; + goto __pyx_L36_bool_binop_done; + } + __pyx_t_26 = PyUnicode_Check(__pyx_v_pv); + __pyx_t_1 = (__pyx_t_26 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L36_bool_binop_done:; + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":497 + * + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, pv, should be of type ")) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":498 + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, pv, should be of type ")) + * + */ + __pyx_t_9 = NULL; + __pyx_t_18 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_18 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_pv_should_be_of_t}; + __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_15); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_pv_should_be_of_t}; + __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_15); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_18, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_18, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_pv_should_be_of_t); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_pv_should_be_of_t); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_18, __pyx_kp_u_Input_argument_pv_should_be_of_t); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":497 + * + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, pv, should be of type ")) + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 497, __pyx_L1_error) + + /* "PyCafe.pyx":496 + * return handleV + * + * elif not isinstance(pv, (bytes, str)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":501 + * "Input argument, pv, should be of type ")) + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * cdef vector[string] vecS + * + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":504 + * cdef vector[string] vecS + * + * cdef char * pvStr = pv # <<<<<<<<<<<<<< + * + * if cb is not None: + */ + __pyx_t_27 = __Pyx_PyObject_AsWritableString(__pyx_v_pv); if (unlikely((!__pyx_t_27) && PyErr_Occurred())) __PYX_ERR(3, 504, __pyx_L1_error) + __pyx_v_pvStr = __pyx_t_27; + + /* "PyCafe.pyx":506 + * cdef char * pvStr = pv + * + * if cb is not None: # <<<<<<<<<<<<<< + * self.setPyCallbackConnect(pv, cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":507 + * + * if cb is not None: + * self.setPyCallbackConnect(pv, cb) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + */ + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setPyCallbackConnect); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_8 = NULL; + __pyx_t_18 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + __pyx_t_18 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_15)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_pv, __pyx_v_cb}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 507, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_pv, __pyx_v_cb}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 507, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_pv); + __Pyx_GIVEREF(__pyx_v_pv); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_18, __pyx_v_pv); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_18, __pyx_v_cb); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":508 + * if cb is not None: + * self.setPyCallbackConnect(pv, cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(1); + + /* "PyCafe.pyx":509 + * self.setPyCallbackConnect(pv, cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) # <<<<<<<<<<<<<< + * try: + * IF PY_EXT_C: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyConnectHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":506 + * cdef char * pvStr = pv + * + * if cb is not None: # <<<<<<<<<<<<<< + * self.setPyCallbackConnect(pv, cb) + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + } + + /* "PyCafe.pyx":510 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":513 + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.open(pvStr, handle) + * #print("OPEN WITH NO GIL//==>", pvStr) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":514 + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: + * self._c_cafe.open(pvStr, handle) # <<<<<<<<<<<<<< + * #print("OPEN WITH NO GIL//==>", pvStr) + * ELSE: + */ + try { + __pyx_v_self->_c_cafe->open(__pyx_v_pvStr, __pyx_v_handle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(3, 514, __pyx_L46_error) + } + } + + /* "PyCafe.pyx":513 + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.open(pvStr, handle) + * #print("OPEN WITH NO GIL//==>", pvStr) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L47; + } + __pyx_L46_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L39_error; + } + __pyx_L47:; + } + } + + /* "PyCafe.pyx":510 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L44_try_end; + __pyx_L39_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":520 + * #with nogil: + * self._c_cafe.open(pvStr, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError); + if (__pyx_t_18) { + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_15, &__pyx_t_9) < 0) __PYX_ERR(3, 520, __pyx_L41_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_15); + __pyx_v_e = __pyx_t_15; + /*try:*/ { + + /* "PyCafe.pyx":522 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":523 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":522 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + */ + } + + /* "PyCafe.pyx":524 + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 524, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyTuple_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":525 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 525, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 525, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_11, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 525, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":526 + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() # <<<<<<<<<<<<<< + * if len(errors) > 5: + * _cafeException = CafeException( + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 526, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 526, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 526, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_11 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_17, __pyx_kp_u__47) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__47); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 526, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_errors = __pyx_t_11; + __pyx_t_11 = 0; + + /* "PyCafe.pyx":527 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_3 = PyObject_Length(__pyx_v_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 527, __pyx_L53_error) + __pyx_t_1 = ((__pyx_t_3 > 5) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":529 + * if len(errors) > 5: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), + */ + __pyx_t_11 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + + /* "PyCafe.pyx":530 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], # <<<<<<<<<<<<<< + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 530, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":531 + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), # <<<<<<<<<<<<<< + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 531, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 531, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_handle, __pyx_t_17) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_errors, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 531, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 531, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":532 + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 532, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 532, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(3, 529, __pyx_L53_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":528 + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 528, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":533 + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException # <<<<<<<<<<<<<< + * + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 533, __pyx_L53_error) + + /* "PyCafe.pyx":527 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":525 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + */ + } + + /* "PyCafe.pyx":524 + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + */ + } + + /* "PyCafe.pyx":535 + * raise _cafeException + * + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) # <<<<<<<<<<<<<< + * + * # Reset + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_17 = NULL; + __pyx_t_18 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_18 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_16 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_16); + if (__pyx_t_17) { + __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_18, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_18, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_18, __pyx_v_e); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 535, __pyx_L53_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_11, 0, 0, 0); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __PYX_ERR(3, 535, __pyx_L53_error) + } + + /* "PyCafe.pyx":520 + * #with nogil: + * self._c_cafe.open(pvStr, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_XDECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L54; + } + __pyx_L53_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __pyx_t_18 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_28 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20); + } + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23); + __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; + __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_28; + goto __pyx_L41_except_error; + } + __pyx_L54:; + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L40_exception_handled; + } + goto __pyx_L41_except_error; + __pyx_L41_except_error:; + + /* "PyCafe.pyx":510 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L40_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L44_try_end:; + } + + /* "PyCafe.pyx":538 + * + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":539 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":538 + * + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + */ + } + + /* "PyCafe.pyx":541 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * time.sleep(0.1) + * else: + */ + __pyx_t_2 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":542 + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): + * time.sleep(0.1) # <<<<<<<<<<<<<< + * else: + * time.sleep(0.01) # Let pycallbacks complete + */ + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_15, __pyx_float_0_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_1); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":541 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * time.sleep(0.1) + * else: + */ + goto __pyx_L64; + } + + /* "PyCafe.pyx":544 + * time.sleep(0.1) + * else: + * time.sleep(0.01) # Let pycallbacks complete # <<<<<<<<<<<<<< + * return handle + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + } + } + __pyx_t_9 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_6, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L64:; + + /* "PyCafe.pyx":545 + * else: + * time.sleep(0.01) # Let pycallbacks complete + * return handle # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":398 + * + * + * def open(self, pv, cb: object = None): # <<<<<<<<<<<<<< + * """Returns handle (object reference) for given process variable. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_errors); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":548 + * + * ############################################################################ + * def openNoWait(self): # <<<<<<<<<<<<<< + * # channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # channelOpenPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23openNoWait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23openNoWait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNoWait (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_22openNoWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNoWait", 0); + + /* "PyCafe.pyx":552 + * # channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNoWait() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":553 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openNoWait() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openNoWait(); + } + + /* "PyCafe.pyx":552 + * # channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNoWait() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":554 + * with nogil: + * self._c_cafe.openNoWait() + * return # <<<<<<<<<<<<<< + * + * def openPrepare(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":548 + * + * ############################################################################ + * def openNoWait(self): # <<<<<<<<<<<<<< + * # channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # channelOpenPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":556 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25openPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25openPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_24openPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_24openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openPrepare", 0); + + /* "PyCafe.pyx":560 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openPrepare() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":561 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openPrepare() # <<<<<<<<<<<<<< + * + * def openGroupPrepare(self): + */ + __pyx_v_self->_c_cafe->openPrepare(); + } + + /* "PyCafe.pyx":560 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openPrepare() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":556 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":563 + * self._c_cafe.openPrepare() + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + * # WITH_PEND_EVENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27openGroupPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27openGroupPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_26openGroupPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_26openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupPrepare", 0); + + /* "PyCafe.pyx":568 + * # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupPrepare() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":569 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openGroupPrepare() # <<<<<<<<<<<<<< + * + * def setOpenDefaultPendTime(self, double timeout): + */ + __pyx_v_self->_c_cafe->openGroupPrepare(); + } + + /* "PyCafe.pyx":568 + * # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupPrepare() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":563 + * self._c_cafe.openPrepare() + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + * # WITH_PEND_EVENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":571 + * self._c_cafe.openGroupPrepare() + * + * def setOpenDefaultPendTime(self, double timeout): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setOpenDefaultPendTime (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 571, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_28setOpenDefaultPendTime(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":572 + * + * def setOpenDefaultPendTime(self, double timeout): + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) # <<<<<<<<<<<<<< + * + * def getOpenDefaultPendTime(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.setDefaultTimeout(__pyx_v_timeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":571 + * self._c_cafe.openGroupPrepare() + * + * def setOpenDefaultPendTime(self, double timeout): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":574 + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + * def getOpenDefaultPendTime(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31getOpenDefaultPendTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31getOpenDefaultPendTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getOpenDefaultPendTime (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_30getOpenDefaultPendTime(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_30getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":575 + * + * def getOpenDefaultPendTime(self): + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.getDefaultTimeout()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":574 + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + * def getOpenDefaultPendTime(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":579 + * + * ############################################################################ + * def openNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33openNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33openNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNow (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_32openNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_32openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNow", 0); + + /* "PyCafe.pyx":583 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNow() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":584 + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: + * self._c_cafe.openNow() # <<<<<<<<<<<<<< + * + * ############################################################################# + */ + __pyx_v_self->_c_cafe->openNow(); + } + + /* "PyCafe.pyx":583 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNow() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":579 + * + * ############################################################################ + * def openNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":588 + * ############################################################################# + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openNowAndWait" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_v_handlesPV = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNowAndWait (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,&__pyx_n_s_handlesPV,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlesPV); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openNowAndWait") < 0)) __PYX_ERR(3, 588, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 588, __pyx_L3_error) + } else { + __pyx_v_timeout = ((double)0.0); + } + __pyx_v_handlesPV = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openNowAndWait", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 588, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_34openNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout, __pyx_v_handlesPV); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_34openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_handlesPV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + std::vector __pyx_v_pvV; + PyObject *__pyx_v_npoll = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("openNowAndWait", 0); + + /* "PyCafe.pyx":589 + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): + * cdef str _METHOD = "openNowAndWait" # <<<<<<<<<<<<<< + * + * if timeout <=0 : + */ + __Pyx_INCREF(__pyx_n_u_openNowAndWait); + __pyx_v__METHOD = __pyx_n_u_openNowAndWait; + + /* "PyCafe.pyx":591 + * cdef str _METHOD = "openNowAndWait" + * + * if timeout <=0 : # <<<<<<<<<<<<<< + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":592 + * + * if timeout <=0 : + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() # <<<<<<<<<<<<<< + * + * # self._c_cafe.channelOpenPolicy.setTimeout(timeout) + */ + __pyx_v_timeout = __pyx_v_self->_c_cafe->channelOpenPolicy.getTimeout(); + + /* "PyCafe.pyx":591 + * cdef str _METHOD = "openNowAndWait" + * + * if timeout <=0 : # <<<<<<<<<<<<<< + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() + * + */ + } + + /* "PyCafe.pyx":603 + * cdef vector[unsigned int] hList + * cdef vector[string] pvV + * cdef npoll = 0 # <<<<<<<<<<<<<< + * + * if handlesPV is not None: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_npoll = __pyx_int_0; + + /* "PyCafe.pyx":605 + * cdef npoll = 0 + * + * if handlesPV is not None: # <<<<<<<<<<<<<< + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + */ + __pyx_t_1 = (__pyx_v_handlesPV != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":606 + * + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + */ + __pyx_t_2 = PyList_Check(__pyx_v_handlesPV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":607 + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): # <<<<<<<<<<<<<< + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlesPV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 607, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":608 + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":609 + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlesPV[i], (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 609, __pyx_L1_error) + } + + /* "PyCafe.pyx":608 + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":610 + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":611 + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPVName); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 611, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 611, __pyx_L1_error) + } + + /* "PyCafe.pyx":610 + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":613 + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be < type 'int' >" + + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":614 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_t}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_t}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_t); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_t); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_t); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":613 + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be < type 'int' >" + + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 613, __pyx_L1_error) + } + __pyx_L8:; + } + + /* "PyCafe.pyx":606 + * + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":617 + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlesPV); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlesPV); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":618 + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) # <<<<<<<<<<<<<< + * elif isinstance(handlesPV, (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlesPV); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 618, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 618, __pyx_L1_error) + } + + /* "PyCafe.pyx":617 + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":619 + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlesPV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":620 + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPVName); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_handlesPV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlesPV); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 620, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 620, __pyx_L1_error) + } + + /* "PyCafe.pyx":619 + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":622 + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":623 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, should be of type if handle, \ + * else if pv name")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_should_be_of_type); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_should_be_of_type); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_Input_argument_should_be_of_type); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":622 + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 622, __pyx_L1_error) + } + __pyx_L5:; + + /* "PyCafe.pyx":626 + * "Input argument, should be of type if handle, \ + * else if pv name")) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":627 + * else if pv name")) + * with nogil: + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) # <<<<<<<<<<<<<< + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + */ + __pyx_v_self->_c_cafe->openNowAndWaitHandleV(__pyx_v_hList, __pyx_v_timeout); + } + + /* "PyCafe.pyx":626 + * "Input argument, should be of type if handle, \ + * else if pv name")) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":629 + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): # <<<<<<<<<<<<<< + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + */ + for (__pyx_t_3 = 0; __pyx_t_3 < 0x64; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":630 + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":631 + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) # <<<<<<<<<<<<<< + * npoll = npoll+1 + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sleep); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":632 + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + * npoll = npoll+1 # <<<<<<<<<<<<<< + * else: + * break + */ + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_npoll, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_npoll, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":630 + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":634 + * npoll = npoll+1 + * else: + * break # <<<<<<<<<<<<<< + * # if npoll > 1: + * # print("npoll in _c_cafe.initCallbackCompleteV(hList)", npoll) + */ + /*else*/ { + goto __pyx_L17_break; + } + __pyx_L18:; + } + __pyx_L17_break:; + + /* "PyCafe.pyx":605 + * cdef npoll = 0 + * + * if handlesPV is not None: # <<<<<<<<<<<<<< + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":639 + * + * else: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWait(timeout) + * ###handleList, pvList = self.getHandles() + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":640 + * else: + * with nogil: + * self._c_cafe.openNowAndWait(timeout) # <<<<<<<<<<<<<< + * ###handleList, pvList = self.getHandles() + * + */ + __pyx_v_self->_c_cafe->openNowAndWait(__pyx_v_timeout); + } + + /* "PyCafe.pyx":639 + * + * else: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWait(timeout) + * ###handleList, pvList = self.getHandles() + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L21; + } + __pyx_L21:; + } + } + + /* "PyCafe.pyx":643 + * ###handleList, pvList = self.getHandles() + * + * self.hh.getHandles(hList, pvV) # <<<<<<<<<<<<<< + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + */ + (void)(__pyx_v_self->hh.getHandles(__pyx_v_hList, __pyx_v_pvV)); + + /* "PyCafe.pyx":645 + * self.hh.getHandles(hList, pvV) + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): # <<<<<<<<<<<<<< + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + */ + for (__pyx_t_3 = 0; __pyx_t_3 < 0x64; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":646 + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":647 + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) # <<<<<<<<<<<<<< + * npoll = npoll+1 + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":648 + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + * npoll = npoll+1 # <<<<<<<<<<<<<< + * else: + * break + */ + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_npoll, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_npoll, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":646 + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":650 + * npoll = npoll+1 + * else: + * break # <<<<<<<<<<<<<< + * #print("npoll in self._c_cafe.initCallbackCompleteV(hList)", npoll) + * + */ + /*else*/ { + goto __pyx_L23_break; + } + __pyx_L24:; + } + __pyx_L23_break:; + } + __pyx_L4:; + + /* "PyCafe.pyx":588 + * ############################################################################# + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openNowAndWait" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.openNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_npoll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":658 + * ############################################################################ + * + * def openGroupNowAndWait(self, double timeout=0): # <<<<<<<<<<<<<< + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWait (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openGroupNowAndWait") < 0)) __PYX_ERR(3, 658, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 658, __pyx_L3_error) + } else { + __pyx_v_timeout = ((double)0.0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 658, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_36openGroupNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("openGroupNowAndWait", 0); + + /* "PyCafe.pyx":659 + * + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":660 + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + * # self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + */ + (void)(__pyx_v_self->_c_cafe->channelOpenGroupPolicy.getTimeout()); + + /* "PyCafe.pyx":659 + * + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + */ + } + + /* "PyCafe.pyx":669 + * # WITH_PEND_EVENT) + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupNowAndWait(timeout) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":670 + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: + * self._c_cafe.openGroupNowAndWait(timeout) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openGroupNowAndWait(__pyx_v_timeout); + } + + /* "PyCafe.pyx":669 + * # WITH_PEND_EVENT) + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupNowAndWait(timeout) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":671 + * with nogil: + * self._c_cafe.openGroupNowAndWait(timeout) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":658 + * ############################################################################ + * + * def openGroupNowAndWait(self, double timeout=0): # <<<<<<<<<<<<<< + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":677 + * ############################################################################ + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39openGroupNowAndWaitForInputGroups(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39openGroupNowAndWaitForInputGroups(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_v_groupHandles = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWaitForInputGroups (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,&__pyx_n_s_groupHandles,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_groupHandles)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWaitForInputGroups", 1, 2, 2, 1); __PYX_ERR(3, 677, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openGroupNowAndWaitForInputGroups") < 0)) __PYX_ERR(3, 677, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 677, __pyx_L3_error) + __pyx_v_groupHandles = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWaitForInputGroups", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 677, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWaitForInputGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_38openGroupNowAndWaitForInputGroups(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout, __pyx_v_groupHandles); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38openGroupNowAndWaitForInputGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_groupHandles) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + char const *__pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + __Pyx_RefNannySetupContext("openGroupNowAndWaitForInputGroups", 0); + + /* "PyCafe.pyx":678 + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hList + */ + __Pyx_INCREF(__pyx_n_u_openGroupNowAndWaitForInputGroup); + __pyx_v__METHOD = __pyx_n_u_openGroupNowAndWaitForInputGroup; + + /* "PyCafe.pyx":682 + * cdef vector[unsigned int] hList + * + * if isinstance(groupHandles, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_groupHandles); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":683 + * + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): # <<<<<<<<<<<<<< + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_groupHandles); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 683, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":684 + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":685 + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) # <<<<<<<<<<<<<< + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 685, __pyx_L1_error) + } + + /* "PyCafe.pyx":684 + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":686 + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":688 + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_6); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 688, __pyx_L1_error) + + /* "PyCafe.pyx":687 + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( # <<<<<<<<<<<<<< + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + */ + try { + __pyx_v_hList.push_back(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_9)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 687, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":686 + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":690 + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "PyCafe.pyx":691 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":690 + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(3, 690, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":682 + * cdef vector[unsigned int] hList + * + * if isinstance(groupHandles, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":694 + * "List input arguments, should be of type \ + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_groupHandles); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_groupHandles); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":695 + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) # <<<<<<<<<<<<<< + * elif isinstance(groupHandles, (str)): + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_groupHandles); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 695, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 695, __pyx_L1_error) + } + + /* "PyCafe.pyx":694 + * "List input arguments, should be of type \ + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":696 + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_groupHandles); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":697 + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_groupHandles); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 697, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_9)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 697, __pyx_L1_error) + } + + /* "PyCafe.pyx":696 + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":699 + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Second input argument (if not a list), should be of " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":700 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("Second input argument (if not a list), should be of " + * "type if group handle, " + */ + __pyx_t_13 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_if_not_a_l}; + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_10); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_if_not_a_l}; + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_10); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_13) { + __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_if_not_a_l); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_if_not_a_l); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_Second_input_argument_if_not_a_l); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":699 + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Second input argument (if not a list), should be of " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 699, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":706 + * + * # list to vector + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":707 + * # list to vector + * with nogil: + * self._c_cafe.groupOpenNowAndWait(timeout, hList) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->groupOpenNowAndWait(__pyx_v_timeout, __pyx_v_hList); + } + + /* "PyCafe.pyx":706 + * + * # list to vector + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":708 + * with nogil: + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":677 + * ############################################################################ + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWaitForInputGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":712 + * ############################################################################ + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41openMonitorPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41openMonitorPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_40openMonitorPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorPrepare", 0); + + /* "PyCafe.pyx":716 + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorPrepare() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":717 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openMonitorPrepare() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openMonitorPrepare(); + } + + /* "PyCafe.pyx":716 + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorPrepare() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":718 + * with nogil: + * self._c_cafe.openMonitorPrepare() + * return # <<<<<<<<<<<<<< + * + * ############################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":712 + * ############################################################################ + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":722 + * ############################################################################## + * + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * # reset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43openMonitorNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43openMonitorNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorNow (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_42openMonitorNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_42openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("openMonitorNow", 0); + + /* "PyCafe.pyx":728 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind( + * # WITH_FLUSH_IO) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":729 + * # WITH_FLUSH_IO) + * with nogil: + * self._c_cafe.openMonitorNow() # <<<<<<<<<<<<<< + * time.sleep(0.01) + * return + */ + __pyx_v_self->_c_cafe->openMonitorNow(); + } + + /* "PyCafe.pyx":728 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind( + * # WITH_FLUSH_IO) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":730 + * with nogil: + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) # <<<<<<<<<<<<<< + * return + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":731 + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":722 + * ############################################################################## + * + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * # reset + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":737 + * ############################################################################ + * + * cdef getMonitorWhenToFlushSendBuffer(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() + * + */ + +static PyObject *__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getMonitorWhenToFlushSendBuffer", 0); + + /* "PyCafe.pyx":738 + * + * cdef getMonitorWhenToFlushSendBuffer(self): + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(__pyx_v_self->_c_cafe->channelMonitorPolicy.getWhenToFlushSendBuffer()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":737 + * ############################################################################ + * + * cdef getMonitorWhenToFlushSendBuffer(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorWhenToFlushSendBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":743 + * + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "openMonitorNowAndWait(timeout)" + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorNowAndWait (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 743, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_44openMonitorNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_44openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + double __pyx_t_2; + double __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("openMonitorNowAndWait", 0); + + /* "PyCafe.pyx":744 + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): + * cdef _METHOD = "openMonitorNowAndWait(timeout)" # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + */ + __Pyx_INCREF(__pyx_kp_u_openMonitorNowAndWait_timeout); + __pyx_v__METHOD = __pyx_kp_u_openMonitorNowAndWait_timeout; + + /* "PyCafe.pyx":752 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":753 + * + * with nogil: + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) # <<<<<<<<<<<<<< + * + * if timeout <= 0: + */ + __pyx_t_1 = __pyx_v_self->_min_timeout; + __pyx_t_2 = __pyx_v_timeout; + if (((__pyx_t_1 > __pyx_t_2) != 0)) { + __pyx_t_3 = __pyx_t_1; + } else { + __pyx_t_3 = __pyx_t_2; + } + __pyx_v_self->_c_cafe->openMonitorNowAndWait(__pyx_t_3); + } + + /* "PyCafe.pyx":752 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":755 + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + * if timeout <= 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_4 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":757 + * if timeout <= 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__49, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":760 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to:"), self._min_timeout)) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->_min_timeout); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_input_argument_timeout_must_be_a); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":757 + * if timeout <= 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 756, __pyx_L1_error) + + /* "PyCafe.pyx":755 + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + * if timeout <= 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":743 + * + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "openMonitorNowAndWait(timeout)" + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":765 + * ############################################################################ + * + * def ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_event(timeout)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_pend_event (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 765, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_event", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_46ca_pend_event(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_46ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + double __pyx_v__timeout; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("ca_pend_event", 0); + + /* "PyCafe.pyx":766 + * + * def ca_pend_event(self, double timeout): + * cdef _METHOD = "ca_pend_event(timeout)" # <<<<<<<<<<<<<< + * + * cdef double _timeout = timeout + */ + __Pyx_INCREF(__pyx_kp_u_ca_pend_event_timeout); + __pyx_v__METHOD = __pyx_kp_u_ca_pend_event_timeout; + + /* "PyCafe.pyx":768 + * cdef _METHOD = "ca_pend_event(timeout)" + * + * cdef double _timeout = timeout # <<<<<<<<<<<<<< + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + */ + __pyx_v__timeout = __pyx_v_timeout; + + /* "PyCafe.pyx":769 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":770 + * cdef double _timeout = timeout + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * + * self._c_cafe._ca_pend_event(_timeout) + */ + __pyx_v__timeout = DEFAULT_TIMEOUT_PEND_EVENT; + + /* "PyCafe.pyx":769 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + */ + } + + /* "PyCafe.pyx":772 + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + * self._c_cafe._ca_pend_event(_timeout) # <<<<<<<<<<<<<< + * + * if timeout < 0: + */ + (void)(__pyx_v_self->_c_cafe->_ca_pend_event(__pyx_v__timeout)); + + /* "PyCafe.pyx":774 + * self._c_cafe._ca_pend_event(_timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_1 = ((__pyx_v_timeout < 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":776 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__49, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":779 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to CAFE default:"), _timeout)) # <<<<<<<<<<<<<< + * + * def ca_pend_io(self, double timeout): + */ + __pyx_t_4 = PyFloat_FromDouble(__pyx_v__timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":776 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 775, __pyx_L1_error) + + /* "PyCafe.pyx":774 + * self._c_cafe._ca_pend_event(_timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":765 + * ############################################################################ + * + * def ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_event(timeout)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_event", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":781 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_pend_io(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_io(timeout)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_pend_io (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 781, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_io", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_48ca_pend_io(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + double __pyx_v__timeout; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("ca_pend_io", 0); + + /* "PyCafe.pyx":782 + * + * def ca_pend_io(self, double timeout): + * cdef _METHOD = "ca_pend_io(timeout)" # <<<<<<<<<<<<<< + * + * cdef double _timeout = timeout + */ + __Pyx_INCREF(__pyx_kp_u_ca_pend_io_timeout); + __pyx_v__METHOD = __pyx_kp_u_ca_pend_io_timeout; + + /* "PyCafe.pyx":784 + * cdef _METHOD = "ca_pend_io(timeout)" + * + * cdef double _timeout = timeout # <<<<<<<<<<<<<< + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_IO + */ + __pyx_v__timeout = __pyx_v_timeout; + + /* "PyCafe.pyx":785 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":786 + * cdef double _timeout = timeout + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * + * self._c_cafe._ca_pend_io(timeout) + */ + __pyx_v__timeout = DEFAULT_TIMEOUT_PEND_IO; + + /* "PyCafe.pyx":785 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + */ + } + + /* "PyCafe.pyx":788 + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + * self._c_cafe._ca_pend_io(timeout) # <<<<<<<<<<<<<< + * + * if timeout < 0: + */ + (void)(__pyx_v_self->_c_cafe->_ca_pend_io(__pyx_v_timeout)); + + /* "PyCafe.pyx":790 + * self._c_cafe._ca_pend_io(timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_1 = ((__pyx_v_timeout < 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":792 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__49, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":795 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to CAFE default:"), _timeout)) # <<<<<<<<<<<<<< + * + * def ca_poll(self): + */ + __pyx_t_4 = PyFloat_FromDouble(__pyx_v__timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":792 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 791, __pyx_L1_error) + + /* "PyCafe.pyx":790 + * self._c_cafe._ca_pend_io(timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":781 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_pend_io(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_io(timeout)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_io", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":797 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_poll(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_poll() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51ca_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51ca_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_poll (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_50ca_poll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_poll", 0); + + /* "PyCafe.pyx":798 + * + * def ca_poll(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":799 + * def ca_poll(self): + * with nogil: + * self._c_cafe._ca_poll() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->_ca_poll()); + } + + /* "PyCafe.pyx":798 + * + * def ca_poll(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":797 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_poll(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_poll() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":802 + * + * + * def ca_flush_io(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_flush_io() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53ca_flush_io(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53ca_flush_io(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_flush_io (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_52ca_flush_io(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_52ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_flush_io", 0); + + /* "PyCafe.pyx":803 + * + * def ca_flush_io(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":804 + * def ca_flush_io(self): + * with nogil: + * self._c_cafe._ca_flush_io() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->_ca_flush_io()); + } + + /* "PyCafe.pyx":803 + * + * def ca_flush_io(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":802 + * + * + * def ca_flush_io(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_flush_io() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":808 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55setChannelRequestPolicyGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55setChannelRequestPolicyGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when; + ChannelWaitForResponsePolicyKind __pyx_v_wait; + ChannelRequestPolicyKind __pyx_v_method; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setChannelRequestPolicyGet (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_when,&__pyx_n_s_wait,&__pyx_n_s_method,&__pyx_n_s_cb,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":811 + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + * ChannelRequestPolicyKind method, cb: object = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setChannelRequestPolicyGet" + */ + values[4] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_when)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 1); __PYX_ERR(3, 808, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wait)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 2); __PYX_ERR(3, 808, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 3); __PYX_ERR(3, 808, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setChannelRequestPolicyGet") < 0)) __PYX_ERR(3, 808, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_when = ((ChannelWhenToFlushSendBufferPolicyKind)__Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 809, __pyx_L3_error) + __pyx_v_wait = ((ChannelWaitForResponsePolicyKind)__Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 810, __pyx_L3_error) + __pyx_v_method = ((ChannelRequestPolicyKind)__Pyx_PyInt_As_ChannelRequestPolicyKind(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 811, __pyx_L3_error) + __pyx_v_cb = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 808, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setChannelRequestPolicyGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_54setChannelRequestPolicyGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_when, __pyx_v_wait, __pyx_v_method, __pyx_v_cb); + + /* "PyCafe.pyx":808 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_54setChannelRequestPolicyGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when, ChannelWaitForResponsePolicyKind __pyx_v_wait, ChannelRequestPolicyKind __pyx_v_method, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handle = NULL; + ChannelRequestPolicy __pyx_v_crp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + __Pyx_RefNannySetupContext("setChannelRequestPolicyGet", 0); + + /* "PyCafe.pyx":813 + * ChannelRequestPolicyKind method, cb: object = None): + * + * cdef str _METHOD = "setChannelRequestPolicyGet" # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_setChannelRequestPolicyGet); + __pyx_v__METHOD = __pyx_n_u_setChannelRequestPolicyGet; + + /* "PyCafe.pyx":815 + * cdef str _METHOD = "setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":816 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":815 + * cdef str _METHOD = "setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":817 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":818 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 818, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handle = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":817 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":820 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":821 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":820 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 820, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":828 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * if when: + * crp.setWhenToFlushSendBuffer(when) + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 828, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_9, __pyx_v_crp)); + + /* "PyCafe.pyx":829 + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: # <<<<<<<<<<<<<< + * crp.setWhenToFlushSendBuffer(when) + * if wait: + */ + if (__pyx_v_when) { + + /* "PyCafe.pyx":830 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: + * crp.setWhenToFlushSendBuffer(when) # <<<<<<<<<<<<<< + * if wait: + * crp.setWaitKind(wait) + */ + __pyx_v_crp.setWhenToFlushSendBuffer(__pyx_v_when); + + /* "PyCafe.pyx":829 + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: # <<<<<<<<<<<<<< + * crp.setWhenToFlushSendBuffer(when) + * if wait: + */ + } + + /* "PyCafe.pyx":831 + * if when: + * crp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * crp.setWaitKind(wait) + * if method: + */ + if (__pyx_v_wait) { + + /* "PyCafe.pyx":832 + * crp.setWhenToFlushSendBuffer(when) + * if wait: + * crp.setWaitKind(wait) # <<<<<<<<<<<<<< + * if method: + * crp.setMethodKind(method) + */ + __pyx_v_crp.setWaitKind(__pyx_v_wait); + + /* "PyCafe.pyx":831 + * if when: + * crp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * crp.setWaitKind(wait) + * if method: + */ + } + + /* "PyCafe.pyx":833 + * if wait: + * crp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * crp.setMethodKind(method) + * if cb is not None: + */ + if (__pyx_v_method) { + + /* "PyCafe.pyx":834 + * crp.setWaitKind(wait) + * if method: + * crp.setMethodKind(method) # <<<<<<<<<<<<<< + * if cb is not None: + * getDictGlobal[handle] = cb + */ + __pyx_v_crp.setMethodKind(__pyx_v_method); + + /* "PyCafe.pyx":833 + * if wait: + * crp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * crp.setMethodKind(method) + * if cb is not None: + */ + } + + /* "PyCafe.pyx":835 + * if method: + * crp.setMethodKind(method) + * if cb is not None: # <<<<<<<<<<<<<< + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":836 + * crp.setMethodKind(method) + * if cb is not None: + * getDictGlobal[handle] = cb # <<<<<<<<<<<<<< + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + * + */ + if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 836, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_getDictGlobal, __pyx_v_handle, __pyx_v_cb) < 0)) __PYX_ERR(3, 836, __pyx_L1_error) + + /* "PyCafe.pyx":837 + * if cb is not None: + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + */ + __pyx_v_crp.setPyHandlerGet(); + + /* "PyCafe.pyx":835 + * if method: + * crp.setMethodKind(method) + * if cb is not None: # <<<<<<<<<<<<<< + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + } + + /* "PyCafe.pyx":839 + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ################################################################################ + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 839, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_9, __pyx_v_crp)); + + /* "PyCafe.pyx":840 + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ################################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":808 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.setChannelRequestPolicyGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":846 + * + * + * def initCallbackComplete(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "initCallbackComplete" + * cdef vector[unsigned int] hList + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57initCallbackComplete(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57initCallbackComplete(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initCallbackComplete (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_56initCallbackComplete(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56initCallbackComplete(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("initCallbackComplete", 0); + + /* "PyCafe.pyx":847 + * + * def initCallbackComplete(self, handlePV): + * cdef str _METHOD = "initCallbackComplete" # <<<<<<<<<<<<<< + * cdef vector[unsigned int] hList + * + */ + __Pyx_INCREF(__pyx_n_u_initCallbackComplete); + __pyx_v__METHOD = __pyx_n_u_initCallbackComplete; + + /* "PyCafe.pyx":850 + * cdef vector[unsigned int] hList + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":851 + * + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): # <<<<<<<<<<<<<< + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":852 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":853 + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.getHandleFromPV(handlePV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 853, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 853, __pyx_L1_error) + } + + /* "PyCafe.pyx":852 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":854 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":855 + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.getHandleFromPV(handlePV[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPV); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 855, __pyx_L1_error) + } + + /* "PyCafe.pyx":854 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":857 + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be of type if handle" + + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":858 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("List input arguments, should be of type if handle" + + * "else if pvname"))) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o_2}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o_2}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":857 + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be of type if handle" + + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 857, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":861 + * ("List input arguments, should be of type if handle" + + * "else if pvname"))) + * return self._c_cafe.initCallbackCompleteV(hList) # <<<<<<<<<<<<<< + * + * elif isinstance(handlePV, (int, long)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":850 + * cdef vector[unsigned int] hList + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":863 + * return self._c_cafe.initCallbackCompleteV(hList) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":864 + * + * elif isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":863 + * return self._c_cafe.initCallbackCompleteV(hList) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":865 + * elif isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":866 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 866, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_v_handle = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":865 + * elif isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":868 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Input argument should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":869 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("Input argument should be of type if handle," + + * "else if pvname"))) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type_2}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type_2}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_should_be_of_type_2); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_should_be_of_type_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_Input_argument_should_be_of_type_2); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":868 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Input argument should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 868, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":874 + * + * #print("cb complete", self._c_cafe.initCallbackCompleteHandle(handle)) + * return self._c_cafe.initCallbackCompleteHandle(handle) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 874, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->initCallbackCompleteHandle(__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":846 + * + * + * def initCallbackComplete(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "initCallbackComplete" + * cdef vector[unsigned int] hList + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.initCallbackComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":878 + * + * ############################################################################ + * def setCallbackGet(self, handlePV, object cb = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackGet" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCallbackGet (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallbackGet") < 0)) __PYX_ERR(3, 878, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCallbackGet", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 878, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_58setCallbackGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + ChannelRequestPolicy __pyx_v_crp; + PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setCallbackGet", 0); + + /* "PyCafe.pyx":880 + * def setCallbackGet(self, handlePV, object cb = None): + * + * cdef str _METHOD = "setCallbackGet" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy crp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackGet); + __pyx_v__METHOD = __pyx_n_u_setCallbackGet; + + /* "PyCafe.pyx":883 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 883, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":885 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_3 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":886 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":885 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":887 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":888 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 888, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":887 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":890 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":891 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":890 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 890, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":896 + * + * global getDictGlobal + * if cb is not None: # <<<<<<<<<<<<<< + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":897 + * global getDictGlobal + * if cb is not None: + * getDictGlobal[handle] = cb # <<<<<<<<<<<<<< + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + if (unlikely(__pyx_v_6PyCafe_getDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 897, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_getDictGlobal, __pyx_v_handle, __pyx_v_cb) < 0)) __PYX_ERR(3, 897, __pyx_L1_error) + + /* "PyCafe.pyx":898 + * if cb is not None: + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_crp.setPyHandlerGet(); + + /* "PyCafe.pyx":896 + * + * global getDictGlobal + * if cb is not None: # <<<<<<<<<<<<<< + * getDictGlobal[handle] = cb + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":900 + * crp.setPyHandlerGet() # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + */ + /*else*/ { + __pyx_v_crp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":902 + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 902, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":903 + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":878 + * + * ############################################################################ + * def setCallbackGet(self, handlePV, object cb = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackGet" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":907 + * + * ############################################################################ + * def setCallbackPut(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackPut" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCallbackPut (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallbackPut") < 0)) __PYX_ERR(3, 907, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCallbackPut", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 907, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_60setCallbackPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_60setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + ChannelRequestPolicy __pyx_v_crp; + PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setCallbackPut", 0); + + /* "PyCafe.pyx":909 + * def setCallbackPut(self, handlePV, object cb=None): + * + * cdef str _METHOD = "setCallbackPut" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy crp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackPut); + __pyx_v__METHOD = __pyx_n_u_setCallbackPut; + + /* "PyCafe.pyx":912 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyPut(handlePV, crp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 912, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyPut(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":914 + * self.ph.getChannelRequestPolicyPut(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_3 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":915 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":914 + * self.ph.getChannelRequestPolicyPut(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":916 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":917 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 917, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":916 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":919 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":920 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":919 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 919, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":925 + * + * global putDictGlobal + * if cb is not None: # <<<<<<<<<<<<<< + * putDictGlobal[handle] = cb + * crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":926 + * global putDictGlobal + * if cb is not None: + * putDictGlobal[handle] = cb # <<<<<<<<<<<<<< + * crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + if (unlikely(__pyx_v_6PyCafe_putDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 926, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_putDictGlobal, __pyx_v_handle, __pyx_v_cb) < 0)) __PYX_ERR(3, 926, __pyx_L1_error) + + /* "PyCafe.pyx":927 + * if cb is not None: + * putDictGlobal[handle] = cb + * crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_crp.setPyHandlerPut(); + + /* "PyCafe.pyx":925 + * + * global putDictGlobal + * if cb is not None: # <<<<<<<<<<<<<< + * putDictGlobal[handle] = cb + * crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":929 + * crp.setPyHandlerPut() # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) + */ + /*else*/ { + __pyx_v_crp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":931 + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 931, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyPut(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":932 + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":907 + * + * ############################################################################ + * def setCallbackPut(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackPut" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":936 + * + * ############################################################################ + * def setTimeout(self, timeout): # <<<<<<<<<<<<<< + * return self.ph.setTimeout(timeout) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63setTimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63setTimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setTimeout (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_62setTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_62setTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("setTimeout", 0); + + /* "PyCafe.pyx":937 + * ############################################################################ + * def setTimeout(self, timeout): + * return self.ph.setTimeout(timeout) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 937, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setTimeout(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":936 + * + * ############################################################################ + * def setTimeout(self, timeout): # <<<<<<<<<<<<<< + * return self.ph.setTimeout(timeout) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.setTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":941 + * + * ############################################################################ + * def getTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65getTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65getTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeoutGet (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_64getTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_64getTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getTimeoutGet", 0); + + /* "PyCafe.pyx":943 + * def getTimeoutGet(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":944 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":945 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p, g) + * minValue = g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":946 + * p = 0 + * g = 0 + * self.ph.getTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = g + * self.ph.getTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":947 + * g = 0 + * self.ph.getTimeoutMin(p, g) + * minValue = g # <<<<<<<<<<<<<< + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":948 + * self.ph.getTimeoutMin(p, g) + * minValue = g + * self.ph.getTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":949 + * minValue = g + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + __pyx_t_1 = ((__pyx_v_g < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":950 + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): + * minValue = g # <<<<<<<<<<<<<< + * return minValue + * ############################################################################ + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":949 + * minValue = g + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + } + + /* "PyCafe.pyx":951 + * if (g < minValue): + * minValue = g + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":941 + * + * ############################################################################ + * def getTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeoutGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":956 + * ############################################################################ + * + * def getTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67getTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67getTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeoutPut (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_66getTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_66getTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getTimeoutPut", 0); + + /* "PyCafe.pyx":958 + * def getTimeoutPut(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":959 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":960 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p, g) + * minValue = p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":961 + * p = 0 + * g = 0 + * self.ph.getTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = p + * self.ph.getTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":962 + * g = 0 + * self.ph.getTimeoutMin(p, g) + * minValue = p # <<<<<<<<<<<<<< + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":963 + * self.ph.getTimeoutMin(p, g) + * minValue = p + * self.ph.getTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":964 + * minValue = p + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + __pyx_t_1 = ((__pyx_v_p < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":965 + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): + * minValue = g # <<<<<<<<<<<<<< + * return minValue + * ############################################################################ + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":964 + * minValue = p + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + } + + /* "PyCafe.pyx":966 + * if (p < minValue): + * minValue = g + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":956 + * ############################################################################ + * + * def getTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeoutPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":971 + * ############################################################################ + * + * def setSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * return self.ph.setSelfGoverningTimeout(b) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSelfGoverningTimeout (wrapper)", 0); + assert(__pyx_arg_b); { + __pyx_v_b = __Pyx_PyObject_IsTrue(__pyx_arg_b); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 971, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_68setSelfGoverningTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_b)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":972 + * + * def setSelfGoverningTimeout(self, bint b): + * return self.ph.setSelfGoverningTimeout(b) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setSelfGoverningTimeout(__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":971 + * ############################################################################ + * + * def setSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * return self.ph.setSelfGoverningTimeout(b) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":978 + * # Synchronous Groups + * ############################################################################ + * def setSGTimeout(self, double timeout): # <<<<<<<<<<<<<< + * return self.ph.setSGTimeout(timeout) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSGTimeout (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 978, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSGTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_70setSGTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSGTimeout", 0); + + /* "PyCafe.pyx":979 + * ############################################################################ + * def setSGTimeout(self, double timeout): + * return self.ph.setSGTimeout(timeout) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setSGTimeout(__pyx_v_timeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":978 + * # Synchronous Groups + * ############################################################################ + * def setSGTimeout(self, double timeout): # <<<<<<<<<<<<<< + * return self.ph.setSGTimeout(timeout) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSGTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":983 + * + * ############################################################################ + * def getSGTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getSGTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getSGTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSGTimeoutGet (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_72getSGTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getSGTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getSGTimeoutGet", 0); + + /* "PyCafe.pyx":985 + * def getSGTimeoutGet(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":986 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":987 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p, g) + * minValue = g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":988 + * p = 0 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":989 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + * minValue = g # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":990 + * self.ph.getSGTimeoutMin(p, g) + * minValue = g + * self.ph.getSGTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":991 + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * + */ + __pyx_t_1 = ((__pyx_v_g < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":992 + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): + * minValue = g # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":991 + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * + */ + } + + /* "PyCafe.pyx":994 + * minValue = g + * + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":983 + * + * ############################################################################ + * def getSGTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getSGTimeoutGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":998 + * + * ############################################################################ + * def getSGTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getSGTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getSGTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSGTimeoutPut (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_74getSGTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getSGTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getSGTimeoutPut", 0); + + /* "PyCafe.pyx":1000 + * def getSGTimeoutPut(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":1001 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":1002 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p, g) + * minValue = p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":1003 + * p = 0 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":1004 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + * minValue = p # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":1005 + * self.ph.getSGTimeoutMin(p, g) + * minValue = p + * self.ph.getSGTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue = p + */ + (void)(__pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":1006 + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = p + * + */ + __pyx_t_1 = ((__pyx_v_p < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1007 + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): + * minValue = p # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":1006 + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = p + * + */ + } + + /* "PyCafe.pyx":1009 + * minValue = p + * + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":998 + * + * ############################################################################ + * def getSGTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getSGTimeoutPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1013 + * + * ############################################################################ + * def setSGSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSGSelfGoverningTimeout (wrapper)", 0); + assert(__pyx_arg_b); { + __pyx_v_b = __Pyx_PyObject_IsTrue(__pyx_arg_b); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1013, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSGSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_76setSGSelfGoverningTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_b)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76setSGSelfGoverningTimeout(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b) { + PolicyHelper __pyx_v_ph; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSGSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":1015 + * def setSGSelfGoverningTimeout(self, bint b): + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ph.setSGSelfGoverningTimeout(__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1013 + * + * ############################################################################ + * def setSGSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSGSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1020 + * ############################################################################ + * + * def getContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getContext" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79getContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79getContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getContext (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_78getContext(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_78getContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("getContext", 0); + + /* "PyCafe.pyx":1021 + * + * def getContext(self, handlePV): + * cdef str _METHOD = "getContext" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getContext); + __pyx_v__METHOD = __pyx_n_u_getContext; + + /* "PyCafe.pyx":1023 + * cdef str _METHOD = "getContext" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1024 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1025 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * return < long > self.hh.getContextFromPV(handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1025, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getContextFromHandle(__pyx_t_4))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1024 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1026 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromPV(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1027 + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + * return < long > self.hh.getContextFromPV(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_handlePV); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1027, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getContextFromPV(__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1026 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromPV(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1029 + * return < long > self.hh.getContextFromPV(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='TypeError', _source=_METHOD, + * _error_info=( + */ + /*else*/ { + + /* "PyCafe.pyx":1030 + * else: + * _cafeException = CafeException( + * _type='TypeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=( + * "First input argument should be of type if handle, " + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_TypeError) < 0) __PYX_ERR(3, 1030, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 1030, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_4) < 0) __PYX_ERR(3, 1030, __pyx_L1_error) + + /* "PyCafe.pyx":1029 + * return < long > self.hh.getContextFromPV(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='TypeError', _source=_METHOD, + * _error_info=( + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1034 + * "First input argument should be of type if handle, " + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 1034, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1020 + * ############################################################################ + * + * def getContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getContext" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1039 + * ############################################################################ + * + * def attachContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "attachContext" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81attachContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81attachContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("attachContext (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_80attachContext(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_80attachContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("attachContext", 0); + + /* "PyCafe.pyx":1040 + * + * def attachContext(self, handlePV): + * cdef str _METHOD = "attachContext" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_attachContext); + __pyx_v__METHOD = __pyx_n_u_attachContext; + + /* "PyCafe.pyx":1042 + * cdef str _METHOD = "attachContext" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1043 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1044 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * return self._c_cafe.attachContextByPVName(handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1044, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->attachContextByHandle(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1043 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1045 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1046 + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + * return self._c_cafe.attachContextByPVName(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_handlePV); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 1046, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->attachContextByPVName(__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1045 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1048 + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1049 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1048 + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 1048, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1039 + * ############################################################################ + * + * def attachContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "attachContext" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.attachContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1055 + * + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83collectionDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83collectionDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_cName; + std::vector __pyx_v_cMembers; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionDefine (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cName,&__pyx_n_s_cMembers,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cMembers)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("collectionDefine", 1, 2, 2, 1); __PYX_ERR(3, 1055, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collectionDefine") < 0)) __PYX_ERR(3, 1055, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_cName = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(3, 1055, __pyx_L3_error) + __pyx_v_cMembers = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1055, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("collectionDefine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1055, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.collectionDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_82collectionDefine(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_cName, __pyx_v_cMembers); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82collectionDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionDefine", 0); + + /* "PyCafe.pyx":1056 + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1057 + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionDefine(__pyx_v_cName, __pyx_v_cMembers)); + } + + /* "PyCafe.pyx":1056 + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1055 + * + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1060 + * + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85defineCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85defineCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_cName; + std::vector __pyx_v_cMembers; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineCollection (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cName,&__pyx_n_s_cMembers,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cMembers)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("defineCollection", 1, 2, 2, 1); __PYX_ERR(3, 1060, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "defineCollection") < 0)) __PYX_ERR(3, 1060, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_cName = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(3, 1060, __pyx_L3_error) + __pyx_v_cMembers = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1060, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("defineCollection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1060, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.defineCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_84defineCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_cName, __pyx_v_cMembers); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84defineCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineCollection", 0); + + /* "PyCafe.pyx":1061 + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1062 + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionDefine(__pyx_v_cName, __pyx_v_cMembers)); + } + + /* "PyCafe.pyx":1061 + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1060 + * + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1065 + * + * ############################################################################ + * def collectionList(self): # <<<<<<<<<<<<<< + * cdef vector[string] collectionList + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87collectionList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87collectionList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_86collectionList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_86collectionList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_collectionList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("collectionList", 0); + + /* "PyCafe.pyx":1067 + * def collectionList(self): + * cdef vector[string] collectionList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionList(collectionList) + * return collectionList + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1068 + * cdef vector[string] collectionList + * with nogil: + * self._c_cafe.collectionList(collectionList) # <<<<<<<<<<<<<< + * return collectionList + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionList(__pyx_v_collectionList)); + } + + /* "PyCafe.pyx":1067 + * def collectionList(self): + * cdef vector[string] collectionList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionList(collectionList) + * return collectionList + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1069 + * with nogil: + * self._c_cafe.collectionList(collectionList) + * return collectionList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_collectionList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1065 + * + * ############################################################################ + * def collectionList(self): # <<<<<<<<<<<<<< + * cdef vector[string] collectionList + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.collectionList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1073 + * + * ############################################################################ + * def collectionMemberList(self, const char * cName): # <<<<<<<<<<<<<< + * cdef vector[string] cMemberList + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89collectionMemberList(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89collectionMemberList(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName) { + char const *__pyx_v_cName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionMemberList (wrapper)", 0); + assert(__pyx_arg_cName); { + __pyx_v_cName = __Pyx_PyObject_AsString(__pyx_arg_cName); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(3, 1073, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.collectionMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_88collectionMemberList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_cName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88collectionMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName) { + std::vector __pyx_v_cMemberList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("collectionMemberList", 0); + + /* "PyCafe.pyx":1075 + * def collectionMemberList(self, const char * cName): + * cdef vector[string] cMemberList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1076 + * cdef vector[string] cMemberList + * with nogil: + * self._c_cafe.collectionMemberList(cName, cMemberList) # <<<<<<<<<<<<<< + * return cMemberList + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionMemberList(__pyx_v_cName, __pyx_v_cMemberList)); + } + + /* "PyCafe.pyx":1075 + * def collectionMemberList(self, const char * cName): + * cdef vector[string] cMemberList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1077 + * with nogil: + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_cMemberList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1073 + * + * ############################################################################ + * def collectionMemberList(self, const char * cName): # <<<<<<<<<<<<<< + * cdef vector[string] cMemberList + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.collectionMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1082 + * + * ############################################################################ + * def loadCollectionsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.loadCollectionsFromXML(fileName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91loadCollectionsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91loadCollectionsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName) { + char const *__pyx_v_fileName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadCollectionsFromXML (wrapper)", 0); + assert(__pyx_arg_fileName); { + __pyx_v_fileName = __Pyx_PyObject_AsString(__pyx_arg_fileName); if (unlikely((!__pyx_v_fileName) && PyErr_Occurred())) __PYX_ERR(3, 1082, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.loadCollectionsFromXML", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_90loadCollectionsFromXML(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_fileName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90loadCollectionsFromXML(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_fileName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadCollectionsFromXML", 0); + + /* "PyCafe.pyx":1083 + * ############################################################################ + * def loadCollectionsFromXML(self, const char * fileName): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.loadCollectionsFromXML(fileName) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1084 + * def loadCollectionsFromXML(self, const char * fileName): + * with nogil: + * self._c_cafe.loadCollectionsFromXML(fileName) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->loadCollectionsFromXML(__pyx_v_fileName)); + } + + /* "PyCafe.pyx":1083 + * ############################################################################ + * def loadCollectionsFromXML(self, const char * fileName): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.loadCollectionsFromXML(fileName) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1085 + * with nogil: + * self._c_cafe.loadCollectionsFromXML(fileName) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1082 + * + * ############################################################################ + * def loadCollectionsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.loadCollectionsFromXML(fileName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1090 + * ############################################################################ + * + * def loadGroupsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.loadGroupsFromXML(fileName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93loadGroupsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93loadGroupsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName) { + char const *__pyx_v_fileName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadGroupsFromXML (wrapper)", 0); + assert(__pyx_arg_fileName); { + __pyx_v_fileName = __Pyx_PyObject_AsString(__pyx_arg_fileName); if (unlikely((!__pyx_v_fileName) && PyErr_Occurred())) __PYX_ERR(3, 1090, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.loadGroupsFromXML", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_92loadGroupsFromXML(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_fileName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92loadGroupsFromXML(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_fileName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadGroupsFromXML", 0); + + /* "PyCafe.pyx":1091 + * + * def loadGroupsFromXML(self, const char * fileName): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.loadGroupsFromXML(fileName) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1092 + * def loadGroupsFromXML(self, const char * fileName): + * with nogil: + * self._c_cafe.loadGroupsFromXML(fileName) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->loadGroupsFromXML(__pyx_v_fileName)); + } + + /* "PyCafe.pyx":1091 + * + * def loadGroupsFromXML(self, const char * fileName): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.loadGroupsFromXML(fileName) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1093 + * with nogil: + * self._c_cafe.loadGroupsFromXML(fileName) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1090 + * ############################################################################ + * + * def loadGroupsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.loadGroupsFromXML(fileName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1096 + * ############################################################################ + * + * def devicePositionMap(self, const char * collectionName): # <<<<<<<<<<<<<< + * p = [] + * d = [] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95devicePositionMap(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95devicePositionMap(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName) { + char const *__pyx_v_collectionName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("devicePositionMap (wrapper)", 0); + assert(__pyx_arg_collectionName); { + __pyx_v_collectionName = __Pyx_PyObject_AsString(__pyx_arg_collectionName); if (unlikely((!__pyx_v_collectionName) && PyErr_Occurred())) __PYX_ERR(3, 1096, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_94devicePositionMap(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_collectionName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_94devicePositionMap(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName) { + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_v_d = NULL; + std::map __pyx_v_mmfs; + std::map ::iterator __pyx_v_it; + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("devicePositionMap", 0); + + /* "PyCafe.pyx":1097 + * + * def devicePositionMap(self, const char * collectionName): + * p = [] # <<<<<<<<<<<<<< + * d = [] + * cdef map[float, string] mmfs + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_p = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1098 + * def devicePositionMap(self, const char * collectionName): + * p = [] + * d = [] # <<<<<<<<<<<<<< + * cdef map[float, string] mmfs + * cdef map[float, string].iterator it + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_d = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1101 + * cdef map[float, string] mmfs + * cdef map[float, string].iterator it + * self._c_cafe.devicePositionMap(collectionName, mmfs) # <<<<<<<<<<<<<< + * it = mmfs.begin() + * tup = () # tuple + */ + (void)(__pyx_v_self->_c_cafe->devicePositionMap(__pyx_v_collectionName, __pyx_v_mmfs)); + + /* "PyCafe.pyx":1102 + * cdef map[float, string].iterator it + * self._c_cafe.devicePositionMap(collectionName, mmfs) + * it = mmfs.begin() # <<<<<<<<<<<<<< + * tup = () # tuple + * while it != mmfs.end(): + */ + __pyx_v_it = __pyx_v_mmfs.begin(); + + /* "PyCafe.pyx":1103 + * self._c_cafe.devicePositionMap(collectionName, mmfs) + * it = mmfs.begin() + * tup = () # tuple # <<<<<<<<<<<<<< + * while it != mmfs.end(): + * tup = deref(it) + */ + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_v_tup = __pyx_empty_tuple; + + /* "PyCafe.pyx":1104 + * it = mmfs.begin() + * tup = () # tuple + * while it != mmfs.end(): # <<<<<<<<<<<<<< + * tup = deref(it) + * p.append(tup[0]) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_it != __pyx_v_mmfs.end()) != 0); + if (!__pyx_t_2) break; + + /* "PyCafe.pyx":1105 + * tup = () # tuple + * while it != mmfs.end(): + * tup = deref(it) # <<<<<<<<<<<<<< + * p.append(tup[0]) + * d.append(tup[1]) + */ + __pyx_t_1 = __pyx_convert_pair_to_py_float____std_3a__3a_string((*__pyx_v_it)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_tup, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1106 + * while it != mmfs.end(): + * tup = deref(it) + * p.append(tup[0]) # <<<<<<<<<<<<<< + * d.append(tup[1]) + * inc(it) + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1106, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1107 + * tup = deref(it) + * p.append(tup[0]) + * d.append(tup[1]) # <<<<<<<<<<<<<< + * inc(it) + * return d, p + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1107, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1108 + * p.append(tup[0]) + * d.append(tup[1]) + * inc(it) # <<<<<<<<<<<<<< + * return d, p + * + */ + (void)((++__pyx_v_it)); + } + + /* "PyCafe.pyx":1109 + * d.append(tup[1]) + * inc(it) + * return d, p # <<<<<<<<<<<<<< + * + * def devicePositionV(self, const char * collectionName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_d); + __Pyx_GIVEREF(__pyx_v_d); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d); + __Pyx_INCREF(__pyx_v_p); + __Pyx_GIVEREF(__pyx_v_p); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_p); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1096 + * ############################################################################ + * + * def devicePositionMap(self, const char * collectionName): # <<<<<<<<<<<<<< + * p = [] + * d = [] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1111 + * return d, p + * + * def devicePositionV(self, const char * collectionName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "devicePositionV" + * # p=[] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97devicePositionV(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97devicePositionV(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName) { + char const *__pyx_v_collectionName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("devicePositionV (wrapper)", 0); + assert(__pyx_arg_collectionName); { + __pyx_v_collectionName = __Pyx_PyObject_AsString(__pyx_arg_collectionName); if (unlikely((!__pyx_v_collectionName) && PyErr_Occurred())) __PYX_ERR(3, 1111, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_96devicePositionV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_collectionName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_96devicePositionV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_dev; + std::vector __pyx_v_pos; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("devicePositionV", 0); + + /* "PyCafe.pyx":1112 + * + * def devicePositionV(self, const char * collectionName): + * cdef str _METHOD = "devicePositionV" # <<<<<<<<<<<<<< + * # p=[] + * # d=[] + */ + __Pyx_INCREF(__pyx_n_u_devicePositionV); + __pyx_v__METHOD = __pyx_n_u_devicePositionV; + + /* "PyCafe.pyx":1117 + * cdef vector[string] dev + * cdef vector[float] pos + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->devicePositionV(__pyx_v_collectionName, __pyx_v_dev, __pyx_v_pos); + + /* "PyCafe.pyx":1119 + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1120 + * + * if status != ICAFE_NORMAL: + * raise Exception("{} {} {} {} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__50, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":1122 + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) # <<<<<<<<<<<<<< + * + * # for i in range (0, dev.size()): + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_status_4, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_status_4, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_status_4); + __Pyx_GIVEREF(__pyx_kp_u_status_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_status_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_8, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_8, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1120 + * + * if status != ICAFE_NORMAL: + * raise Exception("{} {} {} {} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 1120, __pyx_L1_error) + + /* "PyCafe.pyx":1119 + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + */ + } + + /* "PyCafe.pyx":1127 + * # d.append(dev[i]) + * # p.append(pos[i]) + * return dev, pos # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_convert_vector_to_py_float(__pyx_v_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1111 + * return d, p + * + * def devicePositionV(self, const char * collectionName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "devicePositionV" + * # p=[] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1131 + * ############################################################################ + * + * def groupList(self): # <<<<<<<<<<<<<< + * cdef vector[string] gList + * # conservative guess + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99groupList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99groupList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_98groupList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_gList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("groupList", 0); + + /* "PyCafe.pyx":1134 + * cdef vector[string] gList + * # conservative guess + * gList.reserve(36) # <<<<<<<<<<<<<< + * + * self._c_cafe.groupList(gList) + */ + __pyx_v_gList.reserve(36); + + /* "PyCafe.pyx":1136 + * gList.reserve(36) + * + * self._c_cafe.groupList(gList) # <<<<<<<<<<<<<< + * + * # Place in list to avoid this warning: + */ + (void)(__pyx_v_self->_c_cafe->groupList(__pyx_v_gList)); + + /* "PyCafe.pyx":1143 + * # for i in range (0, len(gList)): + * # gl.append(gList[i]) + * return gList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_gList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1131 + * ############################################################################ + * + * def groupList(self): # <<<<<<<<<<<<<< + * cdef vector[string] gList + * # conservative guess + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.groupList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1146 + * ############################################################################ + * + * def getDataTypeNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101getDataTypeNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101getDataTypeNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeNative (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_100getDataTypeNative(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_100getDataTypeNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_ndt; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeNative", 0); + + /* "PyCafe.pyx":1147 + * + * def getDataTypeNative(self, handlePV): + * cdef str _METHOD = "getDataTypeNative" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeNative); + __pyx_v__METHOD = __pyx_n_u_getDataTypeNative; + + /* "PyCafe.pyx":1148 + * def getDataTypeNative(self, handlePV): + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1149 + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1150 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1150, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1149 + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1151 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1152 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1152, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1152, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1151 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1154 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1155 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1154 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1154, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1159 + * else if PV")) + * + * cdef long ndt = -1 # <<<<<<<<<<<<<< + * + * self.hh.getDataTypeNative(handle, ndt) + */ + __pyx_v_ndt = -1L; + + /* "PyCafe.pyx":1161 + * cdef long ndt = -1 + * + * self.hh.getDataTypeNative(handle, ndt) # <<<<<<<<<<<<<< + * return ndt + * + */ + (void)(__pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_ndt)); + + /* "PyCafe.pyx":1162 + * + * self.hh.getDataTypeNative(handle, ndt) + * return ndt # <<<<<<<<<<<<<< + * + * def getDataTypeRequest(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_ndt); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1146 + * ############################################################################ + * + * def getDataTypeNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeNative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1164 + * return ndt + * + * def getDataTypeRequest(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103getDataTypeRequest(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103getDataTypeRequest(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeRequest (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_102getDataTypeRequest(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_102getDataTypeRequest(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_rdt; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeRequest", 0); + + /* "PyCafe.pyx":1165 + * + * def getDataTypeRequest(self, handlePV): + * cdef str _METHOD = "getDataTypeRequest" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeRequest); + __pyx_v__METHOD = __pyx_n_u_getDataTypeRequest; + + /* "PyCafe.pyx":1166 + * def getDataTypeRequest(self, handlePV): + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1167 + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1168 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1168, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1167 + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1169 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1170 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1170, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1169 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1172 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle,\ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1173 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle,\ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_5}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_5}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_5); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_5); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_5); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1172 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle,\ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1172, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1177 + * else if PV")) + * + * cdef long rdt = -1 # <<<<<<<<<<<<<< + * self.hh.getDataTypeRequest(handle, rdt) + * return rdt + */ + __pyx_v_rdt = -1L; + + /* "PyCafe.pyx":1178 + * + * cdef long rdt = -1 + * self.hh.getDataTypeRequest(handle, rdt) # <<<<<<<<<<<<<< + * return rdt + * + */ + (void)(__pyx_v_self->hh.getDataTypeRequest(__pyx_v_handle, __pyx_v_rdt)); + + /* "PyCafe.pyx":1179 + * cdef long rdt = -1 + * self.hh.getDataTypeRequest(handle, rdt) + * return rdt # <<<<<<<<<<<<<< + * + * def getMonitorIDInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_rdt); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1164 + * return ndt + * + * def getDataTypeRequest(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeRequest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1181 + * return rdt + * + * def getMonitorIDInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_104getMonitorIDInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_104getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getMonitorIDInCallback", 0); + + /* "PyCafe.pyx":1182 + * + * def getMonitorIDInCallback(self, handlePV): + * cdef str _METHOD = "getMonitorIDInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getMonitorIDInCallback); + __pyx_v__METHOD = __pyx_n_u_getMonitorIDInCallback; + + /* "PyCafe.pyx":1183 + * def getMonitorIDInCallback(self, handlePV): + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1184 + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1185 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1185, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1184 + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1186 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1187 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1187, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1186 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1189 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1190 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1189 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1189, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1193 + * "First input argument, should be of type if handle, \ + * else if PV")) + * return self.hh.getUsrArgsAsUInt(handle) # <<<<<<<<<<<<<< + * + * def getDataTypeInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getUsrArgsAsUInt(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1181 + * return rdt + * + * def getMonitorIDInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorIDInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1195 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_106getDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_106getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeInCallback", 0); + + /* "PyCafe.pyx":1196 + * + * def getDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDataTypeInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeInCallback); + __pyx_v__METHOD = __pyx_n_u_getDataTypeInCallback; + + /* "PyCafe.pyx":1197 + * def getDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1198 + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1199 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1199, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1198 + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1200 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1201 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1201, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1200 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1203 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1204 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1203 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1203, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1207 + * "First input argument, should be of type if handle, \ + * else if PV")) + * return < long > self.hh.getDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrDataTypeInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDataTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1195 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1209 + * return < long > self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_108getDbrDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_108getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback", 0); + + /* "PyCafe.pyx":1210 + * + * def getDbrDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDbrDataTypeInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDbrDataTypeInCallback); + __pyx_v__METHOD = __pyx_n_u_getDbrDataTypeInCallback; + + /* "PyCafe.pyx":1211 + * def getDbrDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1212 + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1213 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1213, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1212 + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1214 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1215 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1215, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1214 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1217 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1218 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1217 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1217, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1221 + * ("First input argument, should be of type if handle," + + * "else if PV"))) + * return < long > self.hh.getDbrDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrBaseInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDbrDataTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1209 + * return < long > self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1223 + * return < long > self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrBaseInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_110getDbrBaseInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_110getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDbrBaseInCallback", 0); + + /* "PyCafe.pyx":1224 + * + * def getDbrBaseInCallback(self, handlePV): + * cdef str _METHOD = "getDbrBaseInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDbrBaseInCallback); + __pyx_v__METHOD = __pyx_n_u_getDbrBaseInCallback; + + /* "PyCafe.pyx":1225 + * def getDbrBaseInCallback(self, handlePV): + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1226 + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1227 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1227, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1226 + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1228 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1229 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1229, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1228 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1231 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1232 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1231 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1231, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1235 + * ("First input argument, should be of type if handle," + + * "else if PV"))) + * return < unsigned int > self.hh.getCafeDbrTypeCB(handle) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_self->hh.getCafeDbrTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1223 + * return < long > self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrBaseInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1238 + * + * ############################################################################ + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getHandlesFromWithinGroup" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getHandlesFromWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getHandlesFromWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandlesFromWithinGroup (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_112getHandlesFromWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_gHandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_112getHandlesFromWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_groupHandle; + std::vector __pyx_v_hList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + char const *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("getHandlesFromWithinGroup", 0); + + /* "PyCafe.pyx":1240 + * def getHandlesFromWithinGroup(self, gHandleName): + * + * cdef str _METHOD = "getHandlesFromWithinGroup" # <<<<<<<<<<<<<< + * + * cdef unsigned int groupHandle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getHandlesFromWithinGroup); + __pyx_v__METHOD = __pyx_n_u_getHandlesFromWithinGroup; + + /* "PyCafe.pyx":1242 + * cdef str _METHOD = "getHandlesFromWithinGroup" + * + * cdef unsigned int groupHandle = 0 # <<<<<<<<<<<<<< + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + */ + __pyx_v_groupHandle = 0; + + /* "PyCafe.pyx":1243 + * + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_gHandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_gHandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1244 + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName # <<<<<<<<<<<<<< + * elif isinstance(gHandleName, (str)): + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_gHandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1244, __pyx_L1_error) + __pyx_v_groupHandle = __pyx_t_4; + + /* "PyCafe.pyx":1243 + * + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1245 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_gHandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1246 + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_gHandleName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 1246, __pyx_L1_error) + __pyx_v_groupHandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_5); + + /* "PyCafe.pyx":1245 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1248 + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if group handle," + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1249 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if group handle," + * + "else if group name"))) + */ + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_7}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_7}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_7); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_7); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_7); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1248 + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if group handle," + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 1248, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1254 + * + * cdef vector[unsigned int] hList + * hList = self.hh.getHandlesFromWithinGroupV(groupHandle) # <<<<<<<<<<<<<< + * return hList + * ############################################################################ + */ + __pyx_v_hList = __pyx_v_self->hh.getHandlesFromWithinGroupV(__pyx_v_groupHandle); + + /* "PyCafe.pyx":1255 + * cdef vector[unsigned int] hList + * hList = self.hh.getHandlesFromWithinGroupV(groupHandle) + * return hList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_hList); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1238 + * + * ############################################################################ + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getHandlesFromWithinGroup" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandlesFromWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1260 + * ############################################################################ + * + * def close(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115close(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115close(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_114close(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_114close(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("close", 0); + + /* "PyCafe.pyx":1261 + * + * def close(self, handlePV): + * cdef str _METHOD = "close" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_close); + __pyx_v__METHOD = __pyx_n_u_close; + + /* "PyCafe.pyx":1262 + * def close(self, handlePV): + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1263 + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1264 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1264, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1263 + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1265 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1266 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1266, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1265 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1268 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1269 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1268 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1268, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1274 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.close(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1275 + * cdef int status + * with nogil: + * status = self._c_cafe.close(handle) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_v_status = __pyx_v_self->_c_cafe->close(__pyx_v_handle); + } + + /* "PyCafe.pyx":1274 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.close(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":1277 + * status = self._c_cafe.close(handle) + * + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1260 + * ############################################################################ + * + * def close(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1280 + * + * ############################################################################ + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_117closeChannels(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_117closeChannels(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeChannels (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_116closeChannels(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_116closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("closeChannels", 0); + + /* "PyCafe.pyx":1282 + * def closeChannels(self): + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeChannels() + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1283 + * cdef int status + * with nogil: + * status = self._c_cafe.closeChannels() # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->closeChannels(); + } + + /* "PyCafe.pyx":1282 + * def closeChannels(self): + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeChannels() + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1284 + * with nogil: + * status = self._c_cafe.closeChannels() + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1280 + * + * ############################################################################ + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.closeChannels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1287 + * + * ############################################################################ + * def closeHandles(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeHandles" + * if not handleList: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119closeHandles(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119closeHandles(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeHandles (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(3, 1287, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_118closeHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_118closeHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + __Pyx_RefNannySetupContext("closeHandles", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1288 + * ############################################################################ + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" # <<<<<<<<<<<<<< + * if not handleList: + * return ICAFE_NORMAL + */ + __Pyx_INCREF(__pyx_n_u_closeHandles); + __pyx_v__METHOD = __pyx_n_u_closeHandles; + + /* "PyCafe.pyx":1289 + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" + * if not handleList: # <<<<<<<<<<<<<< + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + */ + __pyx_t_1 = (__pyx_v_handleList != Py_None)&&(PyList_GET_SIZE(__pyx_v_handleList) != 0); + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1290 + * cdef str _METHOD = "closeHandles" + * if not handleList: + * return ICAFE_NORMAL # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1289 + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" + * if not handleList: # <<<<<<<<<<<<<< + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + */ + } + + /* "PyCafe.pyx":1291 + * if not handleList: + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1291, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1292 + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_4.__pyx_n = 1; + __pyx_t_4.force = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, __pyx_v_handleList, 0, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 1292, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":1291 + * if not handleList: + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1293 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1293, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_1 = __pyx_t_5; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1294 + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be a 'list' of of type \ + * if handles or if PVs")) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1294, __pyx_L1_error) + + /* "PyCafe.pyx":1293 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":1300 + * # Do this only to avoid compiler warnings + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * cdef int status + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1300, __pyx_L1_error) + } + __pyx_t_10 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1300, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":1301 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1301, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1301, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1303 + * v.push_back(handleList[i]) + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeHandlesV(v) + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1304 + * cdef int status + * with nogil: + * status = self._c_cafe.closeHandlesV(v) # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->closeHandlesV(__pyx_v_v); + } + + /* "PyCafe.pyx":1303 + * v.push_back(handleList[i]) + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeHandlesV(v) + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":1305 + * with nogil: + * status = self._c_cafe.closeHandlesV(v) + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1287 + * + * ############################################################################ + * def closeHandles(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeHandles" + * if not handleList: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.closeHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1309 + * ############################################################################ + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" + * cdef vector[unsigned int] hList + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121closeDisconnectedChannelsWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121closeDisconnectedChannelsWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeDisconnectedChannelsWithinGroup (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_120closeDisconnectedChannelsWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_120closeDisconnectedChannelsWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + __Pyx_RefNannySetupContext("closeDisconnectedChannelsWithinGroup", 0); + + /* "PyCafe.pyx":1310 + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" # <<<<<<<<<<<<<< + * cdef vector[unsigned int] hList + * cdef vector[unsigned int] disHandles + */ + __Pyx_INCREF(__pyx_n_u_closeDisconnectedChannelsWithinG); + __pyx_v__METHOD = __pyx_n_u_closeDisconnectedChannelsWithinG; + + /* "PyCafe.pyx":1314 + * cdef vector[unsigned int] disHandles + * + * if isinstance(ghandleName, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1315 + * + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): # <<<<<<<<<<<<<< + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_ghandleName); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1315, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1316 + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1317 + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) # <<<<<<<<<<<<<< + * elif isinstance(ghandleName[i], (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1317, __pyx_L1_error) + } + + /* "PyCafe.pyx":1316 + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1318 + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1319 + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!(likely(PyUnicode_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(3, 1319, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_t_6), 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1319, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1319, __pyx_L1_error) + } + + /* "PyCafe.pyx":1318 + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1321 + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1322 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_10 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1321 + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1321, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":1314 + * cdef vector[unsigned int] disHandles + * + * if isinstance(ghandleName, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1326 + * if group handle, else if group name")) + * + * elif isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1327 + * + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1327, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1327, __pyx_L1_error) + } + + /* "PyCafe.pyx":1326 + * if group handle, else if group name")) + * + * elif isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1328 + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1329 + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 1329, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1329, __pyx_L1_error) + } + + /* "PyCafe.pyx":1328 + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1331 + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":1332 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument (if not list), should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_12) { + __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_if_not_list); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_if_not_list); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_kp_u_First_input_argument_if_not_list); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1331 + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 1331, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1336 + * if group handle, else if group name")) + * + * for i in range(0, len(hList)): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + */ + __pyx_t_9 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_hList); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1337 + * + * for i in range(0, len(hList)): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1338 + * for i in range(0, len(hList)): + * with nogil: + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( # <<<<<<<<<<<<<< + * hList[i]) + * return + */ + (void)(__pyx_v_self->_c_cafe->closeDisconnectedChannelsFromWithinGroupV((__pyx_v_hList[__pyx_v_i]))); + } + + /* "PyCafe.pyx":1337 + * + * for i in range(0, len(hList)): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + } + + /* "PyCafe.pyx":1340 + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1309 + * ############################################################################ + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" + * cdef vector[unsigned int] hList + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("PyCafe.CyCafe.closeDisconnectedChannelsWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1343 + * + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeChannelKeepHandle" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123closeChannelKeepHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123closeChannelKeepHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeChannelKeepHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_122closeChannelKeepHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_122closeChannelKeepHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + int __pyx_v_statusClose; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + __Pyx_RefNannySetupContext("closeChannelKeepHandle", 0); + + /* "PyCafe.pyx":1344 + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): + * cdef str _METHOD = "closeChannelKeepHandle" # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hList + */ + __Pyx_INCREF(__pyx_n_u_closeChannelKeepHandle); + __pyx_v__METHOD = __pyx_n_u_closeChannelKeepHandle; + + /* "PyCafe.pyx":1349 + * cdef int statusClose + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1350 + * + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): # <<<<<<<<<<<<<< + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1350, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1351 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1352 + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.checkForHandle(handlePV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1352, __pyx_L1_error) + } + + /* "PyCafe.pyx":1351 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1353 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1354 + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.checkForHandle(handlePV[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!(likely(PyUnicode_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(3, 1354, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_t_6), 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1354, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1354, __pyx_L1_error) + } + + /* "PyCafe.pyx":1353 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1356 + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1357 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_10 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1356 + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1356, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":1349 + * cdef int statusClose + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1361 + * if group handle, else if group name")) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1362 + * + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * hList.push_back(self.checkForHandle(handlePV)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1362, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1362, __pyx_L1_error) + } + + /* "PyCafe.pyx":1361 + * if group handle, else if group name")) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1363 + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1364 + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + * hList.push_back(self.checkForHandle(handlePV)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1364, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1364, __pyx_L1_error) + } + + /* "PyCafe.pyx":1363 + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1366 + * hList.push_back(self.checkForHandle(handlePV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":1367 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument (if not list), should be of type \ + * if handle, else if PV")) + */ + __pyx_t_12 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list_2}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list_2}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_12) { + __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_if_not_list_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_if_not_list_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_kp_u_First_input_argument_if_not_list_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1366 + * hList.push_back(self.checkForHandle(handlePV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 1366, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1371 + * if handle, else if PV")) + * + * with nogil: # <<<<<<<<<<<<<< + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1372 + * + * with nogil: + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) # <<<<<<<<<<<<<< + * return statusClose + * + */ + __pyx_v_statusClose = __pyx_v_self->_c_cafe->closeChannelsKeepHandles(__pyx_v_hList); + } + + /* "PyCafe.pyx":1371 + * if handle, else if PV")) + * + * with nogil: # <<<<<<<<<<<<<< + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":1373 + * with nogil: + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose # <<<<<<<<<<<<<< + * + * #def reconnect(self, vector[unsigned int] handleList): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_statusClose); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1343 + * + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeChannelKeepHandle" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("PyCafe.CyCafe.closeChannelKeepHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1376 + * + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): # <<<<<<<<<<<<<< + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125reconnect(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125reconnect(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reconnect (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(3, 1376, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_124reconnect(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_124reconnect(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + int __pyx_v_status1; + int __pyx_v_status2; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + __Pyx_RefNannySetupContext("reconnect", 0); + + /* "PyCafe.pyx":1377 + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): + * cdef int status1 = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef int status2 = ICAFE_NORMAL + * cdef vector[unsigned int] v + */ + __pyx_v_status1 = ICAFE_NORMAL; + + /* "PyCafe.pyx":1378 + * def reconnect(self, list handleList): + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) + */ + __pyx_v_status2 = ICAFE_NORMAL; + + /* "PyCafe.pyx":1380 + * cdef int status2 = ICAFE_NORMAL + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1380, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1380, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_1); + + /* "PyCafe.pyx":1381 + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * #print("Channels Closing...") + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1381, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1381, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":1382 + * v.reserve(len(handleList)) + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * #print("Channels Closing...") + * self.openMonitorPrepare() + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1382, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1382, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1382, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1384 + * v.push_back(handleList[i]) + * #print("Channels Closing...") + * self.openMonitorPrepare() # <<<<<<<<<<<<<< + * + * for i in range (0, len(handleList)): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openMonitorPrepare); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1386 + * self.openMonitorPrepare() + * + * for i in range (0, len(handleList)): # <<<<<<<<<<<<<< + * self.monitorStop(handleList[i]) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1386, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1386, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":1387 + * + * for i in range (0, len(handleList)): + * self.monitorStop(handleList[i]) # <<<<<<<<<<<<<< + * + * self.openMonitorNow() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_monitorStop); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1387, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":1389 + * self.monitorStop(handleList[i]) + * + * self.openMonitorNow() # <<<<<<<<<<<<<< + * time.sleep(0.05) + * #with nogil: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openMonitorNow); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1390 + * + * self.openMonitorNow() + * time.sleep(0.05) # <<<<<<<<<<<<<< + * #with nogil: + * # status= self._c_cafe.reconnect(handleList) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1394 + * # status= self._c_cafe.reconnect(handleList) + * #print("Channels Closing...") + * with nogil: # <<<<<<<<<<<<<< + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1395 + * #print("Channels Closing...") + * with nogil: + * status1 = self._c_cafe.closeChannelsKeepHandles(v) # <<<<<<<<<<<<<< + * time.sleep(0.05) + * #print("Channels Closed") + */ + __pyx_v_status1 = __pyx_v_self->_c_cafe->closeChannelsKeepHandles(__pyx_v_v); + } + + /* "PyCafe.pyx":1394 + * # status= self._c_cafe.reconnect(handleList) + * #print("Channels Closing...") + * with nogil: # <<<<<<<<<<<<<< + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L9; + } + __pyx_L9:; + } + } + + /* "PyCafe.pyx":1396 + * with nogil: + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) # <<<<<<<<<<<<<< + * #print("Channels Closed") + * self.openPrepare() + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1398 + * time.sleep(0.05) + * #print("Channels Closed") + * self.openPrepare() # <<<<<<<<<<<<<< + * with nogil: + * status2 = self._c_cafe.openChannelsWithHandles(v) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openPrepare); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1399 + * #print("Channels Closed") + * self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * status2 = self._c_cafe.openChannelsWithHandles(v) + * #print("Channels Opened") + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1400 + * self.openPrepare() + * with nogil: + * status2 = self._c_cafe.openChannelsWithHandles(v) # <<<<<<<<<<<<<< + * #print("Channels Opened") + * + */ + __pyx_v_status2 = __pyx_v_self->_c_cafe->openChannelsWithHandles(__pyx_v_v); + } + + /* "PyCafe.pyx":1399 + * #print("Channels Closed") + * self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * status2 = self._c_cafe.openChannelsWithHandles(v) + * #print("Channels Opened") + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":1403 + * #print("Channels Opened") + * + * self.openNowAndWait(self._c_cafe.channelOpenPolicy.getTimeout(), v) # <<<<<<<<<<<<<< + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNowAndWait); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.getTimeout()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_v); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1405 + * self.openNowAndWait(self._c_cafe.channelOpenPolicy.getTimeout(), v) + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) # <<<<<<<<<<<<<< + * return max(status1, status2) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1406 + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) + * return max(status1, status2) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_v_status2; + __pyx_t_12 = __pyx_v_status1; + if (((__pyx_t_10 > __pyx_t_12) != 0)) { + __pyx_t_13 = __pyx_t_10; + } else { + __pyx_t_13 = __pyx_t_12; + } + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1376 + * + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): # <<<<<<<<<<<<<< + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1410 + * ############################################################################ + * + * def allConnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.allChannelsConnected() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127allConnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127allConnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("allConnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_126allConnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_126allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("allConnected", 0); + + /* "PyCafe.pyx":1411 + * + * def allConnected(self): + * return self._c_cafe.allChannelsConnected() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_cafe->allChannelsConnected() != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1410 + * ############################################################################ + * + * def allConnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.allChannelsConnected() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.allConnected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1416 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129isConnected(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129isConnected(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isConnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_128isConnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_128isConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("isConnected", 0); + + /* "PyCafe.pyx":1417 + * @verify_handlepv + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" # <<<<<<<<<<<<<< + * return self._c_cafe.isChannelConnected(handlePV) + * + */ + __Pyx_INCREF(__pyx_n_u_isConnected); + __pyx_v__METHOD = __pyx_n_u_isConnected; + + /* "PyCafe.pyx":1418 + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1418, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_t_1) != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1416 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.isConnected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1421 + * + * ############################################################################ + * def supplementHandles(self, handleList=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131supplementHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131supplementHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandles (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "supplementHandles") < 0)) __PYX_ERR(3, 1421, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("supplementHandles", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1421, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_130supplementHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_130supplementHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("supplementHandles", 0); + + /* "PyCafe.pyx":1422 + * ############################################################################ + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" # <<<<<<<<<<<<<< + * if handleList is None: + * with nogil: + */ + __Pyx_INCREF(__pyx_n_u_supplementHandles); + __pyx_v__METHOD = __pyx_n_u_supplementHandles; + + /* "PyCafe.pyx":1423 + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" + * if handleList is None: # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandles() + */ + __pyx_t_1 = (__pyx_v_handleList == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1424 + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1425 + * if handleList is None: + * with nogil: + * self._c_cafe.supplementHandles() # <<<<<<<<<<<<<< + * elif isinstance(handleList, (list)): + * #Convert to vector + */ + (void)(__pyx_v_self->_c_cafe->supplementHandles()); + } + + /* "PyCafe.pyx":1424 + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":1423 + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" + * if handleList is None: # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandles() + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1426 + * with nogil: + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * #Convert to vector + * self.supplementHandlesV(handleList) + */ + __pyx_t_2 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1428 + * elif isinstance(handleList, (list)): + * #Convert to vector + * self.supplementHandlesV(handleList) # <<<<<<<<<<<<<< + * elif isinstance(handleList, (int, long, str)): + * self.supplementHandle(handleList) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_supplementHandlesV); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1426 + * with nogil: + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * #Convert to vector + * self.supplementHandlesV(handleList) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1429 + * #Convert to vector + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): # <<<<<<<<<<<<<< + * self.supplementHandle(handleList) + * else: + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handleList); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_6 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_6 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":1430 + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): + * self.supplementHandle(handleList) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_supplementHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1429 + * #Convert to vector + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): # <<<<<<<<<<<<<< + * self.supplementHandle(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1432 + * self.supplementHandle(handleList) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, if given, should be if list of \ + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":1433 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, if given, should be if list of \ + * handles or PVs, else of type if handle or if \ + */ + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_if_given_should_b}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_if_given_should_b}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_if_given_should_b); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_if_given_should_b); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_Input_argument_if_given_should_b); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1432 + * self.supplementHandle(handleList) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, if given, should be if list of \ + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 1432, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1421 + * + * ############################################################################ + * def supplementHandles(self, handleList=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1440 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133supplementHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133supplementHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_132supplementHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_132supplementHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("supplementHandle", 0); + + /* "PyCafe.pyx":1442 + * def supplementHandle(self, handlePV): + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1442, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1443 + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1444 + * cdef unsigned int handle = handlePV + * with nogil: + * self._c_cafe.supplementHandle(handle) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->supplementHandle(__pyx_v_handle)); + } + + /* "PyCafe.pyx":1443 + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1440 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1448 + * ############################################################################ + * + * def supplementHandlesV(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135supplementHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135supplementHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandlesV (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_134supplementHandlesV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134supplementHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_hl = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + __Pyx_RefNannySetupContext("supplementHandlesV", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1449 + * + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" # <<<<<<<<<<<<<< + * if isinstance(handleList, (str, int, long)): + * hl = [] + */ + __Pyx_INCREF(__pyx_n_u_supplementHandlesV); + __pyx_v__METHOD = __pyx_n_u_supplementHandlesV; + + /* "PyCafe.pyx":1450 + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1451 + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + * hl = [] # <<<<<<<<<<<<<< + * hl.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_hl = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1452 + * if isinstance(handleList, (str, int, long)): + * hl = [] + * hl.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = hl + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_hl, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 1452, __pyx_L1_error) + + /* "PyCafe.pyx":1454 + * hl.append(handleList) + * #handleList = [] + * handleList = hl # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + */ + __Pyx_INCREF(__pyx_v_hl); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_hl); + + /* "PyCafe.pyx":1450 + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + } + + /* "PyCafe.pyx":1455 + * #handleList = [] + * handleList = hl + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1456 + * handleList = hl + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 1456, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1455 + * #handleList = [] + * handleList = hl + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":1457 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1458 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1459 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1458 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 1458, __pyx_L1_error) + + /* "PyCafe.pyx":1457 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":1463 + * if handles, else if PVs")) + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1463, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":1464 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1464, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1466 + * v.push_back(handleList[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandlesV(v) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1467 + * + * with nogil: + * self._c_cafe.supplementHandlesV(v) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->supplementHandlesV(__pyx_v_v)); + } + + /* "PyCafe.pyx":1466 + * v.push_back(handleList[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandlesV(v) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":1448 + * ############################################################################ + * + * def supplementHandlesV(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandlesV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_hl); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1471 + * ############################################################################ + * + * def printDisconnected(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137printDisconnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137printDisconnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_136printDisconnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_136printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnected", 0); + + /* "PyCafe.pyx":1472 + * + * def printDisconnected(self): + * self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * def printDisconnectedHandles(self): + */ + (void)(__pyx_v_self->_c_cafe->printDisconnectedHandles()); + + /* "PyCafe.pyx":1471 + * ############################################################################ + * + * def printDisconnected(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1474 + * self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139printDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139printDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnectedHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_138printDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_138printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnectedHandles", 0); + + /* "PyCafe.pyx":1475 + * + * def printDisconnectedHandles(self): + * self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->printDisconnectedHandles()); + + /* "PyCafe.pyx":1474 + * self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1478 + * + * ############################################################################ + * def printHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141printHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141printHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_140printHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_140printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandles", 0); + + /* "PyCafe.pyx":1479 + * ############################################################################ + * def printHandles(self): + * self._c_cafe.printHandles() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->printHandles()); + + /* "PyCafe.pyx":1478 + * + * ############################################################################ + * def printHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1483 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143printHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143printHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_142printHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_142printHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("printHandle", 0); + + /* "PyCafe.pyx":1484 + * @verify_handlepv + * def printHandle(self, handlePV): + * self._c_cafe.printHandle(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1484, __pyx_L1_error) + (void)(__pyx_v_self->_c_cafe->printHandle(__pyx_t_1)); + + /* "PyCafe.pyx":1483 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.printHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1489 + * + * ############################################################################ + * def printHandlesV(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandlesV (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(3, 1489, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_144printHandlesV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_144printHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + unsigned int __pyx_t_12; + __Pyx_RefNannySetupContext("printHandlesV", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1490 + * ############################################################################ + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + */ + __Pyx_INCREF(__pyx_n_u_printHandlesV); + __pyx_v__METHOD = __pyx_n_u_printHandlesV; + + /* "PyCafe.pyx":1491 + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1491, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1492 + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, __pyx_v_handleList, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(3, 1492, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1491 + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1493 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1493, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_Check(__pyx_t_1); + __pyx_t_4 = (__pyx_t_2 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_t_1); + __pyx_t_2 = (__pyx_t_4 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1494 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":1495 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_input_argument_should_be_a_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1494 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 1494, __pyx_L1_error) + + /* "PyCafe.pyx":1493 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":1501 + * # Do this only to avoid compiler warnings + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1501, __pyx_L1_error) + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1501, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":1502 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * self.hh.printHandlesV(v) + * return + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1502, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1502, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + try { + __pyx_v_v.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 1502, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1503 + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + (void)(__pyx_v_self->hh.printHandlesV(__pyx_v_v)); + + /* "PyCafe.pyx":1504 + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1489 + * + * ############################################################################ + * def printHandlesV(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.printHandlesV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1508 + * + * ############################################################################ + * def getDisconnectedHandles(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147getDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147getDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDisconnectedHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_146getDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_146getDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("getDisconnectedHandles", 0); + + /* "PyCafe.pyx":1511 + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + * self.hh.getDisconnectedHandles(dhV, pvV) # <<<<<<<<<<<<<< + * return dhV, pvV + * ############################################################################ + */ + (void)(__pyx_v_self->hh.getDisconnectedHandles(__pyx_v_dhV, __pyx_v_pvV)); + + /* "PyCafe.pyx":1512 + * cdef vector[string] pvV + * self.hh.getDisconnectedHandles(dhV, pvV) + * return dhV, pvV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1508 + * + * ############################################################################ + * def getDisconnectedHandles(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.getDisconnectedHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1517 + * ############################################################################ + * + * def getHandles(self, asDict=False): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149getHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149getHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_asDict = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandles (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asDict,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asDict); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandles") < 0)) __PYX_ERR(3, 1517, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_asDict = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getHandles", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1517, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_148getHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_asDict); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_148getHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_asDict) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getHandles", 0); + + /* "PyCafe.pyx":1520 + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) # <<<<<<<<<<<<<< + * if asDict: + * return dict(zip(dhV, pvV)) + */ + (void)(__pyx_v_self->hh.getHandles(__pyx_v_dhV, __pyx_v_pvV)); + + /* "PyCafe.pyx":1521 + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) + * if asDict: # <<<<<<<<<<<<<< + * return dict(zip(dhV, pvV)) + * else: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_asDict); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 1521, __pyx_L1_error) + if (__pyx_t_1) { + + /* "PyCafe.pyx":1522 + * self.hh.getHandles(dhV, pvV) + * if asDict: + * return dict(zip(dhV, pvV)) # <<<<<<<<<<<<<< + * else: + * return dhV, pvV + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1521 + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) + * if asDict: # <<<<<<<<<<<<<< + * return dict(zip(dhV, pvV)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1524 + * return dict(zip(dhV, pvV)) + * else: + * return dhV, pvV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1517 + * ############################################################################ + * + * def getHandles(self, asDict=False): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1529 + * ############################################################################ + * + * def getHandleStates(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getHandleStates(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getHandleStates(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleStates (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_150getHandleStates(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_150getHandleStates(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + std::vector __pyx_v_stateV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getHandleStates", 0); + + /* "PyCafe.pyx":1533 + * cdef vector[string] pvV + * cdef vector[unsigned short] stateV + * self.hh.getHandleStates(dhV, pvV, stateV) # <<<<<<<<<<<<<< + * return dhV, pvV, stateV + * ############################################################################ + */ + (void)(__pyx_v_self->hh.getHandleStates(__pyx_v_dhV, __pyx_v_pvV, __pyx_v_stateV)); + + /* "PyCafe.pyx":1534 + * cdef vector[unsigned short] stateV + * self.hh.getHandleStates(dhV, pvV, stateV) + * return dhV, pvV, stateV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_vector_to_py_unsigned_short(__pyx_v_stateV); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1529 + * ############################################################################ + * + * def getHandleStates(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleStates", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1538 + * + * ############################################################################ + * def getStatusSeverity(self, int statusCode): # <<<<<<<<<<<<<< + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusSeverity (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1538, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_152getStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_152getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusSeverity", 0); + + /* "PyCafe.pyx":1539 + * ############################################################################ + * def getStatusSeverity(self, int statusCode): + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->_c_cafe->getCafeStatusSeverity().message(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1538 + * + * ############################################################################ + * def getStatusSeverity(self, int statusCode): # <<<<<<<<<<<<<< + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1542 + * + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusCodeAsText (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1542, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsText", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_154getStatusCodeAsText(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_154getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusCodeAsText", 0); + + /* "PyCafe.pyx":1543 + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): + * return self.cs.code(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1542 + * + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsText", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1546 + * + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getStatusCodeAsString(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getStatusCodeAsString(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusCodeAsString (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1546, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_156getStatusCodeAsString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_156getStatusCodeAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusCodeAsString", 0); + + /* "PyCafe.pyx":1547 + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): + * return self.cs.code(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1546 + * + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1550 + * + * ############################################################################ + * def getStatusInfo(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.info(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusInfo (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1550, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_158getStatusInfo(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_158getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusInfo", 0); + + /* "PyCafe.pyx":1551 + * ############################################################################ + * def getStatusInfo(self, int statusCode): + * return self.cs.info(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1550 + * + * ############################################################################ + * def getStatusInfo(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.info(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1554 + * + * ############################################################################ + * def getStatusMsg(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusMsg (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1554, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_160getStatusMsg(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_160getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusMsg", 0); + + /* "PyCafe.pyx":1555 + * ############################################################################ + * def getStatusMsg(self, int statusCode): + * return self.cs.message(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.message(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1554 + * + * ############################################################################ + * def getStatusMsg(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.message(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1559 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getStatus(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getStatus(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatus (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_162getStatus(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_162getStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getStatus", 0); + + /* "PyCafe.pyx":1560 + * @verify_handlepv + * def getStatus(self, handlePV): + * return self.hh.getStatus(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1560, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1559 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1563 + * + * ############################################################################ + * def getChannelDevice(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getChannelDevice(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getChannelDevice(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelDevice (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_164getChannelDevice(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_164getChannelDevice(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_valString; + unsigned int __pyx_v_handle; + PyObject *__pyx_v_delSplit = NULL; + CYTHON_UNUSED int __pyx_v_statusLocal; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::string __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + __Pyx_RefNannySetupContext("getChannelDevice", 0); + + /* "PyCafe.pyx":1564 + * ############################################################################ + * def getChannelDevice(self, handlePV): + * cdef str _METHOD = "getChannelDevice" # <<<<<<<<<<<<<< + * cdef string valString = str("") + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getChannelDevice); + __pyx_v__METHOD = __pyx_n_u_getChannelDevice; + + /* "PyCafe.pyx":1565 + * def getChannelDevice(self, handlePV): + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1565, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1566 + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1567 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_4 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1568 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) + */ + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1568, __pyx_L1_error) + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1567 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1569 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + __pyx_t_4 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1570 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1570, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.force = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1569 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1572 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":1573 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":1572 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(3, 1572, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1576 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1577 + * else if PV")) + * if handle == 0: + * valString = str("") # <<<<<<<<<<<<<< + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1577, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1578 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1579 + * valString = str("") + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") # <<<<<<<<<<<<<< + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handlePV, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_kp_u__51) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u__51); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_delSplit = __pyx_t_8; + __pyx_t_8 = 0; + + /* "PyCafe.pyx":1580 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + __pyx_t_12 = PyObject_Length(__pyx_v_delSplit); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1580, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_12 > 1) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1581 + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) # <<<<<<<<<<<<<< + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_delSplit, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1581, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1580 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + } + + /* "PyCafe.pyx":1578 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + } + + /* "PyCafe.pyx":1576 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1583 + * valString = str(delSplit[0]) + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + /*else*/ { + __pyx_v_statusLocal = __pyx_v_self->hh.getChannelDevice(__pyx_v_handle, __pyx_v_valString); + } + __pyx_L6:; + + /* "PyCafe.pyx":1584 + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1563 + * + * ############################################################################ + * def getChannelDevice(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_delSplit); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1587 + * + * ############################################################################ + * def getChannelAttribute(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getChannelAttribute(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getChannelAttribute(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelAttribute (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_166getChannelAttribute(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_166getChannelAttribute(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_valString; + unsigned int __pyx_v_handle; + PyObject *__pyx_v_delSplit = NULL; + CYTHON_UNUSED int __pyx_v_statusLocal; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::string __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + __Pyx_RefNannySetupContext("getChannelAttribute", 0); + + /* "PyCafe.pyx":1588 + * ############################################################################ + * def getChannelAttribute(self, handlePV): + * cdef str _METHOD = "getChannelAttribute" # <<<<<<<<<<<<<< + * cdef string valString = str("") + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getChannelAttribute); + __pyx_v__METHOD = __pyx_n_u_getChannelAttribute; + + /* "PyCafe.pyx":1589 + * def getChannelAttribute(self, handlePV): + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1589, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1590 + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1591 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_4 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1592 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) + */ + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1592, __pyx_L1_error) + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1591 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1593 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + __pyx_t_4 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1594 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1594, __pyx_L1_error) + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.force = 0; + __pyx_t_1 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1594, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1593 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1596 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":1597 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":1596 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(3, 1596, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1600 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1601 + * else if PV")) + * if handle == 0: + * valString = str("") # <<<<<<<<<<<<<< + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1602 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1603 + * valString = str("") + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") # <<<<<<<<<<<<<< + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handlePV, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_kp_u__51) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u__51); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_delSplit = __pyx_t_8; + __pyx_t_8 = 0; + + /* "PyCafe.pyx":1604 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + __pyx_t_12 = PyObject_Length(__pyx_v_delSplit); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1604, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_12 > 1) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1605 + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) # <<<<<<<<<<<<<< + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_delSplit, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1604 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + } + + /* "PyCafe.pyx":1602 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + } + + /* "PyCafe.pyx":1600 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1607 + * valString = str(delSplit[0]) + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + /*else*/ { + __pyx_v_statusLocal = __pyx_v_self->hh.getChannelAttribute(__pyx_v_handle, __pyx_v_valString); + } + __pyx_L6:; + + /* "PyCafe.pyx":1608 + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1587 + * + * ############################################################################ + * def getChannelAttribute(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_delSplit); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1613 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDescription (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_168getDescription(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_168getDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + std::string __pyx_v_valString; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("getDescription", 0); + + /* "PyCafe.pyx":1614 + * @verify_handlepv + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * if not self.hh.hasDescription(handle): + * with nogil: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1614, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1615 + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + __pyx_t_2 = ((!(__pyx_v_self->hh.hasDescription(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1616 + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * cdef string valString + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1617 + * if not self.hh.hasDescription(handle): + * with nogil: + * self._c_cafe.supplementHandle(handle) # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getDescription(handle, valString) + */ + (void)(__pyx_v_self->_c_cafe->supplementHandle(__pyx_v_handle)); + } + + /* "PyCafe.pyx":1616 + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * cdef string valString + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":1615 + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + } + + /* "PyCafe.pyx":1619 + * self._c_cafe.supplementHandle(handle) + * cdef string valString + * self.hh.getDescription(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + (void)(__pyx_v_self->hh.getDescription(__pyx_v_handle, __pyx_v_valString)); + + /* "PyCafe.pyx":1620 + * cdef string valString + * self.hh.getDescription(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1613 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.getDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1624 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171hasDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171hasDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("hasDescription (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_170hasDescription(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_170hasDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("hasDescription", 0); + + /* "PyCafe.pyx":1625 + * @verify_handlepv + * def hasDescription(self, handlePV): + * return self.hh.hasDescription(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1625, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->hh.hasDescription(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1624 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.hasDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1629 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getUnits(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getUnits(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getUnits (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_172getUnits(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_172getUnits(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + std::string __pyx_v_valString; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getUnits", 0); + + /* "PyCafe.pyx":1631 + * def getUnits(self, handlePV): + * cdef string valString + * self.hh.getUnits(handlePV, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1631, __pyx_L1_error) + (void)(__pyx_v_self->hh.getUnits(__pyx_t_1, __pyx_v_valString)); + + /* "PyCafe.pyx":1632 + * cdef string valString + * self.hh.getUnits(handlePV, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1629 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getUnits", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1636 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175getPrecision(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175getPrecision(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPrecision (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_174getPrecision(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_174getPrecision(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + short __pyx_v_precision; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getPrecision", 0); + + /* "PyCafe.pyx":1637 + * @verify_handlepv + * def getPrecision(self, handlePV): + * cdef short precision = 0 # <<<<<<<<<<<<<< + * self.hh.getPrecision(handlePV, precision) + * return precision + */ + __pyx_v_precision = 0; + + /* "PyCafe.pyx":1638 + * def getPrecision(self, handlePV): + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) # <<<<<<<<<<<<<< + * return precision + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1638, __pyx_L1_error) + (void)(__pyx_v_self->hh.getPrecision(__pyx_t_1, __pyx_v_precision)); + + /* "PyCafe.pyx":1639 + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + * return precision # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1636 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getPrecision", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177hasAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177hasAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("hasAlarmStatusSeverity (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_176hasAlarmStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_176hasAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("hasAlarmStatusSeverity", 0); + + /* "PyCafe.pyx":1644 + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): + * return self.hh.hasAlarmStatusSeverity(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1644, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->hh.hasAlarmStatusSeverity(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.hasAlarmStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1648 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getAlarmStatusSeverity (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_178getAlarmStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_178getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + short __pyx_v_aStatSev[2]; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getAlarmStatusSeverity", 0); + + /* "PyCafe.pyx":1650 + * def getAlarmStatusSeverity(self, handlePV): + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) # <<<<<<<<<<<<<< + * return aStatSev[0], aStatSev[1] + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1650, __pyx_L1_error) + (void)(__pyx_v_self->hh.getAlarmStatusSeverity(__pyx_t_1, __pyx_v_aStatSev)); + + /* "PyCafe.pyx":1651 + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + * return aStatSev[0], aStatSev[1] # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1648 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getAlarmStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181getTimeStamp(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181getTimeStamp(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeStamp (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_180getTimeStamp(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_180getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ll = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("getTimeStamp", 0); + + /* "PyCafe.pyx":1658 + * + * cdef HandleHelper hh + * hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV) # <<<<<<<<<<<<<< + * + * cpdef ll = [] + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1658, __pyx_L1_error) + __pyx_v_hh._etsNorm = __pyx_v_self->hh.getEpicsTimeStampAsUInt32(__pyx_t_1); + + /* "PyCafe.pyx":1660 + * hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV) + * + * cpdef ll = [] # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_ll = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafe.pyx":1661 + * + * cpdef ll = [] + * ll.append(hh._etsNorm.secPastEpoch) # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.nsec) + * + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1661, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1662 + * cpdef ll = [] + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) # <<<<<<<<<<<<<< + * + * return ll + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.nsec); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1662, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1664 + * ll.append(hh._etsNorm.nsec) + * + * return ll # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1668 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getTimeStampAsDate(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getTimeStampAsDate(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeStampAsDate (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_182getTimeStampAsDate(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_182getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ld = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("getTimeStampAsDate", 0); + + /* "PyCafe.pyx":1671 + * + * cdef HandleHelper hh + * cpdef ld = [] # <<<<<<<<<<<<<< + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ld = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1673 + * cpdef ld = [] + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) + */ + __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1673, __pyx_L1_error) + __pyx_v_hh._etsDate = __pyx_v_self->hh.getEpicsTimeStampAsDate(__pyx_t_2); + + /* "PyCafe.pyx":1674 + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + * ld.append(hh._etsDate.year) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.year); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1674, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1675 + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.mon); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1676 + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.day); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1677 + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1678 + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.sec) + * ld.append(hh._etsDate.nsec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.min); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1679 + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.nsec) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1679, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1680 + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) + * ld.append(hh._etsDate.nsec) # <<<<<<<<<<<<<< + * + * return ld + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_hh._etsDate.nsec); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1680, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1682 + * ld.append(hh._etsDate.nsec) + * + * return ld # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ld); + __pyx_r = __pyx_v_ld; + goto __pyx_L0; + + /* "PyCafe.pyx":1668 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeStampAsDate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1686 + * ############################################################################ + * ### Allow user to choose whether or not to open ##### + * cpdef checkForHandle(self, str pv, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + */ + +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle *__pyx_optional_args) { + int __pyx_v_force = ((int)1); + unsigned int __pyx_v__handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + char const *__pyx_t_8; + int __pyx_t_9; + __Pyx_RefNannySetupContext("checkForHandle", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_force = __pyx_optional_args->force; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6PyCafe_6CyCafe_185checkForHandle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pv, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pv, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_pv); + __Pyx_GIVEREF(__pyx_v_pv); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_pv); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + } + #endif + } + + /* "PyCafe.pyx":1687 + * ### Allow user to choose whether or not to open ##### + * cpdef checkForHandle(self, str pv, bint force=True): + * cdef unsigned int _handle = 0 # <<<<<<<<<<<<<< + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + */ + __pyx_v__handle = 0; + + /* "PyCafe.pyx":1688 + * cpdef checkForHandle(self, str pv, bint force=True): + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) # <<<<<<<<<<<<<< + * if _handle == 0: + * if (force): + */ + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_pv); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1688, __pyx_L1_error) + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_8); + + /* "PyCafe.pyx":1689 + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.open(pv) + */ + __pyx_t_9 = ((__pyx_v__handle == 0) != 0); + if (__pyx_t_9) { + + /* "PyCafe.pyx":1690 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.open(pv) + * else: + */ + __pyx_t_9 = (__pyx_v_force != 0); + if (__pyx_t_9) { + + /* "PyCafe.pyx":1691 + * if _handle == 0: + * if (force): + * return self.open(pv) # <<<<<<<<<<<<<< + * else: + * return 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_pv) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_pv); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1690 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.open(pv) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1693 + * return self.open(pv) + * else: + * return 0 # <<<<<<<<<<<<<< + * else: + * return _handle + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + } + __pyx_L4:; + + /* "PyCafe.pyx":1689 + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.open(pv) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1695 + * return 0 + * else: + * return _handle # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1686 + * ############################################################################ + * ### Allow user to choose whether or not to open ##### + * cpdef checkForHandle(self, str pv, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForHandle (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForHandle") < 0)) __PYX_ERR(3, 1686, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1686, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForHandle", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1686, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyUnicode_Type), 1, "pv", 1))) __PYX_ERR(3, 1686, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_184checkForHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_184checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_v_force) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle __pyx_t_2; + __Pyx_RefNannySetupContext("checkForHandle", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.force = __pyx_v_force; + __pyx_t_1 = __pyx_vtabptr_6PyCafe_CyCafe->checkForHandle(__pyx_v_self, __pyx_v_pv, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1699 + * + * ############################################################################ + * cpdef checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen = 0 + */ + +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList *__pyx_optional_args) { + int __pyx_v_force = ((int)1); + unsigned int __pyx_v_nToOpen; + PyObject *__pyx_v_handleList = NULL; + unsigned int __pyx_v__handle; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + char const *__pyx_t_11; + int __pyx_t_12; + unsigned int __pyx_t_13; + int __pyx_t_14; + __Pyx_RefNannySetupContext("checkForHandleList", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_force = __pyx_optional_args->force; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6PyCafe_6CyCafe_187checkForHandleList)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pvList, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pvList, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_pvList); + __Pyx_GIVEREF(__pyx_v_pvList); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_pvList); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + } + #endif + } + + /* "PyCafe.pyx":1701 + * cpdef checkForHandleList(self, list pvList, bint force=True): + * + * cdef unsigned int nToOpen = 0 # <<<<<<<<<<<<<< + * handleList = [] + * cdef unsigned int _handle = 0 + */ + __pyx_v_nToOpen = 0; + + /* "PyCafe.pyx":1702 + * + * cdef unsigned int nToOpen = 0 + * handleList = [] # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handleList = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1703 + * cdef unsigned int nToOpen = 0 + * handleList = [] + * cdef unsigned int _handle = 0 # <<<<<<<<<<<<<< + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + */ + __pyx_v__handle = 0; + + /* "PyCafe.pyx":1704 + * handleList = [] + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): # <<<<<<<<<<<<<< + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + */ + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 1704, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_pvList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1704, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1705 + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) # <<<<<<<<<<<<<< + * if _handle == 0: + * if (force): + */ + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1705, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pvList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(3, 1705, __pyx_L1_error) + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_11); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1706 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * nToOpen = nToOpen+1 + */ + __pyx_t_12 = ((__pyx_v__handle == 0) != 0); + if (__pyx_t_12) { + + /* "PyCafe.pyx":1707 + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen = nToOpen+1 + * self.openNoWait() + */ + __pyx_t_12 = (__pyx_v_force != 0); + if (__pyx_t_12) { + + /* "PyCafe.pyx":1708 + * if _handle == 0: + * if (force): + * nToOpen = nToOpen+1 # <<<<<<<<<<<<<< + * self.openNoWait() + * _handle = self.open(pvList[i]) + */ + __pyx_v_nToOpen = (__pyx_v_nToOpen + 1); + + /* "PyCafe.pyx":1709 + * if (force): + * nToOpen = nToOpen+1 + * self.openNoWait() # <<<<<<<<<<<<<< + * _handle = self.open(pvList[i]) + * handleList.append(_handle) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNoWait); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1710 + * nToOpen = nToOpen+1 + * self.openNoWait() + * _handle = self.open(pvList[i]) # <<<<<<<<<<<<<< + * handleList.append(_handle) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 1710, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_pvList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1710, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__handle = __pyx_t_13; + + /* "PyCafe.pyx":1707 + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen = nToOpen+1 + * self.openNoWait() + */ + } + + /* "PyCafe.pyx":1711 + * self.openNoWait() + * _handle = self.open(pvList[i]) + * handleList.append(_handle) # <<<<<<<<<<<<<< + * else: + * handleList.append(_handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 1711, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1706 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * nToOpen = nToOpen+1 + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":1713 + * handleList.append(_handle) + * else: + * handleList.append(_handle) # <<<<<<<<<<<<<< + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 1713, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + } + + /* "PyCafe.pyx":1714 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList + */ + __pyx_t_12 = ((__pyx_v_nToOpen > 0) != 0); + if (__pyx_t_12) { + + /* "PyCafe.pyx":1715 + * handleList.append(_handle) + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) # <<<<<<<<<<<<<< + * return handleList + * ############################################################################ + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNowAndWait); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyFloat_FromDouble((2.0 + (__pyx_v_nToOpen * 0.01))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1714 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList + */ + } + + /* "PyCafe.pyx":1716 + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_handleList); + __pyx_r = __pyx_v_handleList; + goto __pyx_L0; + + /* "PyCafe.pyx":1699 + * + * ############################################################################ + * cpdef checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandleList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pvList = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForHandleList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pvList,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForHandleList") < 0)) __PYX_ERR(3, 1699, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pvList = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1699, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForHandleList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1699, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandleList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvList), (&PyList_Type), 1, "pvList", 1))) __PYX_ERR(3, 1699, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_186checkForHandleList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pvList, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_186checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_v_force) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList __pyx_t_2; + __Pyx_RefNannySetupContext("checkForHandleList", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.force = __pyx_v_force; + __pyx_t_1 = __pyx_vtabptr_6PyCafe_CyCafe->checkForHandleList(__pyx_v_self, __pyx_v_pvList, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandleList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1720 + * + * ############################################################################ + * cpdef checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + */ + +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle *__pyx_optional_args) { + int __pyx_v_force = ((int)1); + unsigned int __pyx_v__ghandle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + char const *__pyx_t_8; + int __pyx_t_9; + __Pyx_RefNannySetupContext("checkForGroupHandle", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_force = __pyx_optional_args->force; + } + } + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6PyCafe_6CyCafe_189checkForGroupHandle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_gName, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_gName, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_gName); + __Pyx_GIVEREF(__pyx_v_gName); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_gName); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + } + #endif + } + + /* "PyCafe.pyx":1721 + * ############################################################################ + * cpdef checkForGroupHandle(self, str gName, bint force=True): + * cdef unsigned int _ghandle = 0 # <<<<<<<<<<<<<< + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + */ + __pyx_v__ghandle = 0; + + /* "PyCafe.pyx":1722 + * cpdef checkForGroupHandle(self, str gName, bint force=True): + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) # <<<<<<<<<<<<<< + * if _ghandle == 0: + * if (force): + */ + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_gName); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 1722, __pyx_L1_error) + __pyx_v__ghandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_8); + + /* "PyCafe.pyx":1723 + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.groupOpen(gName) + */ + __pyx_t_9 = ((__pyx_v__ghandle == 0) != 0); + if (__pyx_t_9) { + + /* "PyCafe.pyx":1724 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.groupOpen(gName) + * else: + */ + __pyx_t_9 = (__pyx_v_force != 0); + if (__pyx_t_9) { + + /* "PyCafe.pyx":1725 + * if _ghandle == 0: + * if (force): + * return self.groupOpen(gName) # <<<<<<<<<<<<<< + * else: + * return 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_groupOpen); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_gName) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_gName); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1724 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.groupOpen(gName) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1727 + * return self.groupOpen(gName) + * else: + * return 0 # <<<<<<<<<<<<<< + * else: + * return _ghandle + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + } + __pyx_L4:; + + /* "PyCafe.pyx":1723 + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.groupOpen(gName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1729 + * return 0 + * else: + * return _ghandle # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__ghandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1720 + * + * ############################################################################ + * cpdef checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForGroupHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_gName = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForGroupHandle (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gName,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForGroupHandle") < 0)) __PYX_ERR(3, 1720, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_gName = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1720, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForGroupHandle", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1720, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForGroupHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gName), (&PyUnicode_Type), 1, "gName", 1))) __PYX_ERR(3, 1720, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_188checkForGroupHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gName, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_188checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_v_force) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle __pyx_t_2; + __Pyx_RefNannySetupContext("checkForGroupHandle", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.force = __pyx_v_force; + __pyx_t_1 = __pyx_vtabptr_6PyCafe_CyCafe->checkForGroupHandle(__pyx_v_self, __pyx_v_gName, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForGroupHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1734 + * ############################################################################ + * + * def getPVNameFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h) { + int __pyx_v_h; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVNameFromHandle (wrapper)", 0); + assert(__pyx_arg_h); { + __pyx_v_h = __Pyx_PyInt_As_int(__pyx_arg_h); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1734, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVNameFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_190getPVNameFromHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_h)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_190getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getPVNameFromHandle", 0); + + /* "PyCafe.pyx":1735 + * + * def getPVNameFromHandle(self, int h): + * return self._c_cafe.getPVFromHandle(h) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_h)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1734 + * ############################################################################ + * + * def getPVNameFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVNameFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1739 + * + * ############################################################################ + * def getHandleFromPVName(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPVName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(3, 1739, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_192getHandleFromPVName(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_name)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_192getHandleFromPVName(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getHandleFromPVName", 0); + + /* "PyCafe.pyx":1743 + * # py_string = (name).encode('UTF-8') + * # return self._c_cafe.getHandleFromPV(py_string) + * return self._c_cafe.getHandleFromPV(name) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(3, 1743, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_c_cafe->getHandleFromPV(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1739 + * + * ############################################################################ + * def getHandleFromPVName(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1748 + * ############################################################################ + * + * def getPVFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getPVFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getPVFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h) { + int __pyx_v_h; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFromHandle (wrapper)", 0); + assert(__pyx_arg_h); { + __pyx_v_h = __Pyx_PyInt_As_int(__pyx_arg_h); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1748, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_194getPVFromHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_h)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_194getPVFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getPVFromHandle", 0); + + /* "PyCafe.pyx":1749 + * + * def getPVFromHandle(self, int h): + * return self._c_cafe.getPVFromHandle(h) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_h)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1748 + * ############################################################################ + * + * def getPVFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1753 + * + * ############################################################################ + * def getHandleFromPV(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPV(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPV(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPV (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(3, 1753, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_196getHandleFromPV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_name)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_196getHandleFromPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getHandleFromPV", 0); + + /* "PyCafe.pyx":1757 + * # py_string = (name).encode('UTF-8') + * # return self._c_cafe.getHandleFromPV(py_string) + * return self._c_cafe.getHandleFromPV(name) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(3, 1757, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_c_cafe->getHandleFromPV(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1753 + * + * ############################################################################ + * def getHandleFromPV(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1760 + * ############################################################################ + * + * def getChannelDataStore(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199getChannelDataStore(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199getChannelDataStore(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelDataStore (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_198getChannelDataStore(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_198getChannelDataStore(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + CYTHON_UNUSED PyObject *__pyx_v_pv = 0; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_pvds = NULL; + PyObject *__pyx_v_pvcs = NULL; + PyObject *__pyx_v_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("getChannelDataStore", 0); + + /* "PyCafe.pyx":1761 + * + * def getChannelDataStore(self, handlePV): + * cdef str _METHOD = "getChannelDataStore" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * cdef str pv = "" + */ + __Pyx_INCREF(__pyx_n_u_getChannelDataStore); + __pyx_v__METHOD = __pyx_n_u_getChannelDataStore; + + /* "PyCafe.pyx":1762 + * def getChannelDataStore(self, handlePV): + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1763 + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + * cdef str pv = "" # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __Pyx_INCREF(__pyx_kp_u__3); + __pyx_v_pv = __pyx_kp_u__3; + + /* "PyCafe.pyx":1764 + * cdef unsigned int handle = 0 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1765 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1765, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1766 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + */ + __pyx_t_5 = __Pyx_PyUnicode_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_pv, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1764 + * cdef unsigned int handle = 0 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1767 + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1768 + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) # <<<<<<<<<<<<<< + * pv = handlePV + * else: + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1768, __pyx_L1_error) + __pyx_t_6.__pyx_n = 1; + __pyx_t_6.force = 1; + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1768, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1769 + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 1769, __pyx_L1_error) + __pyx_t_5 = __pyx_v_handlePV; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_pv, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1767 + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1771 + * pv = handlePV + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1772 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, \ + * else if PV")) + */ + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1771 + * pv = handlePV + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 1771, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1776 + * else if PV")) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1777 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1778 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":1777 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":1779 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + * + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 1779, __pyx_L1_error) + + /* "PyCafe.pyx":1776 + * else if PV")) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":1783 + * + * cdef ChannelDataStore cds + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * # with nogil: + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":1795 + * #status=self._c_cafe.getCtrlCache(handle, pvc) + * + * pvds = self.getPVCache(handle) # <<<<<<<<<<<<<< + * pvcs = self.getCtrlCache(handle) + * infos = self.getChannelInfo(handle) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_pvds = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1796 + * + * pvds = self.getPVCache(handle) + * pvcs = self.getCtrlCache(handle) # <<<<<<<<<<<<<< + * infos = self.getChannelInfo(handle) + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCtrlCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_pvcs = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1797 + * pvds = self.getPVCache(handle) + * pvcs = self.getCtrlCache(handle) + * infos = self.getChannelInfo(handle) # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getChannelInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_infos = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1825 + * + * # return cds.description, channelRegaliaToStruct(cds.info), PVDataHolderToStruct(cds.pvd), PVCtrlHolderToStruct(cds.pvc) + * return infos, pvds, pvcs # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_infos); + __Pyx_GIVEREF(__pyx_v_infos); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_infos); + __Pyx_INCREF(__pyx_v_pvds); + __Pyx_GIVEREF(__pyx_v_pvds); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_pvds); + __Pyx_INCREF(__pyx_v_pvcs); + __Pyx_GIVEREF(__pyx_v_pvcs); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_pvcs); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1760 + * ############################################################################ + * + * def getChannelDataStore(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelDataStore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pv); + __Pyx_XDECREF(__pyx_v_pvds); + __Pyx_XDECREF(__pyx_v_pvcs); + __Pyx_XDECREF(__pyx_v_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1829 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getChannelInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getChannelInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelInfo (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_200getChannelInfo(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_200getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + PyObject *__pyx_v_PyCafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException __pyx_t_5; + __Pyx_RefNannySetupContext("getChannelInfo", 0); + + /* "PyCafe.pyx":1830 + * @verify_handlepv + * def getChannelInfo(self, handlePV): + * cdef str _METHOD = "getChannelInfo(handlePV)" # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + */ + __Pyx_INCREF(__pyx_kp_u_getChannelInfo_handlePV); + __pyx_v__METHOD = __pyx_kp_u_getChannelInfo_handlePV; + + /* "PyCafe.pyx":1832 + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) # <<<<<<<<<<<<<< + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1832, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->getChannelInfo(__pyx_t_1, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":1834 + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + */ + __pyx_t_3 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "PyCafe.pyx":1836 + * if self._enable_exceptions and status != ICAFE_NORMAL: + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) # <<<<<<<<<<<<<< + * raise PyCafeException + * # cdef channelInfo ci=channelRegaliaToStruct(cr) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1836, __pyx_L1_error) + + /* "PyCafe.pyx":1835 + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: + * PyCafeException = self.prepareCafeException( # <<<<<<<<<<<<<< + * status, _METHOD, handle=handlePV) + * raise PyCafeException + */ + __pyx_t_5.__pyx_n = 1; + __pyx_t_5.handle = __pyx_t_1; + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->prepareCafeException(__pyx_v_self, __pyx_v_status, __pyx_v__METHOD, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_PyCafeException = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1837 + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + * raise PyCafeException # <<<<<<<<<<<<<< + * # cdef channelInfo ci=channelRegaliaToStruct(cr) + * # ci.channelID=self._c_cafe.getChannelIDAsString(cr.getChannelID()) + */ + __Pyx_Raise(__pyx_v_PyCafeException, 0, 0, 0); + __PYX_ERR(3, 1837, __pyx_L1_error) + + /* "PyCafe.pyx":1834 + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + */ + } + + /* "PyCafe.pyx":1842 + * # do hex(cr.getChannelID()) to get channelId in hex form + * + * return channelRegaliaToStruct(self.channelInfo) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = ((PyObject *)__pyx_f_6PyCafe_channelRegaliaToStruct(__pyx_v_self->channelInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1829 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_PyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1846 + * + * + * def getChannelList(self, list listStrings): # <<<<<<<<<<<<<< + * return self._c_cafe.getFromGlobalChannelList(listStrings) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_listStrings), (&PyList_Type), 1, "listStrings", 1))) __PYX_ERR(3, 1846, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_202getChannelList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_listStrings)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_202getChannelList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_listStrings) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getChannelList", 0); + + /* "PyCafe.pyx":1847 + * + * def getChannelList(self, list listStrings): + * return self._c_cafe.getFromGlobalChannelList(listStrings) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_listStrings); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1847, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->_c_cafe->getFromGlobalChannelList(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1846 + * + * + * def getChannelList(self, list listStrings): # <<<<<<<<<<<<<< + * return self._c_cafe.getFromGlobalChannelList(listStrings) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1853 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getWFAsString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getWFAsString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cache = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWFAsString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cache,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getWFAsString") < 0)) __PYX_ERR(3, 1853, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cache = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getWFAsString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1853, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_204getWFAsString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cache); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_204getWFAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cache) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_strWF; + PyObject *__pyx_v_bWF = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_v_PyCafeException = NULL; + PyObject *__pyx_v_a = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getWFAsString", 0); + + /* "PyCafe.pyx":1854 + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): + * cdef str _METHOD = "getWFAsString" # <<<<<<<<<<<<<< + * cdef string strWF + * + */ + __Pyx_INCREF(__pyx_n_u_getWFAsString); + __pyx_v__METHOD = __pyx_n_u_getWFAsString; + + /* "PyCafe.pyx":1858 + * + * cdef bytes bWF + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * if cache: + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1858, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1859 + * cdef bytes bWF + * cdef unsigned int handle = handlePV + * if cache: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cache); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 1859, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":1860 + * cdef unsigned int handle = handlePV + * if cache: + * status = self._c_cafe.getWFAsStringCache(handle, strWF) # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getWFAsStringCache(__pyx_v_handle, __pyx_v_strWF); + + /* "PyCafe.pyx":1859 + * cdef bytes bWF + * cdef unsigned int handle = handlePV + * if cache: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1862 + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsString(handle, strWF) + * + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1863 + * else: + * with nogil: + * status = self._c_cafe.getWFAsString(handle, strWF) # <<<<<<<<<<<<<< + * + * #mport codecs + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getWFAsString(__pyx_v_handle, __pyx_v_strWF); + } + + /* "PyCafe.pyx":1862 + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsString(handle, strWF) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + } + __pyx_L3:; + + /* "PyCafe.pyx":1879 + * ##FOR TESTINg raise PyCafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1881 + * if status != ICAFE_NORMAL: + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1882 + * + * if self._enable_exceptions: + * PyCafeException = self.prepareCafeException( # <<<<<<<<<<<<<< + * status, _METHOD, handle=handle) + * raise PyCafeException + */ + __pyx_t_4.__pyx_n = 1; + __pyx_t_4.handle = __pyx_v_handle; + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->prepareCafeException(__pyx_v_self, __pyx_v_status, __pyx_v__METHOD, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_PyCafeException = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":1884 + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + * raise PyCafeException # <<<<<<<<<<<<<< + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __Pyx_Raise(__pyx_v_PyCafeException, 0, 0, 0); + __PYX_ERR(3, 1884, __pyx_L1_error) + + /* "PyCafe.pyx":1881 + * if status != ICAFE_NORMAL: + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":1886 + * raise PyCafeException + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1887 + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":1886 + * raise PyCafeException + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + __pyx_L8:; + + /* "PyCafe.pyx":1879 + * ##FOR TESTINg raise PyCafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":1890 + * + * + * bWF = strWF # <<<<<<<<<<<<<< + * a = (bWF).decode('latin-1') + * return a + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_strWF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_bWF = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1891 + * + * bWF = strWF + * a = (bWF).decode('latin-1') # <<<<<<<<<<<<<< + * return a + * ''' + */ + if (unlikely(__pyx_v_bWF == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(3, 1891, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bWF, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_a = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1892 + * bWF = strWF + * a = (bWF).decode('latin-1') + * return a # <<<<<<<<<<<<<< + * ''' + * b = a.encode('latin-1') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_a); + __pyx_r = __pyx_v_a; + goto __pyx_L0; + + /* "PyCafe.pyx":1853 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_bWF); + __Pyx_XDECREF(__pyx_v_PyCafeException); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1907 + * ############################################################################ + * + * def getWFAsStringCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getWFAsString(handlePV, cache=True) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getWFAsStringCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getWFAsStringCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWFAsStringCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_206getWFAsStringCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_206getWFAsStringCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getWFAsStringCache", 0); + + /* "PyCafe.pyx":1908 + * + * def getWFAsStringCache(self, handlePV): + * return self.getWFAsString(handlePV, cache=True) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cache, Py_True) < 0) __PYX_ERR(3, 1908, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1907 + * ############################################################################ + * + * def getWFAsStringCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getWFAsString(handlePV, cache=True) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsStringCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1914 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209isEnum(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209isEnum(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isEnum (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_208isEnum(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_208isEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("isEnum", 0); + + /* "PyCafe.pyx":1915 + * @verify_handlepv + * def isEnum(self, handlePV): + * return self._c_cafe.isEnum(handlePV) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1915, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isEnum(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1914 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.isEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1920 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getEnumStrings(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getEnumStrings(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getEnumStrings (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_210getEnumStrings(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_210getEnumStrings(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getEnumStrings", 0); + + /* "PyCafe.pyx":1921 + * @verify_handlepv + * def getEnumStrings(self, handlePV): + * return self.hh.getEnumStrings(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1921, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->hh.getEnumStrings(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1920 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumStrings", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1925 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_enumString = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getEnumFromString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_enumString,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enumString)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getEnumFromString", 1, 2, 2, 1); __PYX_ERR(3, 1925, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEnumFromString") < 0)) __PYX_ERR(3, 1925, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_enumString = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getEnumFromString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1925, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_enumString), (&PyUnicode_Type), 1, "enumString", 1))) __PYX_ERR(3, 1925, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_212getEnumFromString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_enumString); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_212getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString) { + PyObject *__pyx_v__METHOD = 0; + short __pyx_v_enumValue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + std::string __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("getEnumFromString", 0); + + /* "PyCafe.pyx":1926 + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD = "getEnumFromString" # <<<<<<<<<<<<<< + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + */ + __Pyx_INCREF(__pyx_n_u_getEnumFromString); + __pyx_v__METHOD = __pyx_n_u_getEnumFromString; + + /* "PyCafe.pyx":1928 + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) # <<<<<<<<<<<<<< + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1928, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_enumString); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1928, __pyx_L1_error) + __pyx_v_enumValue = __pyx_v_self->hh.getEnumFromString(__pyx_t_1, ((std::string)__pyx_t_2)); + + /* "PyCafe.pyx":1929 + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: # <<<<<<<<<<<<<< + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( + */ + __pyx_t_3 = ((__pyx_v_enumValue == INVALID_ENUM_RETURN_VALUE) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1931 + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "ENUM string value:", enumString, "not recognized! ", + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2_3_4_5, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":1933 + * "{0} {1} \n{2} {3} {4} \n{5}".format( + * self._exception_text, _METHOD, + * "ENUM string value:", enumString, "not recognized! ", # <<<<<<<<<<<<<< + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumValue + */ + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_string_value, __pyx_v_enumString, __pyx_kp_u_not_recognized, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1931, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_string_value, __pyx_v_enumString, __pyx_kp_u_not_recognized, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1931, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_ENUM_string_value); + __Pyx_GIVEREF(__pyx_kp_u_ENUM_string_value); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_ENUM_string_value); + __Pyx_INCREF(__pyx_v_enumString); + __Pyx_GIVEREF(__pyx_v_enumString); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_enumString); + __Pyx_INCREF(__pyx_kp_u_not_recognized); + __Pyx_GIVEREF(__pyx_kp_u_not_recognized); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_kp_u_not_recognized); + __Pyx_INCREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + __Pyx_GIVEREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_kp_u_Execute_getEnumStrings_handlePV); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1930 + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( # <<<<<<<<<<<<<< + * "{0} {1} \n{2} {3} {4} \n{5}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 1930, __pyx_L1_error) + + /* "PyCafe.pyx":1929 + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: # <<<<<<<<<<<<<< + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( + */ + } + + /* "PyCafe.pyx":1935 + * "ENUM string value:", enumString, "not recognized! ", + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumValue # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_short(__pyx_v_enumValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1925 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1939 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned short __pyx_v_enumValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStringFromEnum (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_enumValue,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enumValue); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStringFromEnum") < 0)) __PYX_ERR(3, 1939, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + if (values[1]) { + __pyx_v_enumValue = __Pyx_PyInt_As_unsigned_short(values[1]); if (unlikely((__pyx_v_enumValue == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 1939, __pyx_L3_error) + } else { + __pyx_v_enumValue = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStringFromEnum", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1939, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStringFromEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_214getStringFromEnum(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_enumValue); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_214getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned short __pyx_v_enumValue) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_enumString; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("getStringFromEnum", 0); + + /* "PyCafe.pyx":1940 + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" # <<<<<<<<<<<<<< + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: + */ + __Pyx_INCREF(__pyx_n_u_getStringFromEnum); + __pyx_v__METHOD = __pyx_n_u_getStringFromEnum; + + /* "PyCafe.pyx":1941 + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) # <<<<<<<<<<<<<< + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1941, __pyx_L1_error) + __pyx_v_enumString = __pyx_v_self->hh.getStringFromEnum(__pyx_t_1, __pyx_v_enumValue); + + /* "PyCafe.pyx":1942 + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( + */ + __pyx_t_2 = ((__pyx_v_enumString == INVALID_ENUM_RETURN_STRING) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1944 + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "ENUM value:", enumValue, "is not a valid option. ", + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__53, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":1946 + * "{} {} \n{} {} {} \n{}".format( + * self._exception_text, _METHOD, + * "ENUM value:", enumValue, "is not a valid option. ", # <<<<<<<<<<<<<< + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumString + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_enumValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_value, __pyx_t_5, __pyx_kp_u_is_not_a_valid_option, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1944, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_value, __pyx_t_5, __pyx_kp_u_is_not_a_valid_option, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1944, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_ENUM_value); + __Pyx_GIVEREF(__pyx_kp_u_ENUM_value); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_ENUM_value); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_is_not_a_valid_option); + __Pyx_GIVEREF(__pyx_kp_u_is_not_a_valid_option); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_kp_u_is_not_a_valid_option); + __Pyx_INCREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + __Pyx_GIVEREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_kp_u_Execute_getEnumStrings_handlePV); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1943 + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {} \n{} {} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 1943, __pyx_L1_error) + + /* "PyCafe.pyx":1942 + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( + */ + } + + /* "PyCafe.pyx":1948 + * "ENUM value:", enumValue, "is not a valid option. ", + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_enumString); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1939 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getStringFromEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1952 + * ############################################################################ + * + * def loadSFGroups(self): # <<<<<<<<<<<<<< + * cdef str VA = 'VA' + * return self._c_cafe.loadSFGroups( VA) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217loadSFGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217loadSFGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadSFGroups (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_216loadSFGroups(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_216loadSFGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v_VA = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::string __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("loadSFGroups", 0); + + /* "PyCafe.pyx":1953 + * + * def loadSFGroups(self): + * cdef str VA = 'VA' # <<<<<<<<<<<<<< + * return self._c_cafe.loadSFGroups( VA) + * + */ + __Pyx_INCREF(__pyx_n_u_VA); + __pyx_v_VA = __pyx_n_u_VA; + + /* "PyCafe.pyx":1954 + * def loadSFGroups(self): + * cdef str VA = 'VA' + * return self._c_cafe.loadSFGroups( VA) # <<<<<<<<<<<<<< + * + * def loadSFGroupsWithBase(self, str VA): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_VA); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1954, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(__pyx_v_self->_c_cafe->loadSFGroups(((std::string)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1952 + * ############################################################################ + * + * def loadSFGroups(self): # <<<<<<<<<<<<<< + * cdef str VA = 'VA' + * return self._c_cafe.loadSFGroups( VA) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.loadSFGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_VA); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1956 + * return self._c_cafe.loadSFGroups( VA) + * + * def loadSFGroupsWithBase(self, str VA): # <<<<<<<<<<<<<< + * return self._c_cafe.loadSFGroups( VA) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219loadSFGroupsWithBase(PyObject *__pyx_v_self, PyObject *__pyx_v_VA); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219loadSFGroupsWithBase(PyObject *__pyx_v_self, PyObject *__pyx_v_VA) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadSFGroupsWithBase (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_VA), (&PyUnicode_Type), 1, "VA", 1))) __PYX_ERR(3, 1956, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_218loadSFGroupsWithBase(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_VA)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_218loadSFGroupsWithBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_VA) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::string __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("loadSFGroupsWithBase", 0); + + /* "PyCafe.pyx":1957 + * + * def loadSFGroupsWithBase(self, str VA): + * return self._c_cafe.loadSFGroups( VA) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_VA); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1957, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(__pyx_v_self->_c_cafe->loadSFGroups(((std::string)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1956 + * return self._c_cafe.loadSFGroups( VA) + * + * def loadSFGroupsWithBase(self, str VA): # <<<<<<<<<<<<<< + * return self._c_cafe.loadSFGroups( VA) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.loadSFGroupsWithBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1962 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + DBR_TYPE __pyx_v_dbrBase; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setDbrBase (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dbrBase,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbrBase)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setDbrBase", 1, 2, 2, 1); __PYX_ERR(3, 1962, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDbrBase") < 0)) __PYX_ERR(3, 1962, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_dbrBase = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1962, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setDbrBase", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1962, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_220setDbrBase(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dbrBase); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_220setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setDbrBase", 0); + + /* "PyCafe.pyx":1965 + * + * # Print Warning Message + * if dbrBase > DBR_TIME: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + */ + __pyx_t_1 = ((__pyx_v_dbrBase > DBR_TIME) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1966 + * # Print Warning Message + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") # <<<<<<<<<<<<<< + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1967 + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") # <<<<<<<<<<<<<< + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1968 + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") # <<<<<<<<<<<<<< + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1969 + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbrBase = DBR_TIME + * + */ + __pyx_t_2 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbrBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_DBR_TIME); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_DBR_TIME); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_DBR_TIME); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1970 + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME # <<<<<<<<<<<<<< + * + * return self.hh.setCafeDbrType(handlePV, dbrBase) + */ + __pyx_v_dbrBase = DBR_TIME; + + /* "PyCafe.pyx":1965 + * + * # Print Warning Message + * if dbrBase > DBR_TIME: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + */ + } + + /* "PyCafe.pyx":1972 + * dbrBase = DBR_TIME + * + * return self.hh.setCafeDbrType(handlePV, dbrBase) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1972, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setCafeDbrType(__pyx_t_4, __pyx_v_dbrBase)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1962 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1977 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrBase (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_222getDbrBase(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_222getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + DBR_TYPE __pyx_v__cafeDbrType; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getDbrBase", 0); + + /* "PyCafe.pyx":1979 + * def getDbrBase(self, handlePV): + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN # <<<<<<<<<<<<<< + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) + * + */ + __pyx_v__cafeDbrType = DBR_PLAIN; + + /* "PyCafe.pyx":1980 + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) # <<<<<<<<<<<<<< + * + * return _cafeDbrType + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1980, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->hh.getCafeDbrType(__pyx_t_1, __pyx_v__cafeDbrType); + + /* "PyCafe.pyx":1982 + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) + * + * return _cafeDbrType # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v__cafeDbrType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1977 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1988 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetCacheWaitPolicy (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_wpk,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetCacheWaitPolicy", 1, 2, 2, 1); __PYX_ERR(3, 1988, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetCacheWaitPolicy") < 0)) __PYX_ERR(3, 1988, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_wpk = ((ChannelGetCacheWaitPolicyKind)__Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1989, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGetCacheWaitPolicy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1988, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_wpk); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk) { + ChannelGetCacheWaitPolicy __pyx_v_channelGetCacheWaitPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicy", 0); + + /* "PyCafe.pyx":1992 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1993 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1996 + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1997 + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2001 + * "GET_CACHE_WAIT (2)")) + * print( + * "The value entered was", wpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2000 + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + * print( # <<<<<<<<<<<<<< + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2003 + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":1992 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + */ + } + + /* "PyCafe.pyx":2006 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicy( + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":2008 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetCacheWaitPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2009 + * + * return self.ph.setChannelGetCacheWaitPolicy( + * handlePV, channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2009, __pyx_L1_error) + + /* "PyCafe.pyx":2008 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetCacheWaitPolicy) + * ############################################################################ + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicy(__pyx_t_4, __pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1988 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2013 + * + * ############################################################################ + * def setGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetCacheWaitPolicyKind wpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk) { + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetCacheWaitPolicyAllHandles (wrapper)", 0); + assert(__pyx_arg_wpk); { + __pyx_v_wpk = ((ChannelGetCacheWaitPolicyKind)__Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(__pyx_arg_wpk)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2014, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((ChannelGetCacheWaitPolicyKind)__pyx_v_wpk)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetCacheWaitPolicyKind __pyx_v_wpk) { + ChannelGetCacheWaitPolicy __pyx_v_channelGetCacheWaitPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicyAllHandles", 0); + + /* "PyCafe.pyx":2017 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2018 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2021 + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2022 + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2026 + * GET_CACHE_WAIT (2)") + * print( + * "The value entered was", wpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2025 + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + * print( # <<<<<<<<<<<<<< + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2028 + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":2017 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + */ + } + + /* "PyCafe.pyx":2031 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":2033 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * channelGetCacheWaitPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2034 + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( + * channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicyAllHandles(__pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2013 + * + * ############################################################################ + * def setGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetCacheWaitPolicyKind wpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2039 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicy (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_wmpk,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wmpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetActionWhenMonitorPolicy", 1, 2, 2, 1); __PYX_ERR(3, 2039, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetActionWhenMonitorPolicy") < 0)) __PYX_ERR(3, 2039, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_wmpk = ((ChannelGetActionWhenMonitorPolicyKind)__Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2040, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGetActionWhenMonitorPolicy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2039, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_wmpk); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk) { + ChannelGetActionWhenMonitorPolicy __pyx_v_channelGetActionWhenMonitorPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicy", 0); + + /* "PyCafe.pyx":2043 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2044 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2045 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2046 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2047 + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2049 + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":2043 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + } + + /* "PyCafe.pyx":2052 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":2054 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2055 + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( + * handlePV, channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2055, __pyx_L1_error) + + /* "PyCafe.pyx":2054 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicy(__pyx_t_4, __pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2039 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2059 + * + * ############################################################################ + * def setGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk) { + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicyAllHandles (wrapper)", 0); + assert(__pyx_arg_wmpk); { + __pyx_v_wmpk = ((ChannelGetActionWhenMonitorPolicyKind)__Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(__pyx_arg_wmpk)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2060, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((ChannelGetActionWhenMonitorPolicyKind)__pyx_v_wmpk)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk) { + ChannelGetActionWhenMonitorPolicy __pyx_v_channelGetActionWhenMonitorPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicyAllHandles", 0); + + /* "PyCafe.pyx":2063 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2064 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2065 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2066 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print( + * "The value entered was", wmpk, + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2068 + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( + * "The value entered was", wmpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2067 + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( # <<<<<<<<<<<<<< + * "The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2070 + * "The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":2063 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + } + + /* "PyCafe.pyx":2073 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":2075 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2076 + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( + * channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicyAllHandles(__pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2059 + * + * ############################################################################ + * def setGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2081 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_232getNonBlocking[] = "Requires cafe.ca_flush_io by user.\n In this resepct, it differs from cafe.getAsync\n which will accepts a list, and execute a flush\n at the end.\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getNonBlocking (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("getNonBlocking", 0); + + /* "PyCafe.pyx":2087 + * at the end. + * ''' + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * cdef int status + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2087, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2090 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getNonBlocking(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2091 + * + * with nogil: + * status = self._c_cafe.getNonBlocking(handle) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getNonBlocking(__pyx_v_handle); + } + + /* "PyCafe.pyx":2090 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getNonBlocking(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":2093 + * status = self._c_cafe.getNonBlocking(handle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2094 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2095 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2096 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2095 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":2098 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * raise Exception( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":2094 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2099 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2102 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + * Status = {0}".format(status)) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2100 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + * Status = {0}".format(status)) + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 2100, __pyx_L1_error) + + /* "PyCafe.pyx":2099 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + */ + } + + /* "PyCafe.pyx":2093 + * status = self._c_cafe.getNonBlocking(handle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2104 + * Status = {0}".format(status)) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2081 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getNonBlocking", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2108 + * + * ############################################################################ + * def getStr(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='str') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStr") < 0)) __PYX_ERR(3, 2108, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStr", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2108, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_234getStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_234getStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStr", 0); + + /* "PyCafe.pyx":2109 + * ############################################################################ + * def getStr(self, handlePV, object cb=None): + * return self.get(handlePV, dt='str') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 2109, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2108 + * + * ############################################################################ + * def getStr(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='str') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2113 + * + * ############################################################################ + * def getInt(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='int') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getInt") < 0)) __PYX_ERR(3, 2113, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getInt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2113, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_236getInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_236getInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getInt", 0); + + /* "PyCafe.pyx":2114 + * ############################################################################ + * def getInt(self, handlePV, object cb=None): + * return self.get(handlePV, dt='int') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 2114, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2113 + * + * ############################################################################ + * def getInt(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='int') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2118 + * + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='float') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloat (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloat") < 0)) __PYX_ERR(3, 2118, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2118, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_238getFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_238getFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloat", 0); + + /* "PyCafe.pyx":2119 + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): + * return self.get(handlePV, dt='float') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 2119, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2118 + * + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='float') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2122 + * ############################################################################ + * + * def caget(self, str pv_name, str dt='native'): # <<<<<<<<<<<<<< + * return self.get(pv_name, dt) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241caget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241caget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv_name = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("caget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_name_2,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "caget") < 0)) __PYX_ERR(3, 2122, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv_name = ((PyObject*)values[0]); + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("caget", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2122, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.caget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv_name), (&PyUnicode_Type), 1, "pv_name", 1))) __PYX_ERR(3, 2122, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 2122, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_240caget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv_name, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_240caget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_dt) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("caget", 0); + + /* "PyCafe.pyx":2123 + * + * def caget(self, str pv_name, str dt='native'): + * return self.get(pv_name, dt) # <<<<<<<<<<<<<< + * + * def caput(self, str pv_name, pv_value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_dt}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2123, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_dt}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2123, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_pv_name); + __Pyx_GIVEREF(__pyx_v_pv_name); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pv_name); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_dt); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2122 + * ############################################################################ + * + * def caget(self, str pv_name, str dt='native'): # <<<<<<<<<<<<<< + * return self.get(pv_name, dt) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.caget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2125 + * return self.get(pv_name, dt) + * + * def caput(self, str pv_name, pv_value): # <<<<<<<<<<<<<< + * return self.set(pv_name, pv_value) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243caput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243caput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv_name = 0; + PyObject *__pyx_v_pv_value = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("caput (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_name_2,&__pyx_n_s_pv_value,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_value)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("caput", 1, 2, 2, 1); __PYX_ERR(3, 2125, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "caput") < 0)) __PYX_ERR(3, 2125, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_pv_name = ((PyObject*)values[0]); + __pyx_v_pv_value = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("caput", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2125, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.caput", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv_name), (&PyUnicode_Type), 1, "pv_name", 1))) __PYX_ERR(3, 2125, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_242caput(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv_name, __pyx_v_pv_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_242caput(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_pv_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("caput", 0); + + /* "PyCafe.pyx":2126 + * + * def caput(self, str pv_name, pv_value): + * return self.set(pv_name, pv_value) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_pv_value}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2126, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_pv_value}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2126, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_pv_name); + __Pyx_GIVEREF(__pyx_v_pv_name); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pv_name); + __Pyx_INCREF(__pyx_v_pv_value); + __Pyx_GIVEREF(__pyx_v_pv_value); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_pv_value); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2125 + * return self.get(pv_name, dt) + * + * def caput(self, str pv_name, pv_value): # <<<<<<<<<<<<<< + * return self.set(pv_name, pv_value) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.caput", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2130 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[0] = ((PyObject *)__pyx_int_0); + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(3, 2130, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2130, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 2130, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_244get(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244get(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + long __pyx_v_dtr; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("get", 0); + + /* "PyCafe.pyx":2131 + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): + * cdef str _METHOD = "get(handlePV, dt)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + __Pyx_INCREF(__pyx_kp_u_get_handlePV_dt); + __pyx_v__METHOD = __pyx_kp_u_get_handlePV_dt; + + /* "PyCafe.pyx":2133 + * cdef str _METHOD = "get(handlePV, dt)" + * + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * cdef int status + * cdef long dtr = 0 + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2133, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2135 + * cdef unsigned int handle = handlePV + * cdef int status + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * + * status = self.hh.getDataTypeNative(handle, dtr) + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2137 + * cdef long dtr = 0 + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2139 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2140 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2141 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2142 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2141 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2144 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2140 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2145 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2147 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2148 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2149 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2146 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2150 + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2150, __pyx_L1_error) + + /* "PyCafe.pyx":2145 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2151 + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2139 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2153 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2154 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2155 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2156 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2157 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2156 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2159 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2161 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2162 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2163 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2164 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2166 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(3, 2161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2160 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2168 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return None + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2168, __pyx_L1_error) + + /* "PyCafe.pyx":2159 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2170 + * raise _cafeException + * + * return None # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2154 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2173 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2174 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2173 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2175 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2177 + * if self._enable_exceptions: + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type_3, __pyx_n_u_cafe) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2178 + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2179 + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2180 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2181 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2176 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2182 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2182, __pyx_L1_error) + + /* "PyCafe.pyx":2175 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2183 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2153 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2186 + * + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2187 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->channelInfo.getClassNameAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waveform, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = ((__pyx_t_2 != 0) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L13_bool_binop_done; + } + + /* "PyCafe.pyx":2188 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: # <<<<<<<<<<<<<< + * return self.getWFAsString(handle) + * + */ + __pyx_t_7 = __pyx_v_dtr; + __pyx_t_6 = (((__pyx_t_7 == DBR_CHAR) != 0) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L13_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_8 = __pyx_v_dt; + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_str, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 2188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = ((__pyx_t_6 != 0) != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L13_bool_binop_done:; + + /* "PyCafe.pyx":2187 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + if (__pyx_t_5) { + + /* "PyCafe.pyx":2189 + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2187 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + } + + /* "PyCafe.pyx":2191 + * return self.getWFAsString(handle) + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2192 + * + * cdef unsigned int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafe.pyx":2195 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2196 + * + * if dtcheck in [CAFE_STRING]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2197 + * if dtcheck in [CAFE_STRING]: + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getString(__pyx_v_handle, __pyx_v_self->valStr); + } + + /* "PyCafe.pyx":2196 + * + * if dtcheck in [CAFE_STRING]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L18; + } + __pyx_L18:; + } + } + + /* "PyCafe.pyx":2198 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2199 + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2198 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + } + + /* "PyCafe.pyx":2195 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2200 + * if status == ICAFE_NORMAL: + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":2201 + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2202 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLong(__pyx_v_handle, __pyx_v_self->valInt); + } + + /* "PyCafe.pyx":2201 + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L22; + } + __pyx_L22:; + } + } + + /* "PyCafe.pyx":2203 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2204 + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2203 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + } + + /* "PyCafe.pyx":2200 + * if status == ICAFE_NORMAL: + * return self.valStr + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":2205 + * if status == ICAFE_NORMAL: + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2206 + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2207 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDouble(__pyx_v_handle, __pyx_v_self->valFloat); + } + + /* "PyCafe.pyx":2206 + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L26; + } + __pyx_L26:; + } + } + + /* "PyCafe.pyx":2209 + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2210 + * + * if status == ICAFE_NORMAL: + * return self.valFloat # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2209 + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck == CAFE_ENUM: + */ + } + + /* "PyCafe.pyx":2205 + * if status == ICAFE_NORMAL: + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":2213 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + __pyx_t_5 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2214 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2215 + * if self._c_cafe.isEnum(handle): + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getString(__pyx_v_handle, __pyx_v_self->valStr); + } + + /* "PyCafe.pyx":2214 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L31; + } + __pyx_L31:; + } + } + + /* "PyCafe.pyx":2216 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2217 + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2216 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":2213 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + goto __pyx_L28; + } + + /* "PyCafe.pyx":2219 + * return self.valStr + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2220 + * else: + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLong(__pyx_v_handle, __pyx_v_self->valInt); + } + + /* "PyCafe.pyx":2219 + * return self.valStr + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L35; + } + __pyx_L35:; + } + } + + /* "PyCafe.pyx":2221 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2222 + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def get should never appear!") + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2221 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + } + } + __pyx_L28:; + + /* "PyCafe.pyx":2211 + * if status == ICAFE_NORMAL: + * return self.valFloat + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + break; + default: + + /* "PyCafe.pyx":2224 + * return self.valInt + * else: + * print("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2225 + * else: + * print("This line in PyCafe def get should never appear!") + * return None # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":2227 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2228 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2229 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_5 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2230 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2229 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L39; + } + + /* "PyCafe.pyx":2232 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L39:; + + /* "PyCafe.pyx":2228 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2233 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2235 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2236 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2237 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2238 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(3, 2235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2234 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2239 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2239, __pyx_L1_error) + + /* "PyCafe.pyx":2233 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2240 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2227 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2130 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2247 + * + * ############################################################################ + * def getIntList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247getIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247getIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_246getIntList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_246getIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getIntList", 0); + + /* "PyCafe.pyx":2248 + * ############################################################################ + * def getIntList(self, handlePV): + * return self.getList(handlePV, 'int') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2248, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2248, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2247 + * + * ############################################################################ + * def getIntList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2251 + * + * ############################################################################ + * def getFloatList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_248getFloatList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_248getFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getFloatList", 0); + + /* "PyCafe.pyx":2252 + * ############################################################################ + * def getFloatList(self, handlePV): + * return self.getList(handlePV, 'float') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2251 + * + * ############################################################################ + * def getFloatList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2255 + * + * ############################################################################ + * def getStrList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_250getStrList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_250getStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getStrList", 0); + + /* "PyCafe.pyx":2256 + * ############################################################################ + * def getStrList(self, handlePV): + * return self.getList(handlePV, 'str') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2256, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2256, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2255 + * + * ############################################################################ + * def getStrList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2260 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getList") < 0)) __PYX_ERR(3, 2260, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2260, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 2260, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_252getList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_252getList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + long __pyx_v_dtr; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_dtcheck; + CYTHON_UNUSED unsigned int __pyx_v_nelemNative; + unsigned int __pyx_v_nelemClient; + CYTHON_UNUSED unsigned int __pyx_v_nelemRequest; + unsigned int __pyx_v_nelemMethod; + dbr_string_t *__pyx_v_valStringArray; + dbr_long_t *__pyx_v_valIntArray; + dbr_enum_t *__pyx_v_valUShortArray; + double *__pyx_v_valDoubleArray; + float *__pyx_v_valFloatArray; + short *__pyx_v_valShortArray; + PyObject *__pyx_v_ll = NULL; + long __pyx_v_i; + dbr_char_t *__pyx_v_valCharArray; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + unsigned int __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + __Pyx_RefNannySetupContext("getList", 0); + + /* "PyCafe.pyx":2261 + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * + */ + __Pyx_INCREF(__pyx_n_u_getList); + __pyx_v__METHOD = __pyx_n_u_getList; + + /* "PyCafe.pyx":2262 + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2262, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2265 + * + * cdef int status + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * + * status = self.hh.getDataTypeNative(handle, dtr) + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2267 + * cdef long dtr = 0 + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2269 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2270 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2271 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2272 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2271 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2274 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2270 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2275 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2277 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + + /* "PyCafe.pyx":2278 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2279 + * _type='CafeError', _source=_METHOD, + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2280 + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2281 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2276 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _handle=handle, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2282 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2282, __pyx_L1_error) + + /* "PyCafe.pyx":2275 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":2284 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2269 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2286 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2287 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2288 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2289 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2290 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2289 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2292 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2294 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2295 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2296 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2297 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2299 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(3, 2294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2293 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2301 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2301, __pyx_L1_error) + + /* "PyCafe.pyx":2292 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2302 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # This paragraph should be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_3, 0, Py_None); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2287 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2305 + * + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2306 + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2305 + * + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2307 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2309 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2310 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2311 + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2312 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2313 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2308 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2314 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2314, __pyx_L1_error) + + /* "PyCafe.pyx":2307 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + */ + } + + /* "PyCafe.pyx":2315 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2286 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2317 + * return [None] + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2318 + * + * cdef unsigned int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * #print ("dtcheck input/native", dtcheck, dt, dtr) + */ + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafe.pyx":2322 + * #print ("dtcheck input/native", dtcheck, dt, dtr) + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + */ + __pyx_v_nelemNative = __pyx_v_self->hh.getNelemNative(__pyx_v_handle); + + /* "PyCafe.pyx":2323 + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + */ + __pyx_v_nelemClient = __pyx_v_self->hh.getNelemClient(__pyx_v_handle); + + /* "PyCafe.pyx":2324 + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemMethod = nelemClient + */ + __pyx_v_nelemRequest = __pyx_v_self->hh.getNelemRequest(__pyx_v_handle); + + /* "PyCafe.pyx":2326 + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + * cdef unsigned int nelemMethod = nelemClient # <<<<<<<<<<<<<< + * + * cdef dbr_string_t * valStringArray + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2338 + * # cdef vector[float] valFloatVector + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2340 + * if dtcheck in [CAFE_STRING]: + * + * valStringArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_string_t)) + * + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2343 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2344 + * + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_valStringArray); + } + + /* "PyCafe.pyx":2343 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2346 + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2347 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valStringArray[i]) + * free(valStringArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2348 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2348, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2349 + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":2350 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2351 + * free(valStringArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_CHAR]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2350 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2338 + * # cdef vector[float] valFloatVector + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":2355 + * elif dtcheck in [CAFE_CHAR]: + * + * valCharArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_char_t)) + * + */ + __pyx_v_valCharArray = ((dbr_char_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_char_t))))); + + /* "PyCafe.pyx":2358 + * nelemMethod * sizeof(dbr_char_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2359 + * + * with nogil: + * status = self._c_cafe.getCharArray(handle, valCharArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCharArray(__pyx_v_handle, __pyx_v_valCharArray); + } + + /* "PyCafe.pyx":2358 + * nelemMethod * sizeof(dbr_char_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L20; + } + __pyx_L20:; + } + } + + /* "PyCafe.pyx":2361 + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2362 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valCharArray[i]) + * free(valCharArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2363 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) # <<<<<<<<<<<<<< + * free(valCharArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_dbr_char_t((__pyx_v_valCharArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2364 + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) + * free(valCharArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valCharArray); + + /* "PyCafe.pyx":2365 + * ll.append(valCharArray[i]) + * free(valCharArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2366 + * free(valCharArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2365 + * ll.append(valCharArray[i]) + * free(valCharArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2353 + * return ll + * + * elif dtcheck in [CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * valCharArray = malloc( + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":2370 + * elif dtcheck in [CAFE_LONG]: + * + * valIntArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_long_t)) + * + */ + __pyx_v_valIntArray = ((dbr_long_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_long_t))))); + + /* "PyCafe.pyx":2373 + * nelemMethod * sizeof(dbr_long_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2374 + * + * with nogil: + * status = self._c_cafe.getLongArray(handle, valIntArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLongArray(__pyx_v_handle, __pyx_v_valIntArray); + } + + /* "PyCafe.pyx":2373 + * nelemMethod * sizeof(dbr_long_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L26; + } + __pyx_L26:; + } + } + + /* "PyCafe.pyx":2376 + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2377 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valIntArray[i]) + * free(valIntArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2378 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) # <<<<<<<<<<<<<< + * free(valIntArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_dbr_long_t((__pyx_v_valIntArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2379 + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + * free(valIntArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valIntArray); + + /* "PyCafe.pyx":2380 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2381 + * free(valIntArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2380 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2368 + * return ll + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * valIntArray = malloc( + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2385 + * elif dtcheck in [CAFE_SHORT]: + * + * valShortArray = malloc(nelemMethod * sizeof(short)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valShortArray = ((short *)malloc((__pyx_v_nelemMethod * (sizeof(short))))); + + /* "PyCafe.pyx":2387 + * valShortArray = malloc(nelemMethod * sizeof(short)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2388 + * + * with nogil: + * status = self._c_cafe.getShortArray(handle, valShortArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getShortArray(__pyx_v_handle, __pyx_v_valShortArray); + } + + /* "PyCafe.pyx":2387 + * valShortArray = malloc(nelemMethod * sizeof(short)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L32; + } + __pyx_L32:; + } + } + + /* "PyCafe.pyx":2390 + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2391 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valShortArray[i]) + * free(valShortArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2392 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) # <<<<<<<<<<<<<< + * free(valShortArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_short((__pyx_v_valShortArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2393 + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) + * free(valShortArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valShortArray); + + /* "PyCafe.pyx":2394 + * ll.append(valShortArray[i]) + * free(valShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * elif dtcheck in [CAFE_FLOAT]: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2395 + * free(valShortArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * elif dtcheck in [CAFE_FLOAT]: + * ''' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2394 + * ll.append(valShortArray[i]) + * free(valShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * elif dtcheck in [CAFE_FLOAT]: + */ + } + + /* "PyCafe.pyx":2383 + * return ll + * + * elif dtcheck in [CAFE_SHORT]: # <<<<<<<<<<<<<< + * + * valShortArray = malloc(nelemMethod * sizeof(short)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":2409 + * + * # Speedier than vectors + * valFloatArray = malloc(nelemMethod * sizeof(float)) # <<<<<<<<<<<<<< + * # start=time.time() + * # for i in range (0, 10000): + */ + __pyx_v_valFloatArray = ((float *)malloc((__pyx_v_nelemMethod * (sizeof(float))))); + + /* "PyCafe.pyx":2413 + * # for i in range (0, 10000): + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, valFloatArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2414 + * + * with nogil: + * status = self._c_cafe.getFloatArray(handle, valFloatArray) # <<<<<<<<<<<<<< + * + * # end=time.time() + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getFloatArray(__pyx_v_handle, __pyx_v_valFloatArray); + } + + /* "PyCafe.pyx":2413 + * # for i in range (0, 10000): + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, valFloatArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L38; + } + __pyx_L38:; + } + } + + /* "PyCafe.pyx":2419 + * #print ("END TIME FLOAT", end - start) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2420 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valFloatArray[i]) + * free(valFloatArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2421 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) # <<<<<<<<<<<<<< + * free(valFloatArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_valFloatArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2422 + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) + * free(valFloatArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valFloatArray); + + /* "PyCafe.pyx":2423 + * ll.append(valFloatArray[i]) + * free(valFloatArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2424 + * free(valFloatArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2423 + * ll.append(valFloatArray[i]) + * free(valFloatArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2396 + * if status == ICAFE_NORMAL: + * return ll + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * ''' + * valFloatVector.reserve(nelemMethod) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2428 + * elif dtcheck in [CAFE_DOUBLE]: + * + * valDoubleArray = malloc(nelemMethod * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valDoubleArray = ((double *)malloc((__pyx_v_nelemMethod * (sizeof(double))))); + + /* "PyCafe.pyx":2430 + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2431 + * + * with nogil: + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_valDoubleArray); + } + + /* "PyCafe.pyx":2430 + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L44; + } + __pyx_L44:; + } + } + + /* "PyCafe.pyx":2433 + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2434 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2435 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) # <<<<<<<<<<<<<< + * free(valDoubleArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_valDoubleArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2435, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2436 + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valDoubleArray); + + /* "PyCafe.pyx":2437 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2438 + * free(valDoubleArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_ENUM: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2437 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2426 + * return ll + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":2443 + * + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( + * nelemMethod * sizeof(dbr_string_t)) + */ + __pyx_t_5 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2444 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * valStringArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_string_t)) + * + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2447 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray( + * handle, valStringArray) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2448 + * + * with nogil: + * status = self._c_cafe.getDbrStringArray( # <<<<<<<<<<<<<< + * handle, valStringArray) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_valStringArray); + } + + /* "PyCafe.pyx":2447 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray( + * handle, valStringArray) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L51; + } + __pyx_L51:; + } + } + + /* "PyCafe.pyx":2451 + * handle, valStringArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2452 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valStringArray[i]) + * free(valStringArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2453 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2453, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2454 + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":2455 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2456 + * free(valStringArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * else: + * valUShortArray = malloc( + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2455 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + } + + /* "PyCafe.pyx":2443 + * + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( + * nelemMethod * sizeof(dbr_string_t)) + */ + goto __pyx_L48; + } + + /* "PyCafe.pyx":2458 + * return ll + * else: + * valUShortArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: + */ + /*else*/ { + + /* "PyCafe.pyx":2459 + * else: + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getUShortArray( + */ + __pyx_v_valUShortArray = ((dbr_enum_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_enum_t))))); + + /* "PyCafe.pyx":2460 + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getUShortArray( + * handle, valUShortArray) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2461 + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: + * status = self._c_cafe.getUShortArray( # <<<<<<<<<<<<<< + * handle, valUShortArray) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getUShortArray(__pyx_v_handle, __pyx_v_valUShortArray); + } + + /* "PyCafe.pyx":2460 + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getUShortArray( + * handle, valUShortArray) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L57; + } + __pyx_L57:; + } + } + + /* "PyCafe.pyx":2464 + * handle, valUShortArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2465 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valUShortArray[i]) + * free(valUShortArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_6 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2466 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) # <<<<<<<<<<<<<< + * free(valUShortArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_dbr_enum_t((__pyx_v_valUShortArray[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 2466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2467 + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) + * free(valUShortArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valUShortArray); + + /* "PyCafe.pyx":2468 + * ll.append(valUShortArray[i]) + * free(valUShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * # Will not happen; already covered above + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2469 + * free(valUShortArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2468 + * ll.append(valUShortArray[i]) + * free(valUShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * # Will not happen; already covered above + */ + } + } + __pyx_L48:; + + /* "PyCafe.pyx":2440 + * return ll + * + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * # if enum, string taken as native + */ + break; + case CAFE_NO_ACCESS: + + /* "PyCafe.pyx":2471 + * return ll + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + */ + case CAFE_TYPENOTCONN: + + /* "PyCafe.pyx":2472 + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * print("Channel", self._c_cafe.getPVFromHandle( # <<<<<<<<<<<<<< + * handle), " not connected") + * return None + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_n_u_Channel); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_not_connected); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_not_connected); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2474 + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + * return None # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def getAsList should never appear!") + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2471 + * return ll + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + */ + break; + default: + + /* "PyCafe.pyx":2476 + * return None + * else: + * print("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2477 + * else: + * print("This line in PyCafe def getAsList should never appear!") + * return None # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":2479 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2480 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2481 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_5 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2482 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2481 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L63; + } + + /* "PyCafe.pyx":2484 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions is False: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L63:; + + /* "PyCafe.pyx":2480 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2485 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = ((__pyx_v_self->_enable_exceptions == 0) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2487 + * if self._enable_exceptions is False: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2488 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2489 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2490 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2491 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2486 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2492 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return None + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2492, __pyx_L1_error) + + /* "PyCafe.pyx":2485 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2494 + * raise _cafeException + * + * return None # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2479 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2260 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2498 + * ################################################################################## + * + * def getStrArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='str', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_255getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_255getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStrArray") < 0)) __PYX_ERR(3, 2498, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStrArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2498, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 2498, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_254getStrArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_254getStrArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrArray", 0); + + /* "PyCafe.pyx":2499 + * + * def getStrArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='str', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 2499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 2499, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2498 + * ################################################################################## + * + * def getStrArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='str', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2503 + * + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='int', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_257getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_257getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIntArray") < 0)) __PYX_ERR(3, 2503, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getIntArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2503, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 2503, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_256getIntArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_256getIntArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntArray", 0); + + /* "PyCafe.pyx":2504 + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='int', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 2504, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 2504, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2503 + * + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='int', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2508 + * + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='float', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloatArray") < 0)) __PYX_ERR(3, 2508, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloatArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2508, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 2508, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_258getFloatArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_258getFloatArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatArray", 0); + + /* "PyCafe.pyx":2509 + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='float', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 2509, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 2509, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2508 + * + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='float', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2514 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,&__pyx_n_s_art,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getArray") < 0)) __PYX_ERR(3, 2514, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_art = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getArray", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 2514, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 2514, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 2514, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_260getArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_260getArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + short *__pyx_v_i16val; + int *__pyx_v_ival; + double *__pyx_v_dval; + float *__pyx_v_fval; + dbr_string_t *__pyx_v_sval; + __Pyx_memviewslice __pyx_v_mvShort = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvDouble = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvFloat = { 0, 0, { 0 }, { 0 }, { 0 } }; + long __pyx_v_dtr; + int __pyx_v_status; + unsigned int __pyx_v_i; + unsigned int __pyx_v_ij; + arrayobject *__pyx_v_a = 0; + __Pyx_memviewslice __pyx_v_mvUInt8 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt8 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvUInt32 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt32 = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_dtcheck; + CYTHON_UNUSED unsigned int __pyx_v_nelemNative; + unsigned int __pyx_v_nelemClient; + CYTHON_UNUSED unsigned int __pyx_v_nelemRequest; + unsigned int __pyx_v_nelemMethod; + unsigned int __pyx_v_nelemMemory; + CYTHON_UNUSED PyObject *__pyx_v_locallist = NULL; + PyObject *__pyx_v_mvStr = NULL; + PyObject *__pyx_v_arrayArray = NULL; + PyObject *__pyx_v_ctypesArray = NULL; + PyObject *__pyx_v_ctypesArray16 = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + unsigned int __pyx_t_11; + unsigned int __pyx_t_12; + int __pyx_t_13; + __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_15; + int __pyx_t_16; + __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_18; + __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_20; + size_t __pyx_t_21; + size_t __pyx_t_22; + size_t __pyx_t_23; + __Pyx_memviewslice __pyx_t_24 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_25; + __Pyx_memviewslice __pyx_t_26 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_27; + __Pyx_memviewslice __pyx_t_28 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_29; + size_t __pyx_t_30; + size_t __pyx_t_31; + __Pyx_memviewslice __pyx_t_32 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_33; + size_t __pyx_t_34; + size_t __pyx_t_35; + __Pyx_memviewslice __pyx_t_36 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_37; + size_t __pyx_t_38; + size_t __pyx_t_39; + __Pyx_RefNannySetupContext("getArray", 0); + + /* "PyCafe.pyx":2533 + * # hence C contiguous. + * + * cdef str _METHOD = "getArray" # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * ''' + */ + __Pyx_INCREF(__pyx_n_u_getArray); + __pyx_v__METHOD = __pyx_n_u_getArray; + + /* "PyCafe.pyx":2534 + * + * cdef str _METHOD = "getArray" + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * ''' + * cdef unsigned int handle = 0 + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2534, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2560 + * # str [:,::1] mvStr + * cnp.ndarray arr + * long dtr = 0 # <<<<<<<<<<<<<< + * int status + * # cvarray mvDoubleArray + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2582 + * # cdef PVDataHolder pvd + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2584 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2585 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2586 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2587 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2586 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2589 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2585 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2590 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2592 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + + /* "PyCafe.pyx":2593 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2594 + * _type='CafeError', _source=_METHOD, + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2595 + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2596 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2591 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _handle=handle, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2597 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2597, __pyx_L1_error) + + /* "PyCafe.pyx":2590 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":2599 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2584 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2601 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2602 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2603 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2604 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2605 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2604 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2607 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2609 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2610 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2611 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2612 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2614 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(3, 2609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2608 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2616 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2616, __pyx_L1_error) + + /* "PyCafe.pyx":2607 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2617 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_3, 0, Py_None); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2602 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2620 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2621 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2620 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2622 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2624 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2625 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2626 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2627 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2628 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(3, 2624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2623 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2629 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 2629, __pyx_L1_error) + + /* "PyCafe.pyx":2622 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2630 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2601 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2632 + * return [None] + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtr) + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2634 + * cdef unsigned int dtcheck = dtr + * + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + */ + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafe.pyx":2636 + * dtcheck = getMatchedDataType(dt, dtr) + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + */ + __pyx_v_nelemNative = __pyx_v_self->hh.getNelemNative(__pyx_v_handle); + + /* "PyCafe.pyx":2637 + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + */ + __pyx_v_nelemClient = __pyx_v_self->hh.getNelemClient(__pyx_v_handle); + + /* "PyCafe.pyx":2638 + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemMethod = nelemClient + */ + __pyx_v_nelemRequest = __pyx_v_self->hh.getNelemRequest(__pyx_v_handle); + + /* "PyCafe.pyx":2640 + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + * cdef unsigned int nelemMethod = nelemClient # <<<<<<<<<<<<<< + * # previously nelemNative - has to be at least size of nelemClient + * cdef unsigned int nelemMemory = nelemClient + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2642 + * cdef unsigned int nelemMethod = nelemClient + * # previously nelemNative - has to be at least size of nelemClient + * cdef unsigned int nelemMemory = nelemClient # <<<<<<<<<<<<<< + * + * #print('native', self.hh.getNelemNative(handle)) + */ + __pyx_v_nelemMemory = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2654 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + case CAFE_ENUM: + + /* "PyCafe.pyx":2655 + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, sval) + */ + __pyx_v_sval = ((char (*)[40])malloc((__pyx_v_nelemMemory * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2656 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, sval) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2657 + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, sval) # <<<<<<<<<<<<<< + * + * # http://cython.readthedocs.org/en/latest/src/tutorial/numpy.html + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_sval); + } + + /* "PyCafe.pyx":2656 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, sval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2662 + * # Some data types are not yet supported, like boolean arrays and string arrays. + * + * locallist = [] # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_locallist = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2664 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2666 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2666, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2666, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2666, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2666, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2666, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L17_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2670 + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + * + * mvStr = np.empty(nelemMethod, dtype=(np.str_, 40)) # <<<<<<<<<<<<<< + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2673 + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + * + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * # print sval[i].decode('utf8'), i + * mvStr[i] = str(sval[i]) # .decode('utf8') + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":2675 + * for i in range(0, nelemMethod): + * # print sval[i].decode('utf8'), i + * mvStr[i] = str(sval[i]) # .decode('utf8') # <<<<<<<<<<<<<< + * # locallist.append(sval[i]) + * + */ + __pyx_t_9 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2678 + * # locallist.append(sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * + * return np.array(mvStr) + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2680 + * free(sval) + * + * return np.array(mvStr) # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_mvStr) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_mvStr); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2666 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2682 + * return np.array(mvStr) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2682, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2682, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2682, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L24_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2683 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2684 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2683, __pyx_L1_error) + + /* "PyCafe.pyx":2683 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvStr = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2686 + * np.str_, 40), order='C') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvStr[ij] = str(sval[ij]) + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2687 + * + * for ij in range(0, nelemMethod): + * mvStr[ij] = str(sval[ij]) # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2688 + * for ij in range(0, nelemMethod): + * mvStr[ij] = str(sval[ij]) + * free(sval) # <<<<<<<<<<<<<< + * + * return memoryview(mvStr) + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2690 + * free(sval) + * + * return memoryview(mvStr) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_mvStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2682 + * return np.array(mvStr) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2692 + * return memoryview(mvStr) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2692, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L29_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2692, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L29_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2693 + * + * elif art in ['array', 'array.array']: + * print( # <<<<<<<<<<<<<< + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2697 + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + * #arrayArray=array.array('u', 'hello \u2641') + * arrayArray = [] # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_arrayArray = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2698 + * #arrayArray=array.array('u', 'hello \u2641') + * arrayArray = [] + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(str(sval[ij])) + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2699 + * arrayArray = [] + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) # <<<<<<<<<<<<<< + * free(sval) + * return arrayArray + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_arrayArray, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 2699, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2700 + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) + * free(sval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2701 + * arrayArray.append(str(sval[ij])) + * free(sval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2692 + * return memoryview(mvStr) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2703 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2703, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2703, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L33_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2705 + * elif art in ['ctypes', 'ctype']: + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_ctypesArray = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2706 + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2707 + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') # <<<<<<<<<<<<<< + * free(sval) + * return ctypesArray + */ + __pyx_t_8 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_kp_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2708 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2709 + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2703 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2712 + * + * else: + * print("Unknown array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2713 + * else: + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Unknown_array_type_in_user_reque); + __Pyx_GIVEREF(__pyx_kp_u_Unknown_array_type_in_user_reque); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unknown_array_type_in_user_reque); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2712 + * + * else: + * print("Unknown array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2714 + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2715 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2716 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2717 + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2716, __pyx_L1_error) + + /* "PyCafe.pyx":2716 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2718 + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvStr[ij] = sval[ij] + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2719 + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_9 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2719, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2720 + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2722 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + } + __pyx_L16:; + + /* "PyCafe.pyx":2664 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":2654 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2724 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemMemory * sizeof(np.int16)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":2726 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + * + * i16val = malloc(nelemMemory * sizeof(np.int16)) # <<<<<<<<<<<<<< + * # start=time.time() + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_i16val = ((short *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2728 + * i16val = malloc(nelemMemory * sizeof(np.int16)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, i16val) + * # end=time.time() + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2729 + * # start=time.time() + * with nogil: + * status = self._c_cafe.getShortArray(handle, i16val) # <<<<<<<<<<<<<< + * # end=time.time() + * #print ("END TIME SHORT", end - start) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getShortArray(__pyx_v_handle, __pyx_v_i16val); + } + + /* "PyCafe.pyx":2728 + * i16val = malloc(nelemMemory * sizeof(np.int16)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, i16val) + * # end=time.time() + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L41; + } + __pyx_L41:; + } + } + + /* "PyCafe.pyx":2732 + * # end=time.time() + * #print ("END TIME SHORT", end - start) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2735 + * # 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']: # <<<<<<<<<<<<<< + * + * # ##mvInt=ival + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2735, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2735, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2735, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2735, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2735, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L44_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2741 + * # ##set_base(arr, ival) + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2741, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2741, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2741, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2741, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L50_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2742 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2743 + * 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] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":2742 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2743 + * 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] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(3, 2743, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2743, __pyx_L1_error) + + /* "PyCafe.pyx":2742 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(3, 2742, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":2744 + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2745 + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvShort) + */ + __pyx_t_15 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_15 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2745, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_15)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2746 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvShort) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2747 + * mvShort[ij] = i16val[ij] + * free(i16val) + * return np.array(mvShort) # <<<<<<<<<<<<<< + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_10 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2741 + * # ##set_base(arr, ival) + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + goto __pyx_L49; + } + + /* "PyCafe.pyx":2749 + * 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') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2749, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L56_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2750 + * + * 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): + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2751 + * 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] = i16val[ij] + */ + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "PyCafe.pyx":2750 + * + * 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): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":2751 + * 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] = i16val[ij] + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 2751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2751, __pyx_L1_error) + + /* "PyCafe.pyx":2750 + * + * 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): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(3, 2750, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvInt8 = __pyx_t_17; + __pyx_t_17.memview = NULL; + __pyx_t_17.data = NULL; + + /* "PyCafe.pyx":2752 + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2753 + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvInt8) + */ + __pyx_t_18 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_mvInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2753, __pyx_L1_error) + } + *((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int8_t *) __pyx_v_mvInt8.data) + __pyx_t_18)) )) = ((__pyx_t_5numpy_int8_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2754 + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2755 + * mvInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvInt8) # <<<<<<<<<<<<<< + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int8_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2749 + * 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') + */ + goto __pyx_L49; + } + + /* "PyCafe.pyx":2757 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2757, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2757, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2757, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L64_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2758 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2759 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2758 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2759 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 2759, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2759, __pyx_L1_error) + + /* "PyCafe.pyx":2758 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(3, 2758, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvUInt8 = __pyx_t_19; + __pyx_t_19.memview = NULL; + __pyx_t_19.data = NULL; + + /* "PyCafe.pyx":2760 + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2761 + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvUInt8) + */ + __pyx_t_20 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_20 >= (size_t)__pyx_v_mvUInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2761, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint8_t *) __pyx_v_mvUInt8.data) + __pyx_t_20)) )) = ((__pyx_t_5numpy_uint8_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2762 + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvUInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2763 + * mvUInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvUInt8) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvUInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint8_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2757 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + */ + goto __pyx_L49; + } + + /* "PyCafe.pyx":2767 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2768 + * + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2767 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2768 + * + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int16); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(3, 2768, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2768, __pyx_L1_error) + + /* "PyCafe.pyx":2767 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(3, 2767, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":2770 + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * # mvShortNP=cnp.asarray(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2771 + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * # mvShortNP=cnp.asarray(i16val) + * + */ + __pyx_t_21 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_21 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2771, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_21)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2775 + * + * # aaa=np.full(nelemMethod,ival + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":2779 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2779, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L71_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2779, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L71_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2779, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L71_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2780 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2780, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(3, 2780, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":2781 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2782 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2782, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_22)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2783 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return memoryview(mvShort) + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2785 + * free(i16val) + * + * return memoryview(mvShort) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2779 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":2787 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('h') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2787, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L76_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2787, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L76_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2789 + * elif art in ['array', 'array.array']: + * + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_a = ((arrayobject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2790 + * + * a = array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append( < short > i16val[ij]) + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2791 + * a = array.array('h') + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) # <<<<<<<<<<<<<< + * free(i16val) + * return a + */ + __pyx_t_4 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 2791, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2792 + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return a + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2793 + * a.append( < short > i16val[ij]) + * free(i16val) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":2787 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('h') + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":2795 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2795, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L80_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2795, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L80_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2797 + * elif art in ['ctypes', 'ctype']: + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ctypesArray16 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2798 + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray16[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2799 + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return ctypesArray16 + */ + __pyx_t_4 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray16, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2800 + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray16 + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2801 + * ctypesArray16[ij] = i16val[ij] + * free(i16val) + * return ctypesArray16 # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray16); + __pyx_r = __pyx_v_ctypesArray16; + goto __pyx_L0; + + /* "PyCafe.pyx":2795 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":2804 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2805 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2804 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2806 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2807 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2808 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2808, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(3, 2808, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":2809 + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2810 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_23 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2810, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_23)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2811 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2813 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L43:; + + /* "PyCafe.pyx":2732 + * # end=time.time() + * #print ("END TIME SHORT", end - start) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":2724 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemMemory * sizeof(np.int16)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":2817 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc(nelemMemory * sizeof(np.int32)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLongArray(handle, ival) + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_ival = ((int *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_3))))); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2818 + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, ival) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2819 + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: + * status = self._c_cafe.getLongArray(handle, ival) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLongArray(__pyx_v_handle, __pyx_v_ival); + } + + /* "PyCafe.pyx":2818 + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, ival) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L88; + } + __pyx_L88:; + } + } + + /* "PyCafe.pyx":2821 + * status = self._c_cafe.getLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2826 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2826, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2826, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2826, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2826, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2826, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L91_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2830 + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + * + * if dt in ['np.int32', 'int32']: # <<<<<<<<<<<<<< + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int32, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2830, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L97_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2830, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L97_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2831 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2832 + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2831 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2832 + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 2832, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2832, __pyx_L1_error) + + /* "PyCafe.pyx":2831 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(3, 2831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvInt32 = __pyx_t_24; + __pyx_t_24.memview = NULL; + __pyx_t_24.data = NULL; + + /* "PyCafe.pyx":2833 + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt32[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2834 + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvInt32) + */ + __pyx_t_25 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_25 >= (size_t)__pyx_v_mvInt32.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2834, __pyx_L1_error) + } + *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int32_t *) __pyx_v_mvInt32.data) + __pyx_t_25)) )) = ((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2835 + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2836 + * mvInt32[ij] = ival[ij] + * free(ival) + * return np.array(mvInt32) # <<<<<<<<<<<<<< + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvInt32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int32_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2830 + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + * + * if dt in ['np.int32', 'int32']: # <<<<<<<<<<<<<< + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + */ + goto __pyx_L96; + } + + /* "PyCafe.pyx":2837 + * free(ival) + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: # <<<<<<<<<<<<<< + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_uint32, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2837, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L101_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uint32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2837, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L101_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2838 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2839 + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":2838 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2839 + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 2839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2839, __pyx_L1_error) + + /* "PyCafe.pyx":2838 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_26.memview)) __PYX_ERR(3, 2838, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvUInt32 = __pyx_t_26; + __pyx_t_26.memview = NULL; + __pyx_t_26.data = NULL; + + /* "PyCafe.pyx":2840 + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt32[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2841 + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvUInt32) + */ + __pyx_t_27 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_27 >= (size_t)__pyx_v_mvUInt32.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2841, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_mvUInt32.data) + __pyx_t_27)) )) = ((__pyx_t_5numpy_uint32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2842 + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvUInt32) + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2843 + * mvUInt32[ij] = ival[ij] + * free(ival) + * return np.array(mvUInt32) # <<<<<<<<<<<<<< + * + * # elif dt in ['np.int64','int64']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvUInt32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2837 + * free(ival) + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: # <<<<<<<<<<<<<< + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + */ + goto __pyx_L96; + } + + /* "PyCafe.pyx":2859 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2860 + * else: + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2859 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2860 + * else: + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(3, 2860, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2860, __pyx_L1_error) + + /* "PyCafe.pyx":2859 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(3, 2859, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvInt = __pyx_t_28; + __pyx_t_28.memview = NULL; + __pyx_t_28.data = NULL; + + /* "PyCafe.pyx":2861 + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2862 + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvInt) # arr + */ + __pyx_t_29 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_29 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2862, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_29)) )) = ((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2863 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvInt) # arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2864 + * mvInt[ij] = ival[ij] + * free(ival) + * return np.array(mvInt) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_10 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L96:; + + /* "PyCafe.pyx":2826 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + */ + goto __pyx_L90; + } + + /* "PyCafe.pyx":2866 + * return np.array(mvInt) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2866, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L107_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2866, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L107_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2866, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L107_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2867 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2867, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(3, 2867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvInt = __pyx_t_28; + __pyx_t_28.memview = NULL; + __pyx_t_28.data = NULL; + + /* "PyCafe.pyx":2868 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2869 + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return memoryview(mvInt) + */ + __pyx_t_30 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_30 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2869, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_30)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2870 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return memoryview(mvInt) + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2871 + * mvInt[ij] = ival[ij] + * free(ival) + * return memoryview(mvInt) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2866 + * return np.array(mvInt) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L90; + } + + /* "PyCafe.pyx":2873 + * return memoryview(mvInt) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2873, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L112_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2873, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L112_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2874 + * + * elif art in ['array', 'array.array']: + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_a = ((arrayobject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2875 + * elif art in ['array', 'array.array']: + * a = array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append( < int > ival[ij]) + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2876 + * a = array.array('h') + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) # <<<<<<<<<<<<<< + * free(ival) + * return a + */ + __pyx_t_4 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 2876, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2877 + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return a + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2878 + * a.append( < int > ival[ij]) + * free(ival) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":2873 + * return memoryview(mvInt) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L90; + } + + /* "PyCafe.pyx":2880 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2880, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L116_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2880, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L116_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2881 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2882 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2883 + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return ctypesArray + */ + __pyx_t_4 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2884 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2885 + * ctypesArray[ij] = ival[ij] + * free(ival) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2880 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L90; + } + + /* "PyCafe.pyx":2888 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2889 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2888 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2890 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2891 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2892 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 2892, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(3, 2892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvInt = __pyx_t_28; + __pyx_t_28.memview = NULL; + __pyx_t_28.data = NULL; + + /* "PyCafe.pyx":2893 + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2894 + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_31 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_31 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2894, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_31)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2895 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":2896 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L90:; + + /* "PyCafe.pyx":2821 + * status = self._c_cafe.getLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":2815 + * return mvShort + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":2900 + * elif dtcheck in [CAFE_FLOAT]: + * + * fval = malloc(nelemMemory * sizeof(float)) # <<<<<<<<<<<<<< + * # start=time.time() + * with nogil: + */ + __pyx_v_fval = ((float *)malloc((__pyx_v_nelemMemory * (sizeof(float))))); + + /* "PyCafe.pyx":2902 + * fval = malloc(nelemMemory * sizeof(float)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, fval) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2903 + * # start=time.time() + * with nogil: + * status = self._c_cafe.getFloatArray(handle, fval) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getFloatArray(__pyx_v_handle, __pyx_v_fval); + } + + /* "PyCafe.pyx":2902 + * fval = malloc(nelemMemory * sizeof(float)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, fval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L124; + } + __pyx_L124:; + } + } + + /* "PyCafe.pyx":2910 + * # status=self._c_cafe.get(handle, pvd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_7 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2913 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.float16','np.float32']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2913, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L127_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2913, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L127_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2913, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L127_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2913, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L127_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2913, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L127_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2917 + * # elif dt in ['np.float16','np.float32']: + * + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(3, 2917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvFloat = __pyx_t_32; + __pyx_t_32.memview = NULL; + __pyx_t_32.data = NULL; + + /* "PyCafe.pyx":2918 + * + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) + * # arr=np.asarray(mvFloat) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2919 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * # arr=np.asarray(mvFloat) + * + */ + __pyx_t_33 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_33 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2919, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_33)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2922 + * # arr=np.asarray(mvFloat) + * + * free(fval) # <<<<<<<<<<<<<< + * + * #arr = np.ascontiguousarray(mvDouble) + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":2927 + * #set_base(arr, dval) + * + * return np.array(mvFloat) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2913 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.float16','np.float32']: + */ + goto __pyx_L126; + } + + /* "PyCafe.pyx":2929 + * return np.array(mvFloat) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2929, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L134_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2929, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L134_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2929, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L134_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2932 + * + * # Method A to return memory view + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(3, 2932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvFloat = __pyx_t_32; + __pyx_t_32.memview = NULL; + __pyx_t_32.data = NULL; + + /* "PyCafe.pyx":2933 + * # Method A to return memory view + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2934 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_34 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_34 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2934, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_34)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2936 + * mvFloat[ij] = fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * # memoryview(mvFloat).tolist() #tolist() only supports byte views + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":2939 + * # memoryview(mvFloat).tolist() #tolist() only supports byte views + * + * return memoryview(mvFloat) # <<<<<<<<<<<<<< + * + * # Method B to return memory view + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2929 + * return np.array(mvFloat) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L126; + } + + /* "PyCafe.pyx":2953 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('f') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 2953, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L139_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2953, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L139_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2955 + * elif art in ['array', 'array.array']: + * + * a = array.array('f') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_a = ((arrayobject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2957 + * a = array.array('f') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append(fval[ij]) + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2958 + * + * for ij in range(0, nelemMethod): + * a.append(fval[ij]) # <<<<<<<<<<<<<< + * free(fval) + * + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_13 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 2958, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2959 + * for ij in range(0, nelemMethod): + * a.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * + * return a + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":2961 + * free(fval) + * + * return a # <<<<<<<<<<<<<< + * ''' + * arrayArray=array.array('f') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":2953 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('f') + */ + goto __pyx_L126; + } + + /* "PyCafe.pyx":2981 + * ''' + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 2981, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L143_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 2981, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L143_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2982 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_float*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_float); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_ctypesArray = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2983 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = fval[ij] + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2984 + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return ctypesArray + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 2984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2985 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":2986 + * ctypesArray[ij] = fval[ij] + * free(fval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2981 + * ''' + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L126; + } + + /* "PyCafe.pyx":2989 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2990 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2989 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2991 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2992 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2993 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(3, 2993, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvFloat = __pyx_t_32; + __pyx_t_32.memview = NULL; + __pyx_t_32.data = NULL; + + /* "PyCafe.pyx":2994 + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2995 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return mvFloat + */ + __pyx_t_35 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_35 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 2995, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_35)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2996 + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":2997 + * mvFloat[ij] = fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L126:; + + /* "PyCafe.pyx":2910 + * # status=self._c_cafe.get(handle, pvd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":2898 + * return mvInt + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc(nelemMemory * sizeof(float)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3002 + * + * # start=time.time() + * dval = malloc(nelemMemory * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_dval = ((double *)malloc((__pyx_v_nelemMemory * (sizeof(double))))); + + /* "PyCafe.pyx":3004 + * dval = malloc(nelemMemory * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3006 + * with nogil: + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_dval); + } + + /* "PyCafe.pyx":3004 + * dval = malloc(nelemMemory * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L151; + } + __pyx_L151:; + } + } + + /* "PyCafe.pyx":3008 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3011 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['double', 'np.float_','np.float64']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3011, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L154_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 3011, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L154_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3011, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L154_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 3011, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L154_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3011, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L154_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3016 + * + * # mvDouble=dval + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_36 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_36.memview)) __PYX_ERR(3, 3016, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvDouble = __pyx_t_36; + __pyx_t_36.memview = NULL; + __pyx_t_36.data = NULL; + + /* "PyCafe.pyx":3017 + * # mvDouble=dval + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * # arr=np.asarray(mvDouble) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3018 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * # arr=np.asarray(mvDouble) + * free(dval) + */ + __pyx_t_37 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_37 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 3018, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_37)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3020 + * mvDouble[ij] = dval[ij] + * # arr=np.asarray(mvDouble) + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3023 + * # end=time.time() + * #print (end - start) + * return np.array(mvDouble) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3011 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['double', 'np.float_','np.float64']: + */ + goto __pyx_L153; + } + + /* "PyCafe.pyx":3025 + * return np.array(mvDouble) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 3025, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L161_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3025, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L161_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 3025, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L161_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3028 + * + * # Method A to return memory view + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_36 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_36.memview)) __PYX_ERR(3, 3028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvDouble = __pyx_t_36; + __pyx_t_36.memview = NULL; + __pyx_t_36.data = NULL; + + /* "PyCafe.pyx":3029 + * # Method A to return memory view + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3030 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * # end=time.time() + */ + __pyx_t_38 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_38 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 3030, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_38)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3031 + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3034 + * # end=time.time() + * #print (end - start) + * return memoryview(mvDouble) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3025 + * return np.array(mvDouble) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L153; + } + + /* "PyCafe.pyx":3036 + * return memoryview(mvDouble) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('d') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(3, 3036, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L166_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 3036, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L166_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3037 + * + * elif art in ['array', 'array.array']: + * a = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_v_a = ((arrayobject *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3038 + * elif art in ['array', 'array.array']: + * a = array.array('d') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append(dval[ij]) + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3039 + * a = array.array('d') + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) # <<<<<<<<<<<<<< + * free(dval) + * # end=time.time() + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_9); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(3, 3039, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3040 + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3043 + * # end=time.time() + * #print (end - start) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":3036 + * return memoryview(mvDouble) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('d') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L153; + } + + /* "PyCafe.pyx":3045 + * return a + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3045, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L170_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 3045, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L170_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3046 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_c_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_9 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_ctypesArray = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3047 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3048 + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return ctypesArray + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_9, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 3048, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3049 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3050 + * ctypesArray[ij] = dval[ij] + * free(dval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":3045 + * return a + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L153; + } + + /* "PyCafe.pyx":3053 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":3054 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":3053 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3055 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3056 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3057 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_36 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_36.memview)) __PYX_ERR(3, 3057, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvDouble = __pyx_t_36; + __pyx_t_36.memview = NULL; + __pyx_t_36.data = NULL; + + /* "PyCafe.pyx":3058 + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3059 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_39 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_39 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(3, 3059, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_39)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3060 + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3061 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L153:; + + /* "PyCafe.pyx":3008 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":2999 + * return mvFloat + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * # start=time.time() + */ + break; + default: break; + } + + /* "PyCafe.pyx":3063 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3064 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3065 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3066 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3065 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L178; + } + + /* "PyCafe.pyx":3068 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L178:; + + /* "PyCafe.pyx":3064 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3069 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3071 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_8) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3072 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3073 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3074 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3075 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(3, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3070 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":3076 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 3076, __pyx_L1_error) + + /* "PyCafe.pyx":3069 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":3078 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_8, 0, Py_None); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3063 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2514 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_26, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_28, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_36, 1); + __Pyx_AddTraceback("PyCafe.CyCafe.getArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvShort, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvDouble, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvFloat, 1); + __Pyx_XDECREF((PyObject *)__pyx_v_a); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvUInt8, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt8, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvUInt32, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt32, 1); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_locallist); + __Pyx_XDECREF(__pyx_v_mvStr); + __Pyx_XDECREF(__pyx_v_arrayArray); + __Pyx_XDECREF(__pyx_v_ctypesArray); + __Pyx_XDECREF(__pyx_v_ctypesArray16); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3086 + * ############################################################################ + * + * def getPVInt(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'int') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVInt(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVInt(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_262getPVInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_262getPVInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVInt", 0); + + /* "PyCafe.pyx":3087 + * + * def getPVInt(self, handlePV): + * return self.getPV(handlePV, 'int') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3087, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3087, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3086 + * ############################################################################ + * + * def getPVInt(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'int') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3091 + * + * ############################################################################ + * def getPVFloat(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'float') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_264getPVFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_264getPVFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVFloat", 0); + + /* "PyCafe.pyx":3092 + * ############################################################################ + * def getPVFloat(self, handlePV): + * return self.getPV(handlePV, 'float') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3092, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3092, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3091 + * + * ############################################################################ + * def getPVFloat(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'float') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3096 + * + * ############################################################################ + * def getPVStr(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'str') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVStr(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVStr(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_266getPVStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_266getPVStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVStr", 0); + + /* "PyCafe.pyx":3097 + * ############################################################################ + * def getPVStr(self, handlePV): + * return self.getPV(handlePV, 'str') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3097, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3097, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3096 + * + * ############################################################################ + * def getPVStr(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'str') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3101 + * + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPV" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPV (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPV") < 0)) __PYX_ERR(3, 3101, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPV", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3101, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 3101, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_268getPV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_268getPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PVDataHolder __pyx_v_pvd; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pvd_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PVDataHolder __pyx_t_10; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_11; + __Pyx_RefNannySetupContext("getPV", 0); + + /* "PyCafe.pyx":3102 + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): + * cdef str _METHOD = "getPV" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getPV); + __pyx_v__METHOD = __pyx_n_u_getPV; + + /* "PyCafe.pyx":3104 + * cdef str _METHOD = "getPV" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3106 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3107 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3107, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3106 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3108 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3109 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 3109, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3108 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3111 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_4); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 3111, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":3115 + * + * cdef int status + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + try { + __pyx_t_10 = PVDataHolder(__pyx_v_self->hh.getNelemNative(__pyx_v_handle)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3115, __pyx_L1_error) + } + __pyx_v_pvd = __pyx_t_10; + + /* "PyCafe.pyx":3117 + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.get(handle, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3118 + * + * with nogil: + * status = self._c_cafe.get(handle, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->get(__pyx_v_handle, __pyx_v_pvd); + } + + /* "PyCafe.pyx":3117 + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.get(handle, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3120 + * status = self._c_cafe.get(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3121 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3122 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3123 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3122 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":3125 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":3121 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3126 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3128 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3129 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3130 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3131 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 3128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3127 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3132 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 3132, __pyx_L1_error) + + /* "PyCafe.pyx":3126 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":3134 + * raise _cafeException + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * pvd_valnone.value[0] = None + * return pvd_valnone + */ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pvd_valnone = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3135 + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * pvd_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvd_valnone + * + */ + if (unlikely(__pyx_v_pvd_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 3135, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvd_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(3, 3135, __pyx_L1_error) + + /* "PyCafe.pyx":3136 + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * pvd_valnone.value[0] = None + * return pvd_valnone # <<<<<<<<<<<<<< + * + * return PVDataHolderToStruct(pvd, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvd_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvd_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":3120 + * status = self._c_cafe.get(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":3138 + * return pvd_valnone + * + * return PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3101 + * + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPV" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3146 + * ################################################################################## + * + * def getPVStrList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271getPVStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271getPVStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStrList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_270getPVStrList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_270getPVStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVStrList", 0); + + /* "PyCafe.pyx":3147 + * + * def getPVStrList(self, handleList): + * return self.getPVList(handleList, dt='str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 3147, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3146 + * ################################################################################## + * + * def getPVStrList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStrList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3151 + * + * ################################################################################## + * def getPVIntList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273getPVIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273getPVIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVIntList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_272getPVIntList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_272getPVIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVIntList", 0); + + /* "PyCafe.pyx":3152 + * ################################################################################## + * def getPVIntList(self, handleList): + * return self.getPVList(handleList, dt='int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 3152, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3151 + * + * ################################################################################## + * def getPVIntList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVIntList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3156 + * + * ################################################################################## + * def getPVFloatList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloatList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVFloatList", 0); + + /* "PyCafe.pyx":3157 + * ################################################################################## + * def getPVFloatList(self, handleList): + * return self.getPVList(handleList, dt='float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 3157, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3156 + * + * ################################################################################## + * def getPVFloatList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloatList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3161 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVList" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVList") < 0)) __PYX_ERR(3, 3161, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVList", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3161, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 3161, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_276getPVList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_276getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_hl = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + CAFEDataTypeCode __pyx_v_cdt; + PyObject *__pyx_v_pvdList = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_v_ll = NULL; + PyObject *__pyx_v_ld = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + int __pyx_t_14; + unsigned int __pyx_t_15; + long __pyx_t_16; + unsigned int __pyx_t_17; + __Pyx_RefNannySetupContext("getPVList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3162 + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): + * cdef str _METHOD = "getPVList" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getPVList); + __pyx_v__METHOD = __pyx_n_u_getPVList; + + /* "PyCafe.pyx":3164 + * cdef str _METHOD = "getPVList" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3165 + * + * if isinstance(handleList, (str, int, long)): + * hl = [] # <<<<<<<<<<<<<< + * hl.append(handleList) + * handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_hl = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3166 + * if isinstance(handleList, (str, int, long)): + * hl = [] + * hl.append(handleList) # <<<<<<<<<<<<<< + * handleList = [] + * handleList = hl + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_hl, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3166, __pyx_L1_error) + + /* "PyCafe.pyx":3167 + * hl = [] + * hl.append(handleList) + * handleList = [] # <<<<<<<<<<<<<< + * handleList = hl + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3168 + * hl.append(handleList) + * handleList = [] + * handleList = hl # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_hl); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_hl); + + /* "PyCafe.pyx":3164 + * cdef str _METHOD = "getPVList" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + } + + /* "PyCafe.pyx":3170 + * handleList = hl + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3171 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3171, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3170 + * handleList = hl + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3172 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3173 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3174 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3173 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 3173, __pyx_L1_error) + + /* "PyCafe.pyx":3172 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3192 + * # do this to avoid compiler warning messages + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3192, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3193 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3193, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3195 + * v.push_back(handleList[i]) + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * for i in range(0, v.size()): # len(handleList)): # + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":3197 + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + * + * for i in range(0, v.size()): # len(handleList)): # # <<<<<<<<<<<<<< + * pvd[i].setNelem(self.hh.getNelemNative(v[i])) # handleList[i])) + * # print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3198 + * + * for i in range(0, v.size()): # len(handleList)): # + * pvd[i].setNelem(self.hh.getNelemNative(v[i])) # handleList[i])) # <<<<<<<<<<<<<< + * # print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i + * + */ + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemNative((__pyx_v_v[__pyx_v_i])))); + } + + /* "PyCafe.pyx":3203 + * cdef int status + * + * if cacheFlag: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_cacheFlag); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 3203, __pyx_L1_error) + if (__pyx_t_3) { + + /* "PyCafe.pyx":3204 + * + * if cacheFlag: + * status = self._c_cafe.getCachePVArray(v, pvd) # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCachePVArray(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":3203 + * cdef int status + * + * if cacheFlag: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":3206 + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getPVArray(v, pvd) + * + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3207 + * else: + * with nogil: + * status = self._c_cafe.getPVArray(v, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getPVArray(__pyx_v_v, __pyx_v_pvd); + } + + /* "PyCafe.pyx":3206 + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + } + __pyx_L14:; + + /* "PyCafe.pyx":3209 + * status = self._c_cafe.getPVArray(v, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3210 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3211 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3210 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + */ + } + + /* "PyCafe.pyx":3212 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3213 + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3214 + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3215 + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":3214 + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4); + __pyx_t_6 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3216 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3217 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3218 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) + * print("") # <<<<<<<<<<<<<< + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3213 + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + } + + /* "PyCafe.pyx":3209 + * status = self._c_cafe.getPVArray(v, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3226 + * cdef CAFEDataTypeCode cdt + * + * pvdList = [] # <<<<<<<<<<<<<< + * cpdef pvdata p1 + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_pvdList = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3229 + * cpdef pvdata p1 + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3230 + * + * for i in range(0, v.size()): #len(handleList)): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":3232 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * localList = [] + * + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_dtcheck = __pyx_t_13; + + /* "PyCafe.pyx":3233 + * + * dtcheck = getMatchedDataType(dt, dtn) + * localList = [] # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_localList, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3235 + * localList = [] + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3236 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3237 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3236 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3239 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3238 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3241 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3240 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3244 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_v_self->_c_cafe->isEnum(__pyx_t_13) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3245 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3244 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":3247 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_CHAR: + * # ( pvd[i].getAsChar()) + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L26:; + + /* "PyCafe.pyx":3242 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3250 + * elif dtcheck == CAFE_CHAR: + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3248 + * else: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3252 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3251 + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3254 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) # no data + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3253 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":3256 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # no data # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3256, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":3235 + * localList = [] + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L25; + } + + /* "PyCafe.pyx":3259 + * + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3260 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3261 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3262 + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3262, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3260 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3264 + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3265 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3265, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3263 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3267 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3268 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3266 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3270 + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3272 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_v_self->_c_cafe->isEnum(__pyx_t_17) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3273 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3272 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L35; + } + + /* "PyCafe.pyx":3275 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L35:; + } + + /* "PyCafe.pyx":3269 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3277 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3279 + * for j in range(0, pvd[i].getNelem()): + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3276 + * else: + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # ( pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3281 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3282 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3280 + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3284 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3285 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3283 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":3287 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(0) # no data + * localList.append(localListInner) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":3288 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3288, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":3289 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * p1 = pvdata() + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3289, __pyx_L1_error) + } + __pyx_L25:; + + /* "PyCafe.pyx":3291 + * localList.append(localListInner) + * + * p1 = pvdata() # <<<<<<<<<<<<<< + * p1.value = localList + * p1.status = pvd[i].getStatus() + */ + __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3292 + * + * p1 = pvdata() + * p1.value = localList # <<<<<<<<<<<<<< + * p1.status = pvd[i].getStatus() + * p1.nelem = pvd[i].getNelem() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = __pyx_v_localList; + + /* "PyCafe.pyx":3293 + * p1 = pvdata() + * p1.value = localList + * p1.status = pvd[i].getStatus() # <<<<<<<<<<<<<< + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() + */ + __pyx_v_p1->status = (__pyx_v_pvd[__pyx_v_i]).getStatus(); + + /* "PyCafe.pyx":3294 + * p1.value = localList + * p1.status = pvd[i].getStatus() + * p1.nelem = pvd[i].getNelem() # <<<<<<<<<<<<<< + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + */ + __pyx_v_p1->nelem = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + + /* "PyCafe.pyx":3295 + * p1.status = pvd[i].getStatus() + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + */ + __pyx_v_p1->alarmStatus = (__pyx_v_pvd[__pyx_v_i]).getAlarmStatus(); + + /* "PyCafe.pyx":3296 + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() # <<<<<<<<<<<<<< + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + */ + __pyx_v_p1->alarmSeverity = (__pyx_v_pvd[__pyx_v_i]).getAlarmSeverity(); + + /* "PyCafe.pyx":3297 + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() # <<<<<<<<<<<<<< + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAlarmStatusAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->alarmStatusAsString); + __Pyx_DECREF(__pyx_v_p1->alarmStatusAsString); + __pyx_v_p1->alarmStatusAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3298 + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() # <<<<<<<<<<<<<< + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAlarmSeverityAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->alarmSeverityAsString); + __Pyx_DECREF(__pyx_v_p1->alarmSeverityAsString); + __pyx_v_p1->alarmSeverityAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3299 + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() # <<<<<<<<<<<<<< + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + */ + __pyx_v_p1->dataType = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":3300 + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) # <<<<<<<<<<<<<< + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cdt.message(__pyx_v_pvd->getDataType())); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->dataTypeAsString); + __Pyx_DECREF(__pyx_v_p1->dataTypeAsString); + __pyx_v_p1->dataTypeAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3301 + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_pvd->_etsNorm = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsUInt32(); + + /* "PyCafe.pyx":3303 + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * + * ll = [] # <<<<<<<<<<<<<< + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3304 + * + * ll = [] + * ll.append((pvd[i]._etsNorm).secPastEpoch) # <<<<<<<<<<<<<< + * ll.append((pvd[i]._etsNorm).nsec) + * p1.ts = ll + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int((__pyx_v_pvd[__pyx_v_i])._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3305 + * ll = [] + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) # <<<<<<<<<<<<<< + * p1.ts = ll + * + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int((__pyx_v_pvd[__pyx_v_i])._etsNorm.nsec); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3306 + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) + * p1.ts = ll # <<<<<<<<<<<<<< + * + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() + */ + __Pyx_INCREF(__pyx_v_ll); + __Pyx_GIVEREF(__pyx_v_ll); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = __pyx_v_ll; + + /* "PyCafe.pyx":3308 + * p1.ts = ll + * + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * ld = [] + */ + __pyx_v_pvd->_etsDate = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsDate(); + + /* "PyCafe.pyx":3310 + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() + * + * ld = [] # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ld, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3311 + * + * ld = [] + * ld.append((pvd[i]._etsDate).year) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.year); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3311, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3312 + * ld = [] + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.mon); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3313 + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.day); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3313, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3314 + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3314, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3315 + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.min); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3316 + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).nsec) + * p1.tsDate = ld + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.sec); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3317 + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) # <<<<<<<<<<<<<< + * p1.tsDate = ld + * + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_long((__pyx_v_pvd[__pyx_v_i])._etsDate.nsec); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3318 + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) + * p1.tsDate = ld # <<<<<<<<<<<<<< + * + * pvdList.append(p1) + */ + __Pyx_INCREF(__pyx_v_ld); + __Pyx_GIVEREF(__pyx_v_ld); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = __pyx_v_ld; + + /* "PyCafe.pyx":3320 + * p1.tsDate = ld + * + * pvdList.append(p1) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_pvdList, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3320, __pyx_L1_error) + } + + /* "PyCafe.pyx":3324 + * # free(pvd) + * + * return pvdList, status # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_v_pvdList); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3161 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVList" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_hl); + __Pyx_XDECREF(__pyx_v_pvdList); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3332 + * ################################################################################## + * + * def printStatusIfError(self, handleList, statusList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_statusList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printStatusIfError (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_statusList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statusList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("printStatusIfError", 1, 2, 2, 1); __PYX_ERR(3, 3332, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printStatusIfError") < 0)) __PYX_ERR(3, 3332, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = values[0]; + __pyx_v_statusList = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("printStatusIfError", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3332, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.printStatusIfError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_statusList); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_statusList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + PyObject *__pyx_v_statusListB = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + std::vector __pyx_t_14; + __Pyx_RefNannySetupContext("printStatusIfError", 0); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_INCREF(__pyx_v_statusList); + + /* "PyCafe.pyx":3334 + * def printStatusIfError(self, handleList, statusList): + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_printStatusIfError); + __pyx_v__METHOD = __pyx_n_u_printStatusIfError; + + /* "PyCafe.pyx":3336 + * cdef str _METHOD = "printStatusIfError" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3337 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3338 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3338, __pyx_L1_error) + + /* "PyCafe.pyx":3339 + * handleListB = [] + * handleListB.append(handleList) + * handleList = [] # <<<<<<<<<<<<<< + * handleList = handleListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3340 + * handleListB.append(handleList) + * handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3336 + * cdef str _METHOD = "printStatusIfError" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3342 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3343 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3343, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3342 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3344 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3345 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_4); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 3345, __pyx_L1_error) + + /* "PyCafe.pyx":3344 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3348 + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + * if isinstance(statusList, (int, long)): # <<<<<<<<<<<<<< + * statusListB = [] + * statusListB.append(statusList) + */ + __pyx_t_1 = PyInt_Check(__pyx_v_statusList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_statusList); + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L11_bool_binop_done:; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3349 + * + * if isinstance(statusList, (int, long)): + * statusListB = [] # <<<<<<<<<<<<<< + * statusListB.append(statusList) + * statusList = [] + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusListB = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3350 + * if isinstance(statusList, (int, long)): + * statusListB = [] + * statusListB.append(statusList) # <<<<<<<<<<<<<< + * statusList = [] + * statusList = statusListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_statusListB, __pyx_v_statusList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3350, __pyx_L1_error) + + /* "PyCafe.pyx":3351 + * statusListB = [] + * statusListB.append(statusList) + * statusList = [] # <<<<<<<<<<<<<< + * statusList = statusListB + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3352 + * statusListB.append(statusList) + * statusList = [] + * statusList = statusListB # <<<<<<<<<<<<<< + * + * if not isinstance(statusList, (list)): + */ + __Pyx_INCREF(__pyx_v_statusListB); + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_v_statusListB); + + /* "PyCafe.pyx":3348 + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + * if isinstance(statusList, (int, long)): # <<<<<<<<<<<<<< + * statusListB = [] + * statusListB.append(statusList) + */ + } + + /* "PyCafe.pyx":3354 + * statusList = statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be of of type ")) + */ + __pyx_t_1 = PyList_Check(__pyx_v_statusList); + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3355 + * + * if not isinstance(statusList, (list)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Second input argument should be of of type ")) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_should_be); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_should_be); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_kp_u_Second_input_argument_should_be); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 3355, __pyx_L1_error) + + /* "PyCafe.pyx":3354 + * statusList = statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be of of type ")) + */ + } + + /* "PyCafe.pyx":3358 + * "Second input argument should be of of type ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be a of of type ")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_statusList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_1 = PyFloat_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3359 + * + * if not isinstance(statusList[0], (int, long, float)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Second input argument should be a of of type ")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_should_be_2); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_should_be_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_Second_input_argument_should_be_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 3359, __pyx_L1_error) + + /* "PyCafe.pyx":3358 + * "Second input argument should be of of type ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be a of of type ")) + */ + } + + /* "PyCafe.pyx":3365 + * # do next step to avoid: + * # warning: comparison between signed and unsigned integer expressions + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3365, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3367 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * self._c_cafe.printStatusIfError(v, statusList) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3367, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3367, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3369 + * v.push_back(handleList[i]) + * + * self._c_cafe.printStatusIfError(v, statusList) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_14 = __pyx_convert_vector_from_py_int(__pyx_v_statusList); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3369, __pyx_L1_error) + (void)(__pyx_v_self->_c_cafe->printStatusIfError(__pyx_v_v, __pyx_t_14)); + + /* "PyCafe.pyx":3370 + * + * self._c_cafe.printStatusIfError(v, statusList) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":3332 + * ################################################################################## + * + * def printStatusIfError(self, handleList, statusList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.printStatusIfError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_statusListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3375 + * + * ################################################################################## + * def getAsyn(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getAsyn" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getAsyn(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getAsyn(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getAsyn (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_280getAsyn(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_280getAsyn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + __Pyx_RefNannySetupContext("getAsyn", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3377 + * def getAsyn(self, handleList): + * ################################################################################## + * cdef str _METHOD = "getAsyn" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getAsyn); + __pyx_v__METHOD = __pyx_n_u_getAsyn; + + /* "PyCafe.pyx":3379 + * cdef str _METHOD = "getAsyn" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3380 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3381 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3381, __pyx_L1_error) + + /* "PyCafe.pyx":3383 + * handleListB.append(handleList) + * #handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3379 + * cdef str _METHOD = "getAsyn" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3385 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3386 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3386, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3385 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3387 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3388 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_4); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 3388, __pyx_L1_error) + + /* "PyCafe.pyx":3387 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3393 + * cdef vector[unsigned int] v + * cdef vector[int] vStatus + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3393, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_10); + + /* "PyCafe.pyx":3394 + * cdef vector[int] vStatus + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * # do next step to avoid: + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3394, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_10); + + /* "PyCafe.pyx":3398 + * # do next step to avoid: + * # warning: comparison between signed and unsigned integer expressions + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3398, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3400 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3400, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3404 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3405 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * if (status != ICAFE_NORMAL): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3404 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":3407 + * status = self._c_cafe.getV(v, vStatus) + * + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3408 + * + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3409 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3410 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3408 + * + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3407 + * status = self._c_cafe.getV(v, vStatus) + * + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + */ + } + + /* "PyCafe.pyx":3412 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __pyx_t_6 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3375 + * + * ################################################################################## + * def getAsyn(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getAsyn" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getAsyn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3420 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("waitForGetEvent (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("waitForGetEvent", 0); + + /* "PyCafe.pyx":3422 + * def waitForGetEvent(self, handlePV): + * + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3422, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":3423 + * + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForGetEvent(handle) + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3424 + * cdef unsigned int handle = handlePV + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_status = __pyx_v_self->_c_cafe->waitForGetEvent(__pyx_v_handle); + } + + /* "PyCafe.pyx":3423 + * + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForGetEvent(handle) + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":3425 + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def waitForGetEvent(self, handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3420 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.waitForGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3431 + * + * ################################################################################## + * def waitForBundledEvents(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("waitForBundledEvents (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vRB; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("waitForBundledEvents", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3432 + * ################################################################################## + * def waitForBundledEvents(self, handleList): + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_waitForBundledEvents_self_handle); + __pyx_v__METHOD = __pyx_kp_u_waitForBundledEvents_self_handle; + + /* "PyCafe.pyx":3434 + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3435 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3436 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 3436, __pyx_L1_error) + + /* "PyCafe.pyx":3438 + * handleListB.append(handleList) + * #handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if not isinstance(handleList, (list)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3434 + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3440 + * handleList = handleListB + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_3 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3441 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 3441, __pyx_L1_error) + + /* "PyCafe.pyx":3440 + * handleList = handleListB + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":3444 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3445 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3445, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3444 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":3446 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3447 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 3447, __pyx_L1_error) + + /* "PyCafe.pyx":3446 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L8:; + + /* "PyCafe.pyx":3453 + * cdef vector[int] vRB + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vRB.reserve(len(handleList)) + * for i in range(0, len(handleList)): + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3453, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_6); + + /* "PyCafe.pyx":3454 + * + * v.reserve(len(handleList)) + * vRB.reserve(len(handleList)) # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3454, __pyx_L1_error) + __pyx_v_vRB.reserve(__pyx_t_6); + + /* "PyCafe.pyx":3455 + * v.reserve(len(handleList)) + * vRB.reserve(len(handleList)) + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3455, __pyx_L1_error) + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":3457 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Wait for bundle + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3457, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3460 + * + * # Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3461 + * # Wait for bundle + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":3460 + * + * # Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":3462 + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3463 + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3464 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3465 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * return status, vRB + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3463 + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3466 + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * return status, vRB + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3462 + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + */ + } + + /* "PyCafe.pyx":3467 + * self._c_cafe.printStatusMessage(status) + * return status + * return status, vRB # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def waitForBundledEvents(self, handleList): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __pyx_convert_vector_to_py_int(__pyx_v_vRB); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10); + __pyx_t_4 = 0; + __pyx_t_10 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3431 + * + * ################################################################################## + * def waitForBundledEvents(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.waitForBundledEvents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3474 + * ################################################################################## + * + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287getScalarArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287getScalarArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_v_cacheFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getScalarArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScalarArray") < 0)) __PYX_ERR(3, 3474, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_cacheFlag = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_cacheFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3474, __pyx_L3_error) + } else { + __pyx_v_cacheFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getScalarArray", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3474, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 3474, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_286getScalarArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_286getScalarArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + PyObject *__pyx_v_i = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_status; + PyObject *__pyx_v_j = NULL; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + PyObject *__pyx_v_statusLocal = NULL; + unsigned int __pyx_v_dtn; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + unsigned int __pyx_t_8; + int __pyx_t_9; + std::vector ::size_type __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + std::vector ::size_type __pyx_t_14; + std::vector ::size_type __pyx_t_15; + std::vector ::size_type __pyx_t_16; + unsigned int __pyx_t_17; + PyObject *__pyx_t_18 = NULL; + __Pyx_RefNannySetupContext("getScalarArray", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3476 + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" # <<<<<<<<<<<<<< + * + * # cdef float [::1] mvFloat #C-contiguous + */ + __Pyx_INCREF(__pyx_kp_u_getScalarArray_handleList_str_dt); + __pyx_v__METHOD = __pyx_kp_u_getScalarArray_handleList_str_dt; + + /* "PyCafe.pyx":3480 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3481 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 3481, __pyx_L1_error) + + /* "PyCafe.pyx":3480 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":3484 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3485 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3485, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3484 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":3486 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_4 = (__pyx_t_2 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_1 = __pyx_t_4; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_4 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3487 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 3487, __pyx_L1_error) + + /* "PyCafe.pyx":3486 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":3490 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3492 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3492, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3492, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3492, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3492, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3492, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3493 + * + * for i in range(0, len(handleList)): + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) # <<<<<<<<<<<<<< + * + * # pack into numpy + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToOne(__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3492 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3499 + * cdef vector[int] vStatus + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3499, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3500 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3500, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3502 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3502, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3502, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3502, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3502, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3502, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3504 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vRB + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3504, __pyx_L1_error) + } + + /* "PyCafe.pyx":3502 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3507 + * + * cdef vector[int] vRB + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if (cacheFlag == False): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":3509 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + __pyx_t_2 = ((__pyx_v_cacheFlag == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3512 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3513 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * # Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3512 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":3521 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3522 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3522, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3522, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3522, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3522, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3523 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3523, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_10]) == ICAFE_WAITING_FOR_PREV_CALLBACK) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3525 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 3525, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(3, 3525, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(3, 3525, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_13(__pyx_t_11); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3525, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3526 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3526, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3526, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_v[__pyx_t_14]) == (__pyx_v_v[__pyx_t_15])) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3527 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3527, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_10]) == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3528 + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] # <<<<<<<<<<<<<< + * + * # ca_poll() Not required as above will flush! + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3528, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3528, __pyx_L1_error) + (__pyx_v_vStatus[__pyx_t_16]) = (__pyx_v_vStatus[__pyx_t_10]); + + /* "PyCafe.pyx":3527 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + } + + /* "PyCafe.pyx":3526 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + } + + /* "PyCafe.pyx":3525 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3523 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + } + + /* "PyCafe.pyx":3522 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3521 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + } + + /* "PyCafe.pyx":3534 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3535 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":3534 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":3536 + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3537 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3538 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3539 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":3537 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":3536 + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + */ + } + + /* "PyCafe.pyx":3509 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + } + + /* "PyCafe.pyx":3541 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":3542 + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtcheck=", dtcheck) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3542, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":3546 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3548 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":3549 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3549, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3551 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3552 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3551 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L30; + } + __pyx_L30:; + } + } + + /* "PyCafe.pyx":3554 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3554, __pyx_L1_error) + __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { + __pyx_t_6 = __pyx_t_11; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3554, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3554, __pyx_L1_error) + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3554, __pyx_L1_error) + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + } + } else { + __pyx_t_11 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_11)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3554, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_11); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":3556 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3556, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3556, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3555 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_17)); + + /* "PyCafe.pyx":3554 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3563 + * # for i in range(0, len(self.vStr)): + * # localList.append( self.vStr[i]) + * return self.vStr, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->vStr); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_3); + __pyx_t_6 = 0; + __pyx_t_11 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_18; + __pyx_t_18 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3546 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3565 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":3567 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":3568 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3568, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3570 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3571 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3570 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L35; + } + __pyx_L35:; + } + } + + /* "PyCafe.pyx":3576 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3576, __pyx_L1_error) + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_3 = __pyx_t_18; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3576, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3576, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3576, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3576, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3578 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3577 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_8)); + + /* "PyCafe.pyx":3576 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3584 + * + * # for i in range(0, len(self.vInt)): + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_11); + __pyx_t_3 = 0; + __pyx_t_18 = 0; + __pyx_t_11 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3565 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3586 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3588 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":3589 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3589, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3591 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3592 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3591 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L40; + } + __pyx_L40:; + } + } + + /* "PyCafe.pyx":3594 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3594, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_11 = __pyx_t_6; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3594, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3594, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3594, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_7(__pyx_t_11); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3594, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3596 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3596, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3596, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3595 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_17)); + + /* "PyCafe.pyx":3594 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3611 + * + * # for i in range(0, len(self.vFloat)): + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * # Native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_18); + __pyx_t_11 = 0; + __pyx_t_6 = 0; + __pyx_t_18 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3586 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":3624 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":3640 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_18 = __pyx_t_3; __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_7 = Py_TYPE(__pyx_t_18)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3640, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_18))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3640, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3640, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_18); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3640, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3641 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3641, __pyx_L1_error) + (void)((__pyx_v_pvd[__pyx_t_12]).setNelem(1)); + + /* "PyCafe.pyx":3640 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3643 + * pvd[i].setNelem(1) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":3645 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3645, __pyx_L1_error) + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_3 = __pyx_t_18; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3645, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3645, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3645, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3645, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3646 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3646, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3646, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_8)); + + /* "PyCafe.pyx":3645 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3648 + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3649 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":3650 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * if (cacheFlag): + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusLocal = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3651 + * statusFlag = True + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): # <<<<<<<<<<<<<< + * + * # if status !=ICAFE_NORMAL: + */ + __pyx_t_2 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3657 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_18 = __pyx_t_3; __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_7 = Py_TYPE(__pyx_t_18)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3657, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_18))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3657, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3657, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_18); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3657, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3658 + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3658, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3659 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3659, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_pvd[__pyx_t_12]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3660 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_12 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3660, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Error_in_Element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getScalarArray); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getScalarArray); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_in_PyCafe_def_getScalarArray); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3662 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":3663 + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3663, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3662 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3664 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3664, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3665 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3665, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_t_12]).getStatus()); + + /* "PyCafe.pyx":3666 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_2 = (__pyx_v_statusFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3667 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3667, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_statusLocal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3668 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * # + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":3666 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":3659 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + */ + } + + /* "PyCafe.pyx":3657 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3651 + * statusFlag = True + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): # <<<<<<<<<<<<<< + * + * # if status !=ICAFE_NORMAL: + */ + } + + /* "PyCafe.pyx":3678 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, v.size()): #len(handleList)): + */ + __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_v_localList = ((PyObject*)__pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3680 + * localList = [] + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_18 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_6 = __pyx_t_18; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3680, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3680, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3680, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3680, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3682 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3682, __pyx_L1_error) + __pyx_v_dtn = (__pyx_v_pvd[__pyx_t_12]).getDataType(); + + /* "PyCafe.pyx":3683 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + */ + __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":3689 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3690 + * + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3690, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3689 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3692 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3692, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3691 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3694 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3694, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3694, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3693 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3698 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3698, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPV((__pyx_v_pvd[__pyx_t_12]).getPVName())) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3699 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3699, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3699, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3698 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L54; + } + + /* "PyCafe.pyx":3701 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3701, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __pyx_L54:; + + /* "PyCafe.pyx":3695 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3705 + * elif dtcheck == CAFE_CHAR: + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3705, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3705, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3703 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3707 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3707, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3706 + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3709 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3709, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3709, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3708 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":3711 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3711, __pyx_L1_error) + + /* "PyCafe.pyx":3712 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarArray:") + * print("Entering 0 for element", i, + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3713 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3714 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") + * print("Entering 0 for element", i, # <<<<<<<<<<<<<< + * "as channel is not connected!") + * + */ + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Entering_0_for_element); + __Pyx_GIVEREF(__pyx_kp_u_Entering_0_for_element); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Entering_0_for_element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_as_channel_is_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_as_channel_is_not_connected); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_as_channel_is_not_connected); + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3712 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarArray:") + * print("Entering 0 for element", i, + */ + } + break; + } + + /* "PyCafe.pyx":3680 + * localList = [] + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3720 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + __pyx_t_2 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3721 + * # free(pvd) + * if cacheFlag: + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * + * # use vstatus instead of statusList (as cache is NoWait) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_INCREF(__pyx_v_statusLocal); + __Pyx_GIVEREF(__pyx_v_statusLocal); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_statusLocal); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3720 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + } + + /* "PyCafe.pyx":3724 + * + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_18); + __pyx_t_6 = 0; + __pyx_t_18 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3474 + * ################################################################################## + * + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_statusLocal); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3735 + * ################################################################################## + * + * def getStrScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='str') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrScalarList", 0); + + /* "PyCafe.pyx":3737 + * def getStrScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='str') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 3737, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3735 + * ################################################################################## + * + * def getStrScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='str') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3740 + * + * ################################################################################## + * def getIntScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='int') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntScalarList", 0); + + /* "PyCafe.pyx":3742 + * def getIntScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='int') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 3742, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3740 + * + * ################################################################################## + * def getIntScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='int') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3745 + * + * ################################################################################## + * def getFloatScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='float') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatScalarList", 0); + + /* "PyCafe.pyx":3747 + * def getFloatScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 3747, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3745 + * + * ################################################################################## + * def getFloatScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='float') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3750 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + CYTHON_UNUSED PyObject *__pyx_v_dictFlag = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getScalarList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,&__pyx_n_s_dictFlag,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + + /* "PyCafe.pyx":3751 + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', + * cacheFlag: bool = False, dictFlag: bool = False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getScalarList(handleList, str dt, bint cacheFlag)" + */ + values[2] = ((PyObject *)Py_False); + values[3] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dictFlag); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScalarList") < 0)) __PYX_ERR(3, 3750, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + __pyx_v_dictFlag = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getScalarList", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 3750, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 3750, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_294getScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag, __pyx_v_dictFlag); + + /* "PyCafe.pyx":3750 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_294getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, CYTHON_UNUSED PyObject *__pyx_v_dictFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + PyObject *__pyx_v_i = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_status; + PyObject *__pyx_v_j = NULL; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + PyObject *__pyx_v_statusLocal = NULL; + unsigned int __pyx_v_dtn; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + unsigned int __pyx_t_8; + int __pyx_t_9; + std::vector ::size_type __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + std::vector ::size_type __pyx_t_14; + std::vector ::size_type __pyx_t_15; + std::vector ::size_type __pyx_t_16; + unsigned int __pyx_t_17; + PyObject *__pyx_t_18 = NULL; + __Pyx_RefNannySetupContext("getScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3753 + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + * cdef str _METHOD = "getScalarList(handleList, str dt, bint cacheFlag)" # <<<<<<<<<<<<<< + * + * # cdef float [::1] mvFloat #C-contiguous + */ + __Pyx_INCREF(__pyx_kp_u_getScalarList_handleList_str_dt); + __pyx_v__METHOD = __pyx_kp_u_getScalarList_handleList_str_dt; + + /* "PyCafe.pyx":3757 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3758 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 3758, __pyx_L1_error) + + /* "PyCafe.pyx":3757 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":3761 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3762 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 3762, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3761 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":3763 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_4 = (__pyx_t_2 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_1 = __pyx_t_4; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_4 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3764 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 3764, __pyx_L1_error) + + /* "PyCafe.pyx":3763 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":3767 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3769 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3769, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3769, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3769, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3769, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3769, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3770 + * + * for i in range(0, len(handleList)): + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) # <<<<<<<<<<<<<< + * + * # c=self.hh.getNelemClient(handleList[i]) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3770, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToOne(__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3770, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3769 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3783 + * cdef vector[int] vStatus + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3783, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3784 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3784, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3786 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3786, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3786, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3786, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3786, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3786, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3788 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vRB + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3788, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 3788, __pyx_L1_error) + } + + /* "PyCafe.pyx":3786 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3791 + * + * cdef vector[int] vRB + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if (cacheFlag == False): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":3793 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_cacheFlag, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3793, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 3793, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":3796 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3797 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * #print("getScalarList") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3796 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":3809 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3810 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3810, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3810, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3810, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3810, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3811 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3811, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_10]) == ICAFE_WAITING_FOR_PREV_CALLBACK) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3813 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 3813, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(3, 3813, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(3, 3813, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_13(__pyx_t_11); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3813, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3814 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3814, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3814, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_v[__pyx_t_14]) == (__pyx_v_v[__pyx_t_15])) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3815 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3815, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_10]) == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3816 + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] # <<<<<<<<<<<<<< + * + * # ca_poll() Not required as above will flush! + */ + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3816, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3816, __pyx_L1_error) + (__pyx_v_vStatus[__pyx_t_16]) = (__pyx_v_vStatus[__pyx_t_10]); + + /* "PyCafe.pyx":3815 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + } + + /* "PyCafe.pyx":3814 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + } + + /* "PyCafe.pyx":3813 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3811 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + } + + /* "PyCafe.pyx":3810 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3809 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + } + + /* "PyCafe.pyx":3821 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3822 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * + * if (statusBundle != ICAFE_NORMAL): + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":3821 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":3824 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3825 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3826 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3827 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":3825 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":3824 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + */ + } + + /* "PyCafe.pyx":3793 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + } + + /* "PyCafe.pyx":3829 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":3830 + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtcheck=", dtcheck) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3830, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":3834 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3836 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":3837 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3837, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3839 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3840 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3839 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L30; + } + __pyx_L30:; + } + } + + /* "PyCafe.pyx":3842 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3842, __pyx_L1_error) + __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { + __pyx_t_6 = __pyx_t_11; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3842, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3842, __pyx_L1_error) + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3842, __pyx_L1_error) + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + } + } else { + __pyx_t_11 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_11)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3842, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_11); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":3844 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3843 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_17)); + + /* "PyCafe.pyx":3842 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3851 + * # for i in range(0, len(self.vStr)): + * # localList.append( self.vStr[i]) + * return self.vStr, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->vStr); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_3); + __pyx_t_6 = 0; + __pyx_t_11 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_18; + __pyx_t_18 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3834 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3853 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":3855 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":3856 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3856, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3858 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3859 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3858 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L35; + } + __pyx_L35:; + } + } + + /* "PyCafe.pyx":3864 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3864, __pyx_L1_error) + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_3 = __pyx_t_18; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3864, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3864, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3864, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3864, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3866 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3865 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_8)); + + /* "PyCafe.pyx":3864 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3872 + * + * # for i in range(0, len(self.vInt)): + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_11); + __pyx_t_3 = 0; + __pyx_t_18 = 0; + __pyx_t_11 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3853 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3874 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3876 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":3877 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3877, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_5); + + /* "PyCafe.pyx":3879 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3880 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3879 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L40; + } + __pyx_L40:; + } + } + + /* "PyCafe.pyx":3882 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3882, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_11 = __pyx_t_6; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3882, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3882, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3882, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_7(__pyx_t_11); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3882, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3884 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * #for i in range(0, len(vStatus)): + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3883 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_17)); + + /* "PyCafe.pyx":3882 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3899 + * + * # for i in range(0, len(self.vFloat)): + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * # Native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_18); + __pyx_t_11 = 0; + __pyx_t_6 = 0; + __pyx_t_18 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3874 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":3911 + * + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * #for i in range (0, len(handleList)): + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":3926 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_18 = __pyx_t_3; __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_7 = Py_TYPE(__pyx_t_18)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3926, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_18))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3926, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3926, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_18); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3926, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3927 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3927, __pyx_L1_error) + (void)((__pyx_v_pvd[__pyx_t_12]).setNelem(1)); + + /* "PyCafe.pyx":3926 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3929 + * pvd[i].setNelem(1) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":3931 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3931, __pyx_L1_error) + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_3 = __pyx_t_18; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3931, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3931, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3931, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3931, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3932 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_18); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_8)); + + /* "PyCafe.pyx":3931 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3934 + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3935 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":3936 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusLocal = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3947 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_18 = __pyx_t_3; __Pyx_INCREF(__pyx_t_18); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_7 = Py_TYPE(__pyx_t_18)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3947, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_18))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3947, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_18)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3947, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_18); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3947, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3948 + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3948, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3948, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3949 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3949, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_pvd[__pyx_t_12]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3950 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_12 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3950, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Error_in_Element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getScalarList); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getScalarList); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_in_PyCafe_def_getScalarList); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3952 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":3953 + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3953, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3952 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3954 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3954, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3955 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3955, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_t_12]).getStatus()); + + /* "PyCafe.pyx":3956 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_2 = (__pyx_v_statusFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3957 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3957, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_statusLocal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3958 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * # + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":3956 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":3949 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + */ + } + + /* "PyCafe.pyx":3947 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":3968 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, v.size()): #len(handleList)): + */ + __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_v_localList = ((PyObject*)__pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3970 + * localList = [] + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_18 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18); + __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) { + __pyx_t_6 = __pyx_t_18; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3970, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3970, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_18); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 3970, __pyx_L1_error) + #else + __pyx_t_18 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + #endif + } + } else { + __pyx_t_18 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_18)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 3970, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_18); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_18); + __pyx_t_18 = 0; + + /* "PyCafe.pyx":3972 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3972, __pyx_L1_error) + __pyx_v_dtn = (__pyx_v_pvd[__pyx_t_12]).getDataType(); + + /* "PyCafe.pyx":3973 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + */ + __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 3973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3973, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":3979 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3980 + * + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3980, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3980, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3979 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3982 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3982, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3982, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3982, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3981 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3984 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3984, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3983 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3988 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3988, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPV((__pyx_v_pvd[__pyx_t_12]).getPVName())) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3989 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3989, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3989, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3988 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L53; + } + + /* "PyCafe.pyx":3991 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3991, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3991, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __pyx_L53:; + + /* "PyCafe.pyx":3985 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3995 + * elif dtcheck == CAFE_CHAR: + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3995, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3993 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3997 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3997, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3997, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3996 + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3999 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3999, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 3999, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":3998 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":4001 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 4001, __pyx_L1_error) + + /* "PyCafe.pyx":4002 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarList:") + * print("Entering 0 for element", i, + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4003 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4004 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") + * print("Entering 0 for element", i, # <<<<<<<<<<<<<< + * "as channel is not connected!") + * + */ + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Entering_0_for_element); + __Pyx_GIVEREF(__pyx_kp_u_Entering_0_for_element); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Entering_0_for_element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_as_channel_is_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_as_channel_is_not_connected); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_as_channel_is_not_connected); + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 4004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "PyCafe.pyx":4002 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarList:") + * print("Entering 0 for element", i, + */ + } + break; + } + + /* "PyCafe.pyx":3970 + * localList = [] + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4010 + * + * # free(pvd) + * if (cacheFlag == True): # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + __pyx_t_6 = PyObject_RichCompare(__pyx_v_cacheFlag, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4010, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4010, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4011 + * # free(pvd) + * if (cacheFlag == True): + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * + * # use vstatus instead of statusList (as cache is NoWait) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_INCREF(__pyx_v_statusLocal); + __Pyx_GIVEREF(__pyx_v_statusLocal); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_statusLocal); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4010 + * + * # free(pvd) + * if (cacheFlag == True): # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + } + + /* "PyCafe.pyx":4014 + * + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, statusNoWait, vStatus # <<<<<<<<<<<<<< + * # return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_statusNoWait); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 4014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_18); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_18); + __pyx_t_6 = 0; + __pyx_t_18 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3750 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_statusLocal); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4022 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297getDictionary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297getDictionary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pvhandleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + PyObject *__pyx_v_scalarOnly = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDictionary (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pvhandleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,&__pyx_n_s_scalarOnly,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject *)Py_False); + + /* "PyCafe.pyx":4023 + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, + * scalarOnly: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + * + */ + values[3] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvhandleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scalarOnly); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDictionary") < 0)) __PYX_ERR(3, 4022, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pvhandleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + __pyx_v_scalarOnly = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getDictionary", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4022, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getDictionary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4022, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_296getDictionary(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pvhandleList, __pyx_v_dt, __pyx_v_cacheFlag, __pyx_v_scalarOnly); + + /* "PyCafe.pyx":4022 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_296getDictionary(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvhandleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, PyObject *__pyx_v_scalarOnly) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED PyObject *__pyx_v_pvList = NULL; + PyObject *__pyx_v_handleList = NULL; + PyObject *__pyx_v_value = NULL; + CYTHON_UNUSED PyObject *__pyx_v_statusOverall = NULL; + PyObject *__pyx_v_status = NULL; + PyObject *__pyx_v_pvdict = NULL; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v__val = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + Py_ssize_t __pyx_t_13; + unsigned int __pyx_t_14; + __Pyx_RefNannySetupContext("getDictionary", 0); + + /* "PyCafe.pyx":4024 + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" # <<<<<<<<<<<<<< + * + * pvList = None + */ + __Pyx_INCREF(__pyx_kp_u_getDictionary_handleList_dt_cach); + __pyx_v__METHOD = __pyx_kp_u_getDictionary_handleList_dt_cach; + + /* "PyCafe.pyx":4026 + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + * + * pvList = None # <<<<<<<<<<<<<< + * handleList = pvhandleList + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_pvList = Py_None; + + /* "PyCafe.pyx":4027 + * + * pvList = None + * handleList = pvhandleList # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_v_pvhandleList); + __pyx_v_handleList = __pyx_v_pvhandleList; + + /* "PyCafe.pyx":4029 + * handleList = pvhandleList + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4030 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4031 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_handleList); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4031, __pyx_L1_error) + __pyx_t_1 = ((!__pyx_t_2) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4032 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4032, __pyx_L1_error) + + /* "PyCafe.pyx":4031 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + } + + /* "PyCafe.pyx":4029 + * handleList = pvhandleList + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4037 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4038 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4038, __pyx_L1_error) + + /* "PyCafe.pyx":4037 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":4041 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4041, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4042 + * + * if isinstance(handleList[0], (str)): + * pvList = handleList # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_DECREF_SET(__pyx_v_pvList, __pyx_v_handleList); + + /* "PyCafe.pyx":4043 + * if isinstance(handleList[0], (str)): + * pvList = handleList + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 4043, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4041 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4044 + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4045 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4045, __pyx_L1_error) + + /* "PyCafe.pyx":4044 + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":4048 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if scalarOnly: # <<<<<<<<<<<<<< + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_scalarOnly); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4048, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":4049 + * + * if scalarOnly: + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) # <<<<<<<<<<<<<< + * else: + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_dt); + __Pyx_INCREF(__pyx_v_cacheFlag); + __Pyx_GIVEREF(__pyx_v_cacheFlag); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_cacheFlag); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(3, 4049, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(3, 4049, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_unpacking_done; + __pyx_L10_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(3, 4049, __pyx_L1_error) + __pyx_L11_unpacking_done:; + } + __pyx_v_value = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_statusOverall = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4048 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if scalarOnly: # <<<<<<<<<<<<<< + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":4051 + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) # <<<<<<<<<<<<<< + * + * pvdict = OrderedDict() + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_dt); + __Pyx_INCREF(__pyx_v_cacheFlag); + __Pyx_GIVEREF(__pyx_v_cacheFlag); + PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_v_cacheFlag); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(3, 4051, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_8 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(3, 4051, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(3, 4051, __pyx_L1_error) + __pyx_L13_unpacking_done:; + } + __pyx_v_value = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_statusOverall = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_status = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_L9:; + + /* "PyCafe.pyx":4053 + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) + * + * pvdict = OrderedDict() # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * _val = value[i] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_pvdict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4054 + * + * pvdict = OrderedDict() + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * _val = value[i] + * if status[i] != ICAFE_NORMAL: + */ + __pyx_t_11 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4054, __pyx_L1_error) + __pyx_t_12 = __pyx_t_11; + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { + __pyx_v_i = __pyx_t_13; + + /* "PyCafe.pyx":4055 + * pvdict = OrderedDict() + * for i in range(0, len(handleList)): + * _val = value[i] # <<<<<<<<<<<<<< + * if status[i] != ICAFE_NORMAL: + * _val = None + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v__val, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4056 + * for i in range(0, len(handleList)): + * _val = value[i] + * if status[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_status, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4056, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4056, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4056, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4057 + * _val = value[i] + * if status[i] != ICAFE_NORMAL: + * _val = None # <<<<<<<<<<<<<< + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + * + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v__val, Py_None); + + /* "PyCafe.pyx":4056 + * for i in range(0, len(handleList)): + * _val = value[i] + * if status[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + */ + } + + /* "PyCafe.pyx":4058 + * if status[i] != ICAFE_NORMAL: + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val # <<<<<<<<<<<<<< + * + * return pvdict + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4058, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(PyObject_SetItem(__pyx_v_pvdict, __pyx_t_4, __pyx_v__val) < 0)) __PYX_ERR(3, 4058, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":4060 + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + * + * return pvdict # <<<<<<<<<<<<<< + * + * # int alarmStatus=None, int alarmSev=None): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pvdict); + __pyx_r = __pyx_v_pvdict; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":4022 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDictionary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pvList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_statusOverall); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF(__pyx_v_pvdict); + __Pyx_XDECREF(__pyx_v__val); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4064 + * # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_299getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_299getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_v_cacheFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCompoundList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCompoundList") < 0)) __PYX_ERR(3, 4064, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_cacheFlag = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_cacheFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4064, __pyx_L3_error) + } else { + __pyx_v_cacheFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCompoundList", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4064, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4064, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_298getCompoundList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_298getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_flagCompound; + unsigned int __pyx_v_nelemLocal; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + int __pyx_v_statusLocal; + unsigned int __pyx_v_dtn; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + unsigned int __pyx_t_15; + long __pyx_t_16; + unsigned int __pyx_t_17; + unsigned int __pyx_t_18; + __Pyx_RefNannySetupContext("getCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":4066 + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_kp_u_getCompoundList_handleList_str_d); + __pyx_v__METHOD = __pyx_kp_u_getCompoundList_handleList_str_d; + + /* "PyCafe.pyx":4068 + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4069 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4070 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_handleList); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4070, __pyx_L1_error) + __pyx_t_1 = ((!__pyx_t_2) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4071 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4071, __pyx_L1_error) + + /* "PyCafe.pyx":4070 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + } + + /* "PyCafe.pyx":4068 + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4076 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4077 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4077, __pyx_L1_error) + + /* "PyCafe.pyx":4076 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":4080 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4081 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 4081, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4080 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4082 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4083 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 4083, __pyx_L1_error) + + /* "PyCafe.pyx":4082 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L6:; + } + __pyx_L3:; + + /* "PyCafe.pyx":4092 + * cdef vector[int] vRB + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4092, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4093 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * cdef bint flagCompound = False + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4093, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4095 + * vStatus.reserve(len(handleList)) + * + * cdef bint flagCompound = False # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemLocal = 1 + */ + __pyx_v_flagCompound = 0; + + /* "PyCafe.pyx":4097 + * cdef bint flagCompound = False + * + * cdef unsigned int nelemLocal = 1 # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_nelemLocal = 1; + + /* "PyCafe.pyx":4099 + * cdef unsigned int nelemLocal = 1 + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4099, __pyx_L1_error) + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":4101 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * if (nelemLocal == 1): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 4101, __pyx_L1_error) + } + + /* "PyCafe.pyx":4103 + * v.push_back(handleList[i]) + * + * if (nelemLocal == 1): # <<<<<<<<<<<<<< + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + __pyx_t_2 = ((__pyx_v_nelemLocal == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4104 + * + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) # <<<<<<<<<<<<<< + * if nelemLocal > 1: + * flagCompound = True + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_nelemLocal = __pyx_v_self->hh.getNelemNative(__pyx_t_10); + + /* "PyCafe.pyx":4105 + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound = True + * + */ + __pyx_t_2 = ((__pyx_v_nelemLocal > 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4106 + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + * flagCompound = True # <<<<<<<<<<<<<< + * + * status = ICAFE_NORMAL + */ + __pyx_v_flagCompound = 1; + + /* "PyCafe.pyx":4105 + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound = True + * + */ + } + + /* "PyCafe.pyx":4103 + * v.push_back(handleList[i]) + * + * if (nelemLocal == 1): # <<<<<<<<<<<<<< + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + } + } + + /* "PyCafe.pyx":4108 + * flagCompound = True + * + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if not cacheFlag: + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4110 + * status = ICAFE_NORMAL + * + * if not cacheFlag: # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + __pyx_t_2 = ((!(__pyx_v_cacheFlag != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4114 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * #print("getCompound", status, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4115 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * #print("getCompound", status, vStatus) + * # ca_poll() Not required as above will flush! + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4114 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * #print("getCompound", status, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L16; + } + __pyx_L16:; + } + } + + /* "PyCafe.pyx":4121 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4122 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * + * if (statusBundle != ICAFE_NORMAL): + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":4121 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":4124 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4125 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4126 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4127 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":4125 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":4124 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + */ + } + + /* "PyCafe.pyx":4110 + * status = ICAFE_NORMAL + * + * if not cacheFlag: # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + } + + /* "PyCafe.pyx":4129 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":4130 + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * # Use Scalar + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_10; + + /* "PyCafe.pyx":4133 + * + * # Use Scalar + * if not flagCompound: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + __pyx_t_2 = ((!(__pyx_v_flagCompound != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4135 + * if not flagCompound: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4137 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":4138 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4138, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4140 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4141 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * return self.vStr, status, vStatus + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4140 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":4143 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * return self.vStr, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->vStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4135 + * if not flagCompound: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4145 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":4147 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":4148 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4148, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4150 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4151 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * #print("getCompound", status, vStatus) + * return self.vInt, status, vStatus + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4150 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L28; + } + __pyx_L28:; + } + } + + /* "PyCafe.pyx":4153 + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_11 = 0; + __pyx_t_5 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4145 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4155 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4157 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":4158 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4158, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4160 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble( + * v, self.vFloat, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4161 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble( # <<<<<<<<<<<<<< + * v, self.vFloat, vStatus) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4160 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble( + * v, self.vFloat, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L31; + } + __pyx_L31:; + } + } + + /* "PyCafe.pyx":4164 + * v, self.vFloat, vStatus) + * + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * # continue Can be a compound or native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4155 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":4133 + * + * # Use Scalar + * if not flagCompound: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + } + + /* "PyCafe.pyx":4171 + * # Does group exist? + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * # Required to allocate memory for shared pointer + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":4174 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_13; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4175 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemClient(__pyx_t_10))); + } + + /* "PyCafe.pyx":4177 + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":4179 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_v_statusList = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":4180 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":4181 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if cacheFlag: + */ + __pyx_v_statusLocal = ICAFE_NORMAL; + + /* "PyCafe.pyx":4183 + * statusLocal = ICAFE_NORMAL + * + * if cacheFlag: # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_2 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4184 + * + * if cacheFlag: + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_13; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4185 + * if cacheFlag: + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4186 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + */ + __pyx_t_2 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4187 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "PyCafe.pyx":4188 + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") # <<<<<<<<<<<<<< + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4187, __pyx_L1_error) + + /* "PyCafe.pyx":4187 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getCompundList); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getCompundList); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_in_PyCafe_def_getCompundList); + __pyx_t_11 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4189 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":4190 + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":4189 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4191 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4192 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":4193 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_2 = (__pyx_v_statusFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4194 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_v_statusLocal = (__pyx_v_pvd[__pyx_v_i]).getStatus(); + + /* "PyCafe.pyx":4195 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":4193 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":4186 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + */ + } + } + + /* "PyCafe.pyx":4183 + * statusLocal = ICAFE_NORMAL + * + * if cacheFlag: # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + */ + } + + /* "PyCafe.pyx":4199 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, v.size()): #len(handleList)): + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_localList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4201 + * localList = [] + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_13; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4203 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":4204 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_10; + + /* "PyCafe.pyx":4206 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + __pyx_t_2 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4207 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4208 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4207 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4210 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4209 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4212 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4211 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4215 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_10) == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4216 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4215 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L42; + } + + /* "PyCafe.pyx":4218 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4218, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __pyx_L42:; + + /* "PyCafe.pyx":4213 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4221 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4220 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4223 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4222 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4225 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) # no data + */ + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4224 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":4227 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4227, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":4206 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L41; + } + + /* "PyCafe.pyx":4229 + * localList.append(0) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_11)); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":4230 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4231 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4232 + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":4230 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4234 + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4235 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":4233 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4237 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4238 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":4236 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4241 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4243 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_17) == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4244 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4243 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L51; + } + + /* "PyCafe.pyx":4246 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __pyx_L51:; + } + + /* "PyCafe.pyx":4239 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4249 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4251 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":4248 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4253 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4254 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":4252 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4256 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_10; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4257 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_11 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_11); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4257, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + /*else*/ { + + /* "PyCafe.pyx":4259 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(0) # no data + * localList.append(localListInner) + */ + __pyx_t_17 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_17; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_18; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":4260 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4260, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":4255 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":4261 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 4261, __pyx_L1_error) + } + __pyx_L41:; + } + + /* "PyCafe.pyx":4264 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + */ + __pyx_t_2 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4265 + * # free(pvd) + * if cacheFlag: + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_statusLocal); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_statusList); + __pyx_t_11 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4264 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + */ + } + + /* "PyCafe.pyx":4267 + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_11); + __pyx_t_3 = 0; + __pyx_t_11 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4064 + * # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4275 + * ################################################################################## + * + * def getCompoundPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCompoundPVGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCompoundPVGroup") < 0)) __PYX_ERR(3, 4275, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCompoundPVGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4275, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4275, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + PyObject *__pyx_v_handleList = NULL; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + std::vector __pyx_v_hV; + Py_ssize_t __pyx_v_i; + CYTHON_UNUSED PyObject *__pyx_v_status = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + PyObject *__pyx_v_localListToStruct = NULL; + int __pyx_v_groupStatus; + PyObject *__pyx_v_ll = NULL; + PyObject *__pyx_v_aStatSev = NULL; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *(*__pyx_t_14)(PyObject *); + unsigned int __pyx_t_15; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_16; + int __pyx_t_17; + __Pyx_RefNannySetupContext("getCompoundPVGroup", 0); + + /* "PyCafe.pyx":4277 + * def getCompoundPVGroup(self, ghandleName, str dt='native'): + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCompoundPVGroup_ghandleName_s); + __pyx_v__METHOD = __pyx_kp_u_getCompoundPVGroup_ghandleName_s; + + /* "PyCafe.pyx":4279 + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":4280 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4281 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4281, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4280 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4282 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4283 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 4283, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4282 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4286 + * else: + * + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if group handle, else if group name") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 4286, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4289 + * First input argument, should be of type if group handle, else if group name") + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handleList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4290 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4292 + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4293 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hV + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4297 + * cdef vector[unsigned int] hV + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * hV.push_back(handleList[i]) + * + */ + __pyx_t_9 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 4297, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":4298 + * + * for i in range(0, len(handleList)): + * hV.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4298, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + try { + __pyx_v_hV.push_back(__pyx_t_4); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 4298, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":4300 + * hV.push_back(handleList[i]) + * + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getCompoundList(handleList, dt) + */ + (void)(__pyx_v_self->hh.setCafeDbrTypeV(__pyx_v_hV, DBR_TIME)); + + /* "PyCafe.pyx":4302 + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) + * + * localList, status, statusList = self.getCompoundList(handleList, dt) # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_handleList, __pyx_v_dt}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_handleList, __pyx_v_dt}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_12, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_dt); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(3, 4302, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_13 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 4302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_7 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(3, 4302, __pyx_L1_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(3, 4302, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __Pyx_DECREF_SET(__pyx_v_localList, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_v_status = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4306 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4307 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":4306 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":4310 + * + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * cdef pvdata p1 + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":4314 + * cdef pvdata p1 + * + * localListToStruct = [] # <<<<<<<<<<<<<< + * + * cdef int groupStatus = ICAFE_NORMAL + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localListToStruct = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4316 + * localListToStruct = [] + * + * cdef int groupStatus = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_groupStatus = ICAFE_NORMAL; + + /* "PyCafe.pyx":4318 + * cdef int groupStatus = ICAFE_NORMAL + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * p1 = pvdata() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_15 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_15; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":4319 + * + * for i in range(0, pvg.getNPV()): + * p1 = pvdata() # <<<<<<<<<<<<<< + * + * # pvd[i].setDouble(localList[i]) + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4322 + * + * # pvd[i].setDouble(localList[i]) + * p1 = PVDataHolderToStruct(pvd[i], dt) # <<<<<<<<<<<<<< + * + * if not isinstance(localList[i], (list)): + */ + __pyx_t_16.__pyx_n = 1; + __pyx_t_16.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4324 + * p1 = PVDataHolderToStruct(pvd[i], dt) + * + * if not isinstance(localList[i], (list)): # <<<<<<<<<<<<<< + * ll = [] + * ll.append(localList[i]) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyList_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4325 + * + * if not isinstance(localList[i], (list)): + * ll = [] # <<<<<<<<<<<<<< + * ll.append(localList[i]) + * p1.value = ll + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4326 + * if not isinstance(localList[i], (list)): + * ll = [] + * ll.append(localList[i]) # <<<<<<<<<<<<<< + * p1.value = ll + * else: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_5); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(3, 4326, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4327 + * ll = [] + * ll.append(localList[i]) + * p1.value = ll # <<<<<<<<<<<<<< + * else: + * p1.value = localList[i] # put into List! + */ + __Pyx_INCREF(__pyx_v_ll); + __Pyx_GIVEREF(__pyx_v_ll); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = __pyx_v_ll; + + /* "PyCafe.pyx":4324 + * p1 = PVDataHolderToStruct(pvd[i], dt) + * + * if not isinstance(localList[i], (list)): # <<<<<<<<<<<<<< + * ll = [] + * ll.append(localList[i]) + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":4329 + * p1.value = ll + * else: + * p1.value = localList[i] # put into List! # <<<<<<<<<<<<<< + * + * p1.status = statusList[i] + */ + /*else*/ { + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(3, 4329, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + } + __pyx_L15:; + + /* "PyCafe.pyx":4331 + * p1.value = localList[i] # put into List! + * + * p1.status = statusList[i] # <<<<<<<<<<<<<< + * + * if groupStatus == ICAFE_NORMAL: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->status = __pyx_t_12; + + /* "PyCafe.pyx":4333 + * p1.status = statusList[i] + * + * if groupStatus == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * groupStatus = statusList[i] + * + */ + __pyx_t_2 = ((__pyx_v_groupStatus == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4334 + * + * if groupStatus == ICAFE_NORMAL: + * groupStatus = statusList[i] # <<<<<<<<<<<<<< + * + * aStatSev = [] + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4334, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_groupStatus = __pyx_t_12; + + /* "PyCafe.pyx":4333 + * p1.status = statusList[i] + * + * if groupStatus == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * groupStatus = statusList[i] + * + */ + } + + /* "PyCafe.pyx":4336 + * groupStatus = statusList[i] + * + * aStatSev = [] # <<<<<<<<<<<<<< + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4337 + * + * aStatSev = [] + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) # <<<<<<<<<<<<<< + * p1.alarmStatus = aStatSev[0] + * p1.alarmSeverity = aStatSev[1] + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAlarmStatusSeverity); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4338 + * aStatSev = [] + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] # <<<<<<<<<<<<<< + * p1.alarmSeverity = aStatSev[1] + * + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_aStatSev, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmStatus = __pyx_t_12; + + /* "PyCafe.pyx":4339 + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] + * p1.alarmSeverity = aStatSev[1] # <<<<<<<<<<<<<< + * + * p1.ts = self.getTimeStamp(handleList[i]) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_aStatSev, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmSeverity = __pyx_t_12; + + /* "PyCafe.pyx":4341 + * p1.alarmSeverity = aStatSev[1] + * + * p1.ts = self.getTimeStamp(handleList[i]) # <<<<<<<<<<<<<< + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(3, 4341, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4342 + * + * p1.ts = self.getTimeStamp(handleList[i]) + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) # <<<<<<<<<<<<<< + * + * localListToStruct.append(p1) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStampAsDate); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 4342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(3, 4342, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4344 + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) + * + * localListToStruct.append(p1) # <<<<<<<<<<<<<< + * + * cpdef pvgroup pg + */ + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_localListToStruct, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(3, 4344, __pyx_L1_error) + } + + /* "PyCafe.pyx":4348 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localListToStruct + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4350 + * pg = pvgroup() + * + * pg.pvdata = localListToStruct # <<<<<<<<<<<<<< + * # pg.pvdata[0].showMax(10) + * + */ + __Pyx_INCREF(__pyx_v_localListToStruct); + __Pyx_GIVEREF(__pyx_v_localListToStruct); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localListToStruct; + + /* "PyCafe.pyx":4353 + * # pg.pvdata[0].showMax(10) + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":4354 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":4355 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_groupStatus; + + /* "PyCafe.pyx":4356 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * pg.showMax(1) + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":4358 + * pg.groupHandle = pvg.getGroupHandle() + * + * pg.showMax(1) # <<<<<<<<<<<<<< + * + * return pg + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pg), __pyx_n_s_showMax); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4360 + * pg.showMax(1) + * + * return pg # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":4275 + * ################################################################################## + * + * def getCompoundPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_localListToStruct); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_aStatSev); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4368 + * ################################################################################## + * + * def getStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303getStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303getStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_302getStrCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_302getStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getStrCache", 0); + + /* "PyCafe.pyx":4369 + * + * def getStrCache(self, handlePV): + * return self.getCache(handlePV, 'str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4369, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4369, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4368 + * ################################################################################## + * + * def getStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4373 + * + * ################################################################################## + * def getIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_305getIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_305getIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_304getIntCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_304getIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getIntCache", 0); + + /* "PyCafe.pyx":4374 + * ################################################################################## + * def getIntCache(self, handlePV): + * return self.getCache(handlePV, 'int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4374, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4374, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4373 + * + * ################################################################################## + * def getIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4378 + * + * ################################################################################## + * def getFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307getFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307getFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_306getFloatCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_306getFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getFloatCache", 0); + + /* "PyCafe.pyx":4379 + * ################################################################################## + * def getFloatCache(self, handlePV): + * return self.getCache(handlePV, 'float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4379, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4379, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4378 + * + * ################################################################################## + * def getFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4384 + * ################################################################################## + * + * def getCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCache") < 0)) __PYX_ERR(3, 4384, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4384, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4384, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_308getCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_308getCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_dtr; + PyObject *__pyx_v_status = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("getCache", 0); + + /* "PyCafe.pyx":4385 + * + * def getCache(self, handlePV, str dt='native'): + * cdef str _METHOD = "getCache(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCache_handlePV_str_dt_native); + __pyx_v__METHOD = __pyx_kp_u_getCache_handlePV_str_dt_native; + + /* "PyCafe.pyx":4387 + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4389 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4390 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4390, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4389 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4391 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4392 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 4392, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4391 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4394 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 4394, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4397 + * First input argument, should be of type if handle, else if PV") + * + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * status = self.hh.getDataTypeNative(handle, dtr) + * + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":4398 + * + * cdef long dtr = 0 + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4400 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4401 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4402 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4403 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4403, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_7); + + /* "PyCafe.pyx":4402 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":4405 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * raise Exception( + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4405, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_7); + } + __pyx_L8:; + + /* "PyCafe.pyx":4401 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4406 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4408 + * if self._enable_exceptions: + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3, __pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":4407 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + * return None + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 4407, __pyx_L1_error) + + /* "PyCafe.pyx":4406 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":4409 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + * return None # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4400 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4411 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_1 = 1; + break; + default: + __pyx_t_1 = 0; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4412 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4413 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":4414 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4415 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":4414 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":4417 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4419 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4420 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4421 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4422 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4424 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 4419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4418 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4426 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4426, __pyx_L1_error) + + /* "PyCafe.pyx":4417 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4427 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4412 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":4430 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4431 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":4430 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":4432 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4434 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4435 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4436 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4437 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4438 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 4434, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4433 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4439 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4439, __pyx_L1_error) + + /* "PyCafe.pyx":4432 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4440 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4411 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":4442 + * return None + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":4443 + * + * cdef unsigned int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":4445 + * dtcheck = getMatchedDataType(dt, dtr) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4446 + * + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheString(__pyx_v_handle, __pyx_v_self->valStr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4447 + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4448 + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4447 + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * + */ + } + + /* "PyCafe.pyx":4445 + * dtcheck = getMatchedDataType(dt, dtr) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4450 + * return self.valStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":4451 + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheLong(__pyx_v_handle, __pyx_v_self->valInt)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4452 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4453 + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4452 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + } + + /* "PyCafe.pyx":4450 + * return self.valStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4455 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4456 + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valFloat + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheDouble(__pyx_v_handle, __pyx_v_self->valFloat)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4457 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4458 + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + * return self.valFloat # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_ENUM: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4457 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + } + + /* "PyCafe.pyx":4455 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4462 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4463 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheString(__pyx_v_handle, __pyx_v_self->valStr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4464 + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4465 + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4464 + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":4462 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":4467 + * return self.valStr + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheLong(__pyx_v_handle, __pyx_v_self->valInt)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4468 + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4469 + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4468 + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + } + } + __pyx_L18:; + + /* "PyCafe.pyx":4460 + * return self.valFloat + * + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + break; + default: + + /* "PyCafe.pyx":4472 + * + * else: + * status = self.hh.getStatus(handle) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4473 + * else: + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4474 + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") # <<<<<<<<<<<<<< + * print("Datatype unknown, returning value 0") + * return 0 + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4475 + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4476 + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + * return 0 # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + + /* "PyCafe.pyx":4473 + * else: + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + */ + } + break; + } + + /* "PyCafe.pyx":4478 + * return 0 + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4478, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4478, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4479 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4480 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4481 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4481, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_7); + + /* "PyCafe.pyx":4480 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":4483 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4483, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_7); + } + __pyx_L24:; + + /* "PyCafe.pyx":4479 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4485 + * self._c_cafe.printStatus(handle, status) + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4487 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4488 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4489 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_v_status) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4489, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4490 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4490, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 4487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4486 + * + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4491 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4491, __pyx_L1_error) + + /* "PyCafe.pyx":4485 + * self._c_cafe.printStatus(handle, status) + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4478 + * return 0 + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4384 + * ################################################################################## + * + * def getCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4497 + * ################################################################################## + * + * def getStrArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='str', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStrArrayCache") < 0)) __PYX_ERR(3, 4497, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStrArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4497, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 4497, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrArrayCache", 0); + + /* "PyCafe.pyx":4498 + * + * def getStrArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='str', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 4498, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 4498, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4497 + * ################################################################################## + * + * def getStrArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='str', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4502 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='int', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIntArrayCache") < 0)) __PYX_ERR(3, 4502, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getIntArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4502, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 4502, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntArrayCache", 0); + + /* "PyCafe.pyx":4503 + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='int', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 4503, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 4503, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4502 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='int', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4507 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='float', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloatArrayCache") < 0)) __PYX_ERR(3, 4507, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloatArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4507, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 4507, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatArrayCache", 0); + + /* "PyCafe.pyx":4508 + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='float', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 4508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(3, 4508, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4507 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='float', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4512 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ################################################################################## + * # Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317getArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317getArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,&__pyx_n_s_art,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getArrayCache") < 0)) __PYX_ERR(3, 4512, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_art = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getArrayCache", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4512, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4512, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(3, 4512, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_316getArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316getArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + short *__pyx_v_i16val; + int *__pyx_v_ival; + double *__pyx_v_dval; + float *__pyx_v_fval; + dbr_string_t *__pyx_v_sval; + __Pyx_memviewslice __pyx_v_mvShort = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvDouble = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvFloat = { 0, 0, { 0 }, { 0 }, { 0 } }; + long __pyx_v_dtr; + int __pyx_v_status; + unsigned int __pyx_v_i; + unsigned int __pyx_v_ij; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_nelemToRetrieveFromCache; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_locallist = NULL; + PyObject *__pyx_v_mvStr = NULL; + PyObject *__pyx_v_arrayArray = NULL; + PyObject *__pyx_v_ctypesArray = NULL; + PyObject *__pyx_v_mvShortNP = NULL; + PyObject *__pyx_v_mvIntNP = NULL; + PyObject *__pyx_v_mvFloatNP = NULL; + PyObject *__pyx_v_mvDoubleNP = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + unsigned int __pyx_t_11; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_16; + size_t __pyx_t_17; + __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_19; + size_t __pyx_t_20; + __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_22; + size_t __pyx_t_23; + __Pyx_memviewslice __pyx_t_24 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_25; + size_t __pyx_t_26; + __Pyx_RefNannySetupContext("getArrayCache", 0); + + /* "PyCafe.pyx":4523 + * # allowing sharing of data buffers without copying + * + * cdef str _METHOD = "getArrayCache" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getArrayCache); + __pyx_v__METHOD = __pyx_n_u_getArrayCache; + + /* "PyCafe.pyx":4525 + * cdef str _METHOD = "getArrayCache" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4527 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4528 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4528, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4527 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4529 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4530 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 4530, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4529 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4532 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__48, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_4); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 4532, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4547 + * # str [:,::1] mvStr + * cnp.ndarray arr + * long dtr = 0 # <<<<<<<<<<<<<< + * int status + * unsigned int i + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":4552 + * unsigned int ij + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":4554 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4555 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4556 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4557 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4556 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":4559 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":4555 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4560 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4562 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4563 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4564 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4565 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 4562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4561 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4566 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4566, __pyx_L1_error) + + /* "PyCafe.pyx":4560 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4568 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_5, 0, Py_None); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4554 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4570 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_1 = 1; + break; + default: + __pyx_t_1 = 0; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4571 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4572 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":4573 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4574 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":4573 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":4576 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4578 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4579 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4580 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4581 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4583 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4577 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4585 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4585, __pyx_L1_error) + + /* "PyCafe.pyx":4576 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4586 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_6, 0, Py_None); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4571 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":4589 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4590 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":4589 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":4591 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4593 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4594 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4595 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4596 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4597 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4592 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4598 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4598, __pyx_L1_error) + + /* "PyCafe.pyx":4591 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4599 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_5, 0, Py_None); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4570 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":4601 + * return [None] + * + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __pyx_v_nelemToRetrieveFromCache = __pyx_v_self->hh.getNelemToRetrieveFromCache(__pyx_v_handle); + + /* "PyCafe.pyx":4603 + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":4604 + * + * cdef unsigned int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * # The element type of a typed memoryview may be a numeric scalar type (int, float) + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":4609 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + case CAFE_ENUM: + + /* "PyCafe.pyx":4610 + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) + */ + __pyx_v_sval = ((char (*)[40])malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":4612 + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) # <<<<<<<<<<<<<< + * + * locallist = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheDbrStringArray(__pyx_v_handle, __pyx_v_sval); + + /* "PyCafe.pyx":4614 + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) + * + * locallist = [] # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_locallist = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4616 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * for i in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4618 + * if status == ICAFE_NORMAL: + * + * for i in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * locallist.append(sval[i]) + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":4619 + * + * for i in range(0, nelemToRetrieveFromCache): + * locallist.append(sval[i]) # <<<<<<<<<<<<<< + * + * free(sval) + */ + __pyx_t_6 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_locallist, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":4621 + * locallist.append(sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * return locallist + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4622 + * + * free(sval) + * return locallist # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_locallist); + __pyx_r = __pyx_v_locallist; + goto __pyx_L0; + + /* "PyCafe.pyx":4616 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * for i in range(0, nelemToRetrieveFromCache): + */ + } + + /* "PyCafe.pyx":4624 + * return locallist + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4626 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40)) + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4626, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4626, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4626, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4626, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4626, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L20_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4627 + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40)) + * for i in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4628 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40)) # <<<<<<<<<<<<<< + * for i in range(0, nelemToRetrieveFromCache): + * mvStr[i] = str(sval[i]) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_str_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_40); + __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(3, 4628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4627 + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40)) + * for i in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvStr = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4629 + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40)) + * for i in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvStr[i] = str(sval[i]) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":4630 + * dtype=(np.str_, 40)) + * for i in range(0, nelemToRetrieveFromCache): + * mvStr[i] = str(sval[i]) # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_7 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4630, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":4631 + * for i in range(0, nelemToRetrieveFromCache): + * mvStr[i] = str(sval[i]) + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4633 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + + /* "PyCafe.pyx":4626 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40)) + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":4635 + * return mvStr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4635, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L27_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4635, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L27_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4635, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L27_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4636 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40), order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4637 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_14); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_40); + __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4637, __pyx_L1_error) + + /* "PyCafe.pyx":4636 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40), order='C') + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvStr = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4639 + * dtype=(np.str_, 40), order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvStr[ij] = str(sval[ij]) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4640 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij] = str(sval[ij]) # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_5 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4640, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":4641 + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij] = str(sval[ij]) + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4643 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + + /* "PyCafe.pyx":4635 + * return mvStr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":4645 + * return mvStr + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4645, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4645, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L32_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4646 + * + * elif art in ['array', 'array.array']: + * print( # <<<<<<<<<<<<<< + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4650 + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + * + * arrayArray = [] # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_arrayArray = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4651 + * + * arrayArray = [] + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(str(sval[ij])) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4652 + * arrayArray = [] + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) # <<<<<<<<<<<<<< + * free(sval) + * return arrayArray + */ + __pyx_t_6 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4652, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4653 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) + * free(sval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4654 + * arrayArray.append(str(sval[ij])) + * free(sval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4645 + * return mvStr + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":4656 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4656, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L36_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4656, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L36_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4658 + * elif art in ['ctypes', 'ctype']: + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Multiply(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ctypesArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4659 + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4660 + * ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') # <<<<<<<<<<<<<< + * free(sval) + * return ctypesArray + */ + __pyx_t_7 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4660, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4661 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4662 + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4656 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemToRetrieveFromCache)() + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":4665 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":4666 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":4665 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4667 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvStr = np.empty(nelemToRetrieveFromCache, + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4668 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4669 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40), order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4670 + * print("Returning memoryview") + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij] = sval[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 4670, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4670, __pyx_L1_error) + + /* "PyCafe.pyx":4669 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=(np.str_, 40), order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4671 + * mvStr = np.empty(nelemToRetrieveFromCache, + * dtype=(np.str_, 40), order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvStr[ij] = sval[ij] + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4672 + * dtype=(np.str_, 40), order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij] = sval[ij] # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_9 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":4673 + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij] = sval[ij] + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":4675 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + } + __pyx_L19:; + + /* "PyCafe.pyx":4624 + * return locallist + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":4609 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4677 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":4679 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + * + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheShortArray(handle, i16val) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_i16val = ((short *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4681 + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + * + * status = self._c_cafe.getCacheShortArray(handle, i16val) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheShortArray(__pyx_v_handle, __pyx_v_i16val); + + /* "PyCafe.pyx":4683 + * status = self._c_cafe.getCacheShortArray(handle, i16val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4686 + * # 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']: # <<<<<<<<<<<<<< + * + * mvShortNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4686, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4686, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4686, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4686, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4686, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L44_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4688 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvShortNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4689 + * + * mvShortNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4688 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvShortNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4689 + * + * mvShortNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_14) < 0) __PYX_ERR(3, 4689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4689, __pyx_L1_error) + + /* "PyCafe.pyx":4688 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvShortNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvShortNP = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafe.pyx":4691 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShortNP[ij] = i16val[ij] + * # arr=np.asarray(mvShort) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4692 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShortNP[ij] = i16val[ij] # <<<<<<<<<<<<<< + * # arr=np.asarray(mvShort) + * + */ + __pyx_t_14 = __Pyx_PyInt_From_npy_int16(((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvShortNP, __pyx_v_ij, __pyx_t_14, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + + /* "PyCafe.pyx":4695 + * # arr=np.asarray(mvShort) + * + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShortNP # arr + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":4697 + * free(i16val) + * + * return mvShortNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvShortNP); + __pyx_r = __pyx_v_mvShortNP; + goto __pyx_L0; + + /* "PyCafe.pyx":4686 + * # 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']: # <<<<<<<<<<<<<< + * + * mvShortNP = np.empty( + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":4699 + * return mvShortNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4699, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L51_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4699, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L51_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4699, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L51_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4700 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "PyCafe.pyx":4701 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + + /* "PyCafe.pyx":4700 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); + __pyx_t_14 = 0; + + /* "PyCafe.pyx":4701 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4701, __pyx_L1_error) + + /* "PyCafe.pyx":4700 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(3, 4700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvShort = __pyx_t_15; + __pyx_t_15.memview = NULL; + __pyx_t_15.data = NULL; + + /* "PyCafe.pyx":4703 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4704 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_16 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_16 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4704, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_16)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4705 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":4707 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4699 + * return mvShortNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":4709 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4709, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4709, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L56_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4710 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4711 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append( < short > i16val[ij]) + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4712 + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) # <<<<<<<<<<<<<< + * free(i16val) + * return arrayArray + */ + __pyx_t_5 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4712, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4713 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":4714 + * arrayArray.append( < short > i16val[ij]) + * free(i16val) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4709 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":4716 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4716, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4716, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L60_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4717 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4718 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4719 + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return ctypesArray + */ + __pyx_t_5 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4719, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4720 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":4721 + * ctypesArray[ij] = i16val[ij] + * free(i16val) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4716 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L43; + } + + /* "PyCafe.pyx":4724 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":4725 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":4724 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4724, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4726 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvShort = np.empty( + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4726, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4727 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4728 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4729 + * print("Returning memoryview") + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4728 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4729 + * print("Returning memoryview") + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4729, __pyx_L1_error) + + /* "PyCafe.pyx":4728 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(3, 4728, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvShort = __pyx_t_15; + __pyx_t_15.memview = NULL; + __pyx_t_15.data = NULL; + + /* "PyCafe.pyx":4730 + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4731 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_17 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_17 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4731, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_17)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4732 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":4734 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L43:; + + /* "PyCafe.pyx":4683 + * status = self._c_cafe.getCacheShortArray(handle, i16val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":4677 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4738 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheLongArray(handle, ival) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ival = ((int *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4740 + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) + * + * status = self._c_cafe.getCacheLongArray(handle, ival) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheLongArray(__pyx_v_handle, __pyx_v_ival); + + /* "PyCafe.pyx":4742 + * status = self._c_cafe.getCacheLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_3 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4744 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4744, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4744, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4744, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4744, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4744, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L68_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4746 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4747 + * + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4746 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4747 + * + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(3, 4747, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4747, __pyx_L1_error) + + /* "PyCafe.pyx":4746 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvIntNP = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4748 + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvIntNP[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4749 + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvIntNP # arr + */ + __pyx_t_7 = __Pyx_PyInt_From_npy_int32(((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvIntNP, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4749, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":4750 + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvIntNP # arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":4751 + * mvIntNP[ij] = ival[ij] + * free(ival) + * return mvIntNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvIntNP); + __pyx_r = __pyx_v_mvIntNP; + goto __pyx_L0; + + /* "PyCafe.pyx":4744 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty( + */ + goto __pyx_L67; + } + + /* "PyCafe.pyx":4753 + * return mvIntNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4753, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L75_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4753, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L75_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4753, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L75_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4754 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4755 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4755, __pyx_L1_error) + + /* "PyCafe.pyx":4754 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(3, 4754, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvInt = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":4756 + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4757 + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_19 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4757, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_19)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4758 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":4759 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4753 + * return mvIntNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + goto __pyx_L67; + } + + /* "PyCafe.pyx":4761 + * return mvInt + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4761, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L80_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4761, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L80_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4762 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4763 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append( < int > ival[ij]) + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4764 + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) # <<<<<<<<<<<<<< + * free(ival) + * return arrayArray + */ + __pyx_t_5 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4765 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":4766 + * arrayArray.append( < int > ival[ij]) + * free(ival) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4761 + * return mvInt + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L67; + } + + /* "PyCafe.pyx":4768 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4768, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4768, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L84_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4769 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4770 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4771 + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return ctypesArray + */ + __pyx_t_5 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4771, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4772 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":4773 + * ctypesArray[ij] = ival[ij] + * free(ival) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4768 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L67; + } + + /* "PyCafe.pyx":4776 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":4777 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":4776 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4778 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4779 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4780 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4781 + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4781, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(3, 4781, __pyx_L1_error) + + /* "PyCafe.pyx":4780 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(3, 4780, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvInt = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":4782 + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4783 + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_20 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_20 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4783, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_20)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4784 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":4785 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L67:; + + /* "PyCafe.pyx":4742 + * status = self._c_cafe.getCacheLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":4736 + * return mvShort + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4789 + * elif dtcheck in [CAFE_FLOAT]: + * + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheFloatArray(handle, fval) + */ + __pyx_v_fval = ((float *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(float))))); + + /* "PyCafe.pyx":4791 + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) + * + * status = self._c_cafe.getCacheFloatArray(handle, fval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheFloatArray(__pyx_v_handle, __pyx_v_fval); + + /* "PyCafe.pyx":4793 + * status = self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4795 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4795, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4795, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4795, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4795, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4795, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L92_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4797 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4798 + * + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":4797 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4798 + * + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_14) < 0) __PYX_ERR(3, 4798, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "PyCafe.pyx":4797 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvFloatNP = __pyx_t_14; + __pyx_t_14 = 0; + + /* "PyCafe.pyx":4799 + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4800 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_14 = PyFloat_FromDouble(((float)(__pyx_v_fval[__pyx_v_ij]))); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvFloatNP, __pyx_v_ij, __pyx_t_14, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4800, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + + /* "PyCafe.pyx":4802 + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + * + * free(fval) # <<<<<<<<<<<<<< + * + * return mvFloatNP # arr + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":4804 + * free(fval) + * + * return mvFloatNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvFloatNP); + __pyx_r = __pyx_v_mvFloatNP; + goto __pyx_L0; + + /* "PyCafe.pyx":4795 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty( + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":4806 + * return mvFloatNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4806, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L99_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4806, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L99_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4806, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L99_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4809 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + + /* "PyCafe.pyx":4810 + * # Method A to return memory view + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + + /* "PyCafe.pyx":4809 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); + __pyx_t_14 = 0; + + /* "PyCafe.pyx":4810 + * # Method A to return memory view + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4809 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(3, 4809, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvFloat = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":4811 + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4812 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4812, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_22)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4814 + * mvFloat[ij] = fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":4815 + * + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * # Method B to return memory view + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4806 + * return mvFloatNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":4829 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4829, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4829, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L104_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4830 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4831 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(fval[ij]) + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4832 + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) # <<<<<<<<<<<<<< + * free(fval) + * return arrayArray + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4832, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4833 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":4834 + * arrayArray.append(fval[ij]) + * free(fval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4829 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":4836 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4836, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L108_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4836, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L108_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4837 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_c_float); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4838 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4839 + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return ctypesArray + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4840 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":4841 + * ctypesArray[ij] = fval[ij] + * free(fval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4836 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":4844 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":4845 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":4844 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4846 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvFloat = np.empty( + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4847 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4848 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4849 + * print("Returning memoryview") + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":4848 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4849 + * print("Returning memoryview") + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(3, 4849, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4848 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(3, 4848, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvFloat = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":4850 + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4851 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return mvFloat + */ + __pyx_t_23 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4851, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_23)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4852 + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":4853 + * mvFloat[ij] = fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L91:; + + /* "PyCafe.pyx":4793 + * status = self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":4787 + * return mvInt + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4857 + * elif dtcheck in [CAFE_DOUBLE]: + * + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + __pyx_v_dval = ((double *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(double))))); + + /* "PyCafe.pyx":4859 + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) + * + * status = self._c_cafe.getDoubleArray(handle, dval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_dval); + + /* "PyCafe.pyx":4861 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4863 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvDoubleNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4863, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L116_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4863, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L116_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4863, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L116_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4863, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L116_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4863, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L116_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4865 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4866 + * + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4865 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4866 + * + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(3, 4866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4865 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvDoubleNP = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4867 + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDoubleNP[ij] = dval[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4868 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] # <<<<<<<<<<<<<< + * + * free(dval) + */ + __pyx_t_7 = PyFloat_FromDouble(((double)(__pyx_v_dval[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvDoubleNP, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4868, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":4870 + * mvDoubleNP[ij] = dval[ij] + * + * free(dval) # <<<<<<<<<<<<<< + * return mvDoubleNP # arr + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":4871 + * + * free(dval) + * return mvDoubleNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvDoubleNP); + __pyx_r = __pyx_v_mvDoubleNP; + goto __pyx_L0; + + /* "PyCafe.pyx":4863 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvDoubleNP = np.empty( + */ + goto __pyx_L115; + } + + /* "PyCafe.pyx":4873 + * return mvDoubleNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4873, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L123_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4873, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L123_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4873, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L123_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4876 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4877 + * # Method A to return memory view + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":4876 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4877 + * # Method A to return memory view + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(3, 4877, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4876 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(3, 4876, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvDouble = __pyx_t_24; + __pyx_t_24.memview = NULL; + __pyx_t_24.data = NULL; + + /* "PyCafe.pyx":4878 + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4879 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_25 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_25 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4879, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_25)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4880 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":4881 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4873 + * return mvDoubleNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L115; + } + + /* "PyCafe.pyx":4883 + * return mvDouble + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 4883, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L128_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4883, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L128_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4884 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4885 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(dval[ij]) + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4886 + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) # <<<<<<<<<<<<<< + * free(dval) + * return arrayArray + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 4886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4887 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":4888 + * arrayArray.append(dval[ij]) + * free(dval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4883 + * return mvDouble + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L115; + } + + /* "PyCafe.pyx":4890 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_13 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 4890, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L132_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 4890, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L132_bool_binop_done:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4891 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_double); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4892 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4893 + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return ctypesArray + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(3, 4893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4894 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":4895 + * ctypesArray[ij] = dval[ij] + * free(dval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":4890 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L115; + } + + /* "PyCafe.pyx":4898 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":4899 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":4898 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4900 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvDouble = np.empty( + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4901 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4902 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4903 + * print("Returning memoryview") + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4902 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 4902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4903 + * print("Returning memoryview") + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 4903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(3, 4903, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4902 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(3, 4902, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvDouble = __pyx_t_24; + __pyx_t_24.memview = NULL; + __pyx_t_24.data = NULL; + + /* "PyCafe.pyx":4904 + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":4905 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_26 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_26 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(3, 4905, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_26)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":4906 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":4907 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L115:; + + /* "PyCafe.pyx":4861 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":4855 + * return mvFloat + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":4909 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4910 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4911 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4912 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4911 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L140; + } + + /* "PyCafe.pyx":4914 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L140:; + + /* "PyCafe.pyx":4910 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4915 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_3 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4917 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_9) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4918 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_9 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_9) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4919 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_9) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4920 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_9) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4921 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_9) < 0) __PYX_ERR(3, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4916 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":4922 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4922, __pyx_L1_error) + + /* "PyCafe.pyx":4915 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4923 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 4923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_9, 0, Py_None); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4909 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4512 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ################################################################################## + * # Typed Memoryviews from K.W. Smith + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __PYX_XDEC_MEMVIEW(&__pyx_t_15, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1); + __Pyx_AddTraceback("PyCafe.CyCafe.getArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvShort, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvDouble, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvFloat, 1); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_locallist); + __Pyx_XDECREF(__pyx_v_mvStr); + __Pyx_XDECREF(__pyx_v_arrayArray); + __Pyx_XDECREF(__pyx_v_ctypesArray); + __Pyx_XDECREF(__pyx_v_mvShortNP); + __Pyx_XDECREF(__pyx_v_mvIntNP); + __Pyx_XDECREF(__pyx_v_mvFloatNP); + __Pyx_XDECREF(__pyx_v_mvDoubleNP); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4931 + * ################################################################################## + * + * def getPVStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStrCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVStrCache", 0); + + /* "PyCafe.pyx":4932 + * + * def getPVStrCache(self, handlePV): + * return self.getPVCache(handlePV, 'str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4932, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4932, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4931 + * ################################################################################## + * + * def getPVStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStrCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4936 + * + * ################################################################################## + * def getPVIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVIntCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVIntCache", 0); + + /* "PyCafe.pyx":4937 + * ################################################################################## + * def getPVIntCache(self, handlePV): + * return self.getPVCache(handlePV, 'int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4937, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4937, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4936 + * + * ################################################################################## + * def getPVIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVIntCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4941 + * + * ################################################################################## + * def getPVFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloatCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVFloatCache", 0); + + /* "PyCafe.pyx":4942 + * ################################################################################## + * def getPVFloatCache(self, handlePV): + * return self.getPVCache(handlePV, 'float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4942, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4942, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4941 + * + * ################################################################################## + * def getPVFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloatCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4946 + * + * ################################################################################## + * def getPVCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_325getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_325getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVCache") < 0)) __PYX_ERR(3, 4946, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4946, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4946, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_324getPVCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_324getPVCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVDataHolder __pyx_v_pvd; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pvd_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_7; + __Pyx_RefNannySetupContext("getPVCache", 0); + + /* "PyCafe.pyx":4949 + * ################################################################################## + * + * cdef str _METHOD = "getPVCache(handlePV, str dt='native'" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getPVCache_handlePV_str_dt_nativ); + __pyx_v__METHOD = __pyx_kp_u_getPVCache_handlePV_str_dt_nativ; + + /* "PyCafe.pyx":4951 + * cdef str _METHOD = "getPVCache(handlePV, str dt='native'" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4953 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4954 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4954, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4953 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4955 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4956 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 4956, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 4956, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4955 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4958 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 4958, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4963 + * cdef PVDataHolder pvd + * + * pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCache(handle, pvd) + */ + (void)(__pyx_v_pvd.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCache(__pyx_v_handle))); + + /* "PyCafe.pyx":4965 + * pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) + * + * status = self._c_cafe.getCache(handle, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCache(__pyx_v_handle, __pyx_v_pvd); + + /* "PyCafe.pyx":4967 + * status = self._c_cafe.getCache(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4968 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4969 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4970 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4969 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":4972 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":4968 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4973 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4975 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4976 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4977 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4978 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 4975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4974 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4979 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 4979, __pyx_L1_error) + + /* "PyCafe.pyx":4973 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4981 + * raise _cafeException + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * # pvd_valnone.value[0]=None + * return pvd_valnone + */ + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvd_valnone = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4983 + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * # pvd_valnone.value[0]=None + * return pvd_valnone # <<<<<<<<<<<<<< + * + * return PVDataHolderToStruct(pvd, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvd_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvd_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":4967 + * status = self._c_cafe.getCache(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4985 + * return pvd_valnone + * + * return PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 4985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4946 + * + * ################################################################################## + * def getPVCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4992 + * + * ################################################################################## + * def getCtrl(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_327getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_327getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCtrl (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCtrl") < 0)) __PYX_ERR(3, 4992, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCtrl", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 4992, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 4992, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_326getCtrl(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_326getCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVCtrlHolder __pyx_v_pvc; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_pvc_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct __pyx_t_7; + __Pyx_RefNannySetupContext("getCtrl", 0); + + /* "PyCafe.pyx":4995 + * ################################################################################## + * + * cdef str _METHOD = "getCtrl(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCtrl_handlePV_str_dt_native); + __pyx_v__METHOD = __pyx_kp_u_getCtrl_handlePV_str_dt_native; + + /* "PyCafe.pyx":4997 + * cdef str _METHOD = "getCtrl(handlePV, str dt='native')" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4999 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5000 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5000, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4999 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5001 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5002 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 5002, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5001 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5004 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 5004, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5009 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemClientCtrl(handle)) # do this dynamically # <<<<<<<<<<<<<< + * + * cdef int status + */ + (void)(__pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemClientCtrl(__pyx_v_handle))); + + /* "PyCafe.pyx":5012 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCtrl(handle, pvc) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5013 + * cdef int status + * with nogil: + * status = self._c_cafe.getCtrl(handle, pvc) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCtrl(__pyx_v_handle, __pyx_v_pvc); + } + + /* "PyCafe.pyx":5012 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCtrl(handle, pvc) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5015 + * status = self._c_cafe.getCtrl(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5016 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5017 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5018 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5017 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5020 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":5016 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5021 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5023 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5024 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5025 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5026 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 5023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5022 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5027 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5027, __pyx_L1_error) + + /* "PyCafe.pyx":5021 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5029 + * raise _cafeException + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * pvc_valnone.value[0] = None + * return pvc_valnone + */ + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5030 + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvc_valnone + * return PVCtrlHolderToStruct(pvc, dt) + */ + if (unlikely(__pyx_v_pvc_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5030, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvc_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(3, 5030, __pyx_L1_error) + + /* "PyCafe.pyx":5031 + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None + * return pvc_valnone # <<<<<<<<<<<<<< + * return PVCtrlHolderToStruct(pvc, dt) + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvc_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvc_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":5015 + * status = self._c_cafe.getCtrl(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":5032 + * pvc_valnone.value[0] = None + * return pvc_valnone + * return PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4992 + * + * ################################################################################## + * def getCtrl(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5040 + * ################################################################################## + * + * def getCtrlCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCtrlCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCtrlCache") < 0)) __PYX_ERR(3, 5040, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCtrlCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5040, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrlCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 5040, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVCtrlHolder __pyx_v_pvc; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_pvc_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct __pyx_t_7; + __Pyx_RefNannySetupContext("getCtrlCache", 0); + + /* "PyCafe.pyx":5042 + * def getCtrlCache(self, handlePV, str dt='native'): + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * + */ + __Pyx_INCREF(__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat); + __pyx_v__METHOD = __pyx_kp_u_getCtrlCache_handlePV_str_dt_nat; + + /* "PyCafe.pyx":5043 + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5045 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5046 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5046, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5045 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5047 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5048 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 5048, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5048, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5047 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5050 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 5050, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5055 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCtrlCache(__pyx_v_handle))); + + /* "PyCafe.pyx":5058 + * + * + * status = self._c_cafe.getCtrlCache(handle, pvc) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCtrlCache(__pyx_v_handle, __pyx_v_pvc); + + /* "PyCafe.pyx":5060 + * status = self._c_cafe.getCtrlCache(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5061 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5062 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5063 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5062 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5065 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":5061 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5066 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5068 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5069 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5070 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5071 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 5068, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5067 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5072 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5072, __pyx_L1_error) + + /* "PyCafe.pyx":5066 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5074 + * raise _cafeException + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * pvc_valnone.value[0] = None + * return pvc_valnone + */ + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5075 + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvc_valnone + * + */ + if (unlikely(__pyx_v_pvc_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5075, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvc_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(3, 5075, __pyx_L1_error) + + /* "PyCafe.pyx":5076 + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None + * return pvc_valnone # <<<<<<<<<<<<<< + * + * return PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvc_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvc_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":5060 + * status = self._c_cafe.getCtrlCache(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":5078 + * return pvc_valnone + * + * return PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7.__pyx_n = 1; + __pyx_t_7.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5040 + * ################################################################################## + * + * def getCtrlCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrlCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5086 + * ################################################################################## + * + * def groupMonitorStop(self, ghandleName): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStop (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("groupMonitorStop", 0); + + /* "PyCafe.pyx":5088 + * def groupMonitorStop(self, ghandleName): + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStop_ghandleName); + __pyx_v__METHOD = __pyx_kp_u_groupMonitorStop_ghandleName; + + /* "PyCafe.pyx":5090 + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5091 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5092 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5092, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5091 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5093 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5094 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5094, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5094, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5093 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5096 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info= ("First input argument, should be of type " + */ + /*else*/ { + + /* "PyCafe.pyx":5097 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info= ("First input argument, should be of type " + * "if group handle, else if group name")) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5097, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5097, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_8) < 0) __PYX_ERR(3, 5097, __pyx_L1_error) + + /* "PyCafe.pyx":5096 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info= ("First input argument, should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5100 + * _error_info= ("First input argument, should be of type " + * "if group handle, else if group name")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5100, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5104 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5105 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5104 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5108 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5110 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5111 + * + * with nogil: + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStop(__pyx_v_ghandle, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":5110 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5113 + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5114 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5115 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5114 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5113 + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5117 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5086 + * ################################################################################## + * + * def groupMonitorStop(self, ghandleName): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5123 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v__monid = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorPolicyVector (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_monid_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_monid_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getMonitorPolicyVector", 1, 2, 2, 1); __PYX_ERR(3, 5123, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMonitorPolicyVector") < 0)) __PYX_ERR(3, 5123, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v__monid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getMonitorPolicyVector", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5123, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorPolicyVector", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v__monid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v__monid) { + unsigned int __pyx_v_handle; + std::vector __pyx_v_mpV; + struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_mp = 0; + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle __pyx_t_6; + std::vector ::size_type __pyx_t_7; + std::vector ::size_type __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getMonitorPolicyVector", 0); + + /* "PyCafe.pyx":5125 + * def getMonitorPolicyVector(self, handlePV, _monid): + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5126 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5127 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5127, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5126 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5128 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5129 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 5129, __pyx_L1_error) + __pyx_t_6.__pyx_n = 1; + __pyx_t_6.force = 1; + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5128 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5131 + * handle = self.checkForHandle(handlePV, force=True) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 5131, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5136 + * cdef vector[MonitorPolicy] mpV + * + * self.hh.getMonitorPolicyVector(handle, mpV) # <<<<<<<<<<<<<< + * + * cdef monitorpolicy mp + */ + (void)(__pyx_v_self->hh.getMonitorPolicyVector(__pyx_v_handle, __pyx_v_mpV)); + + /* "PyCafe.pyx":5140 + * cdef monitorpolicy mp + * + * mp = monitorpolicy() # <<<<<<<<<<<<<< + * + * cdef unsigned int i + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_monitorpolicy)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_mp = ((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5144 + * cdef unsigned int i + * + * for i in range(0, mpV.size()): # <<<<<<<<<<<<<< + * + * if mpV[i].getMonitorID() == _monid: + */ + __pyx_t_7 = __pyx_v_mpV.size(); + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_8; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":5146 + * for i in range(0, mpV.size()): + * + * if mpV[i].getMonitorID() == _monid: # <<<<<<<<<<<<<< + * + * mp.monid = mpV[i].getMonitorID() + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpV[__pyx_v_i]).getMonitorID()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_v__monid, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 5146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":5148 + * if mpV[i].getMonitorID() == _monid: + * + * mp.monid = mpV[i].getMonitorID() # <<<<<<<<<<<<<< + * + * mp.nelem = mpV[i].getNelem() + */ + __pyx_v_mp->monid = (__pyx_v_mpV[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5150 + * mp.monid = mpV[i].getMonitorID() + * + * mp.nelem = mpV[i].getNelem() # <<<<<<<<<<<<<< + * + * mp.dataType = mpV[i].getDataType() + */ + __pyx_v_mp->nelem = (__pyx_v_mpV[__pyx_v_i]).getNelem(); + + /* "PyCafe.pyx":5152 + * mp.nelem = mpV[i].getNelem() + * + * mp.dataType = mpV[i].getDataType() # <<<<<<<<<<<<<< + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() + */ + __pyx_v_mp->dataType = (__pyx_v_mpV[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":5153 + * + * mp.dataType = mpV[i].getDataType() + * mp.userArgs = mpV[i].getUserArgs() # <<<<<<<<<<<<<< + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() + */ + __pyx_v_mp->userArgs = ((long)(__pyx_v_mpV[__pyx_v_i]).getUserArgs()); + + /* "PyCafe.pyx":5154 + * mp.dataType = mpV[i].getDataType() + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() # <<<<<<<<<<<<<< + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() + */ + __pyx_v_mp->dbrDataType = (__pyx_v_mpV[__pyx_v_i]).getDbrDataType(); + + /* "PyCafe.pyx":5155 + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() # <<<<<<<<<<<<<< + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + */ + __pyx_v_mp->cafeDbrType = (__pyx_v_mpV[__pyx_v_i]).getCafeDbrType(); + + /* "PyCafe.pyx":5156 + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() # <<<<<<<<<<<<<< + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + */ + __pyx_v_mp->mask = (__pyx_v_mpV[__pyx_v_i]).getMask(); + + /* "PyCafe.pyx":5157 + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() # <<<<<<<<<<<<<< + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + */ + __pyx_v_mp->maskHasDBE_PROPERTY = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_PROPERTY(); + + /* "PyCafe.pyx":5158 + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() # <<<<<<<<<<<<<< + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + */ + __pyx_v_mp->maskHasDBE_VALUE = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_VALUE(); + + /* "PyCafe.pyx":5159 + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() # <<<<<<<<<<<<<< + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + * break + */ + __pyx_v_mp->maskHasDBE_LOG = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_LOG(); + + /* "PyCafe.pyx":5160 + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_mp->maskHasDBE_ALARM = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_ALARM(); + + /* "PyCafe.pyx":5161 + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + * break # <<<<<<<<<<<<<< + * + * return mp + */ + goto __pyx_L7_break; + + /* "PyCafe.pyx":5146 + * for i in range(0, mpV.size()): + * + * if mpV[i].getMonitorID() == _monid: # <<<<<<<<<<<<<< + * + * mp.monid = mpV[i].getMonitorID() + */ + } + } + __pyx_L7_break:; + + /* "PyCafe.pyx":5163 + * break + * + * return mp # <<<<<<<<<<<<<< + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_mp)); + __pyx_r = ((PyObject *)__pyx_v_mp); + goto __pyx_L0; + + /* "PyCafe.pyx":5123 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorPolicyVector", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_mp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5165 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_335groupMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_335groupMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitor (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitor") < 0)) __PYX_ERR(3, 5165, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5165, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__99; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5166, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__100; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 5167, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitor", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5165, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_334groupMonitor(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_334groupMonitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("groupMonitor", 0); + + /* "PyCafe.pyx":5168 + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + * return self.groupMonitorStart(ghandleName, cb, dbr, mask, notify_milliseconds) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_groupMonitorStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_notify_milliseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ghandleName, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ghandleName, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_cb); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5165 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5171 + * + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStart (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStart") < 0)) __PYX_ERR(3, 5171, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5172, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__101; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5173, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__102; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 5174, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStart", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5171, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + std::vector __pyx_v_mpV; + unsigned long __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + PyObject *__pyx_v_handleList = NULL; + long __pyx_v_i; + PyObject *__pyx_v_sig = NULL; + PyObject *__pyx_v_param = NULL; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + long __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + __Pyx_RefNannySetupContext("groupMonitorStart", 0); + + /* "PyCafe.pyx":5176 + * unsigned short notify_milliseconds=0): + * ################################################################################## + * cdef str _METHOD = "groupMonitorStart(ghandleName, cb, dbr, mask)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStart_ghandleName_cb); + __pyx_v__METHOD = __pyx_kp_u_groupMonitorStart_ghandleName_cb; + + /* "PyCafe.pyx":5178 + * cdef str _METHOD = "groupMonitorStart(ghandleName, cb, dbr, mask)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5179 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5180 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5180, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5179 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5181 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5182 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5182, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5181 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5184 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5184, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5184, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5184, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5186 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * global monDictGlobal + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5186, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5191 + * global handleMonDictGlobal + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":5192 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + __pyx_t_1 = 0; + break; + default: + __pyx_t_1 = 1; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5193 + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( # <<<<<<<<<<<<<< + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStart); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ghandleName); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5195 + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5197 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * # Legacy + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5198 + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * dbr = DBR_TIME # <<<<<<<<<<<<<< + * # Legacy + * #global py_cb + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":5192 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + */ + } + + /* "PyCafe.pyx":5191 + * global handleMonDictGlobal + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + } + + /* "PyCafe.pyx":5207 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5208 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef MonitorPolicy * mp + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5207 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L10; + } + __pyx_L10:; + } + } + + /* "PyCafe.pyx":5211 + * + * cdef MonitorPolicy * mp + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * handleList = [] + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5213 + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handleList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5214 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5216 + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_9 = __pyx_t_4; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":5218 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":5219 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * mpid = mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":5220 + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * mpid = mp[i].getMonitorID() + * + */ + (__pyx_v_mp[__pyx_v_i]).setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5221 + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * mpid = mp[i].getMonitorID() # <<<<<<<<<<<<<< + * + * if cb: + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5223 + * mpid = mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb) + * # a=inspect.getargspec(cb) + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 5223, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":5224 + * + * if cb: + * sig = inspect.signature(cb) # <<<<<<<<<<<<<< + * # a=inspect.getargspec(cb) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_inspect); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_signature); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cb); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5227 + * # a=inspect.getargspec(cb) + * + * print('============//1//') # <<<<<<<<<<<<<< + * print('SIGNATURE:') + * print(str(sig)) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5228 + * + * print('============//1//') + * print('SIGNATURE:') # <<<<<<<<<<<<<< + * print(str(sig)) + * for param in sig.parameters.values(): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5229 + * print('============//1//') + * print('SIGNATURE:') + * print(str(sig)) # <<<<<<<<<<<<<< + * for param in sig.parameters.values(): + * print('Parameter:', param) + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_sig); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5230 + * print('SIGNATURE:') + * print(str(sig)) + * for param in sig.parameters.values(): # <<<<<<<<<<<<<< + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) + */ + __pyx_t_11 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_t_5 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(3, 5230, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_values, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); + __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = 0; + while (1) { + __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_12, &__pyx_t_11, NULL, &__pyx_t_6, NULL, __pyx_t_13); + if (unlikely(__pyx_t_14 == 0)) break; + if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(3, 5230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5231 + * print(str(sig)) + * for param in sig.parameters.values(): + * print('Parameter:', param) # <<<<<<<<<<<<<< + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Parameter); + __Pyx_GIVEREF(__pyx_kp_u_Parameter); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Parameter); + __Pyx_INCREF(__pyx_v_param); + __Pyx_GIVEREF(__pyx_v_param); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_param); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5232 + * for param in sig.parameters.values(): + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) # <<<<<<<<<<<<<< + * print('len2', len(sig.parameters)) + * print('monitor id', mpid) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_n_u_len1); + __Pyx_GIVEREF(__pyx_n_u_len1); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_len1); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5233 + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) # <<<<<<<<<<<<<< + * print('monitor id', mpid) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_n_u_len2); + __Pyx_GIVEREF(__pyx_n_u_len2); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_len2); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5234 + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) + * print('monitor id', mpid) # <<<<<<<<<<<<<< + * + * mp[i].setUserArgs( < void*> mpid) + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_monitor_id); + __Pyx_GIVEREF(__pyx_kp_u_monitor_id); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_monitor_id); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5236 + * print('monitor id', mpid) + * + * mp[i].setUserArgs( < void*> mpid) # <<<<<<<<<<<<<< + * + * if len(sig.parameters) == 1: + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":5238 + * mp[i].setUserArgs( < void*> mpid) + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * monDictGlobal[mpid] = cb + * mp[i].setPyHandler() + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = ((__pyx_t_12 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5239 + * + * if len(sig.parameters) == 1: + * monDictGlobal[mpid] = cb # <<<<<<<<<<<<<< + * mp[i].setPyHandler() + * + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5239, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_7, __pyx_v_cb) < 0)) __PYX_ERR(3, 5239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5240 + * if len(sig.parameters) == 1: + * monDictGlobal[mpid] = cb + * mp[i].setPyHandler() # <<<<<<<<<<<<<< + * + * elif len(sig.parameters) == 2: + */ + (__pyx_v_mp[__pyx_v_i]).setPyHandler(); + + /* "PyCafe.pyx":5238 + * mp[i].setUserArgs( < void*> mpid) + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * monDictGlobal[mpid] = cb + * mp[i].setPyHandler() + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":5242 + * mp[i].setPyHandler() + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5242, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = ((__pyx_t_12 == 2) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5243 + * + * elif len(sig.parameters) == 2: + * mp[i].setPyCyHandler( cb) # <<<<<<<<<<<<<< + * + * elif len(sig.parameters) == 3: + */ + (__pyx_v_mp[__pyx_v_i]).setPyCyHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":5242 + * mp[i].setPyHandler() + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb) + * + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":5245 + * mp[i].setPyCyHandler( cb) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * handleMonDictGlobal[cb] = handleList[i] + * mp[i].setPyCyHandlerData( cb) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = ((__pyx_t_12 == 3) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5246 + * + * elif len(sig.parameters) == 3: + * handleMonDictGlobal[cb] = handleList[i] # <<<<<<<<<<<<<< + * mp[i].setPyCyHandlerData( cb) + * + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_6PyCafe_handleMonDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5246, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_handleMonDictGlobal, __pyx_v_cb, __pyx_t_7) < 0)) __PYX_ERR(3, 5246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5247 + * elif len(sig.parameters) == 3: + * handleMonDictGlobal[cb] = handleList[i] + * mp[i].setPyCyHandlerData( cb) # <<<<<<<<<<<<<< + * + * else: + */ + (__pyx_v_mp[__pyx_v_i]).setPyCyHandlerData(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":5245 + * mp[i].setPyCyHandler( cb) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * handleMonDictGlobal[cb] = handleList[i] + * mp[i].setPyCyHandlerData( cb) + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":5250 + * + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="The signature of the monitor callback function is not supported. \ + * Supported fns are: \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5250, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5250, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_error_info, __pyx_kp_u_The_signature_of_the_monitor_cal) < 0) __PYX_ERR(3, 5250, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5254 + * Supported fns are: \ + * 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + * raise _cafeException # <<<<<<<<<<<<<< + * + * mpV.push_back(mp[i]) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5254, __pyx_L1_error) + } + __pyx_L16:; + + /* "PyCafe.pyx":5223 + * mpid = mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb) + * # a=inspect.getargspec(cb) + */ + } + + /* "PyCafe.pyx":5256 + * raise _cafeException + * + * mpV.push_back(mp[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + try { + __pyx_v_mpV.push_back((__pyx_v_mp[__pyx_v_i])); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 5256, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":5259 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5261 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5262 + * + * with nogil: + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStart(__pyx_v_ghandle, __pyx_v_vStatus, __pyx_v_mpV); + } + + /* "PyCafe.pyx":5261 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":5264 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5265 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5266 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5265 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5264 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5268 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5171 + * + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XDECREF(__pyx_v_param); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5274 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStartWithCBList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":5275 + * + * def groupMonitorStartWithCBList(self, + * ghandleName, list cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=\ + */ + values[1] = ((PyObject*)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStartWithCBList") < 0)) __PYX_ERR(3, 5274, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5276, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__107; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5277, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__108; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 5279, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStartWithCBList", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5274, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStartWithCBList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cb), (&PyList_Type), 1, "cb", 1))) __PYX_ERR(3, 5275, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5274 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + std::vector __pyx_v_mpV; + unsigned long __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + PyObject *__pyx_v_handleList = NULL; + long __pyx_v_i; + PyObject *__pyx_v_sig = NULL; + PyObject *__pyx_v_param = NULL; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + long __pyx_t_11; + Py_ssize_t __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + __Pyx_RefNannySetupContext("groupMonitorStartWithCBList", 0); + + /* "PyCafe.pyx":5281 + * unsigned short notify_milliseconds=0): + * ############################################################################ + * cdef str _METHOD = ("groupMonitorStartWithCBList(ghandleName, cb," + + # <<<<<<<<<<<<<< + * "dbr, mask, notify_milliseconds)") + * + */ + __pyx_t_1 = PyNumber_Positive(__pyx_kp_u_dbr_mask_notify_milliseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(__pyx_kp_u_groupMonitorStartWithCBList_ghan, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(3, 5281, __pyx_L1_error) + __pyx_v__METHOD = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":5284 + * "dbr, mask, notify_milliseconds)") + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5285 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_4 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_5 = (__pyx_t_4 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_4 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":5286 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5286, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_6; + + /* "PyCafe.pyx":5285 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5287 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_4 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5288 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5288, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_ghandle = __pyx_t_6; + + /* "PyCafe.pyx":5287 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5290 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5290, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5290, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5290, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5292 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * global monDictGlobal + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5292, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5297 + * global handleMonDictGlobal + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":5298 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + __pyx_t_3 = 0; + break; + default: + __pyx_t_3 = 1; + break; + } + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":5299 + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( # <<<<<<<<<<<<<< + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + * print( + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ghandleName); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5301 + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5303 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5304 + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * dbr = DBR_TIME # <<<<<<<<<<<<<< + * + * if not isinstance(cb, (list)): + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":5298 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + */ + } + + /* "PyCafe.pyx":5297 + * global handleMonDictGlobal + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + } + + /* "PyCafe.pyx":5306 + * dbr = DBR_TIME + * + * if not isinstance(cb, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * Input cb should be of type and give the list of cb objects") + */ + __pyx_t_4 = PyList_Check(__pyx_v_cb); + __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5307 + * + * if not isinstance(cb, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * Input cb should be of type and give the list of cb objects") + * + */ + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(3, 5307, __pyx_L1_error) + + /* "PyCafe.pyx":5306 + * dbr = DBR_TIME + * + * if not isinstance(cb, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * Input cb should be of type and give the list of cb objects") + */ + } + + /* "PyCafe.pyx":5319 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5320 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if (len(cb) != pvg.getNPV()): + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5319 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5322 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * if (len(cb) != pvg.getNPV()): # <<<<<<<<<<<<<< + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 5322, __pyx_L1_error) + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5322, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_7 != __pyx_v_pvg.getNPV()) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5323 + * + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), # <<<<<<<<<<<<<< + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvg.getNPV()); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":5324 + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * No of group members doe not match the length of callback object list") + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 5324, __pyx_L1_error) + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5324, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":5323 + * + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), # <<<<<<<<<<<<<< + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + */ + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_No_of_group_members_is); + __Pyx_GIVEREF(__pyx_kp_u_No_of_group_members_is); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_No_of_group_members_is); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_while_list_of_callback_objects); + __Pyx_GIVEREF(__pyx_kp_u_while_list_of_callback_objects); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_while_list_of_callback_objects); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":5325 + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * No of group members doe not match the length of callback object list") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(3, 5325, __pyx_L1_error) + + /* "PyCafe.pyx":5322 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * if (len(cb) != pvg.getNPV()): # <<<<<<<<<<<<<< + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + */ + } + + /* "PyCafe.pyx":5329 + * + * cdef MonitorPolicy * mp + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * handleList = [] + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5331 + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handleList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5332 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5334 + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_6 = __pyx_v_pvg.getNPV(); + __pyx_t_10 = __pyx_t_6; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":5336 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":5337 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":5338 + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * + * mpid = mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5340 + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * + * mpid = mp[i].getMonitorID() # <<<<<<<<<<<<<< + * # pyobj = mpid + * # ptr_mpid = &pyobj + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5345 + * + * # For setUserArgs pass the address of the variable. + * if cb[i]: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb[i]) + * + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5345, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 5345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "PyCafe.pyx":5346 + * # For setUserArgs pass the address of the variable. + * if cb[i]: + * sig = inspect.signature(cb[i]) # <<<<<<<<<<<<<< + * + * print('============') + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_inspect); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5346, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5348 + * sig = inspect.signature(cb[i]) + * + * print('============') # <<<<<<<<<<<<<< + * print('SIGNATURE//2//:') + * print(str(sig)) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":5349 + * + * print('============') + * print('SIGNATURE//2//:') # <<<<<<<<<<<<<< + * print(str(sig)) + * for param in sig.parameters.values(): + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":5350 + * print('============') + * print('SIGNATURE//2//:') + * print(str(sig)) # <<<<<<<<<<<<<< + * for param in sig.parameters.values(): + * print('Parameter:', param) + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5351 + * print('SIGNATURE//2//:') + * print(str(sig)) + * for param in sig.parameters.values(): # <<<<<<<<<<<<<< + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) + */ + __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_t_1 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(3, 5351, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_1, 0, __pyx_n_s_values, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); + __pyx_t_2 = __pyx_t_8; + __pyx_t_8 = 0; + while (1) { + __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_12, &__pyx_t_7, NULL, &__pyx_t_8, NULL, __pyx_t_13); + if (unlikely(__pyx_t_14 == 0)) break; + if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(3, 5351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_param, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5352 + * print(str(sig)) + * for param in sig.parameters.values(): + * print('Parameter:', param) # <<<<<<<<<<<<<< + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) + */ + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_Parameter); + __Pyx_GIVEREF(__pyx_kp_u_Parameter); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Parameter); + __Pyx_INCREF(__pyx_v_param); + __Pyx_GIVEREF(__pyx_v_param); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_param); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5353 + * for param in sig.parameters.values(): + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) # <<<<<<<<<<<<<< + * print('len2', len(sig.parameters)) + * print('monitorid', mpid) # ( ptr_mpid)[0]) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_n_u_len1); + __Pyx_GIVEREF(__pyx_n_u_len1); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_len1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5354 + * print('Parameter:', param) + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) # <<<<<<<<<<<<<< + * print('monitorid', mpid) # ( ptr_mpid)[0]) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5354, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_n_u_len2); + __Pyx_GIVEREF(__pyx_n_u_len2); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_len2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5355 + * print('len1', len(sig.parameters.values())) + * print('len2', len(sig.parameters)) + * print('monitorid', mpid) # ( ptr_mpid)[0]) # <<<<<<<<<<<<<< + * + * mp[i].setUserArgs( < void * > mpid) # ( ptr_mpid)[0]) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_n_u_monitorid); + __Pyx_GIVEREF(__pyx_n_u_monitorid); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_monitorid); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5357 + * print('monitorid', mpid) # ( ptr_mpid)[0]) + * + * mp[i].setUserArgs( < void * > mpid) # ( ptr_mpid)[0]) # <<<<<<<<<<<<<< + * + * if len(sig.parameters) == 1: + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":5359 + * mp[i].setUserArgs( < void * > mpid) # ( ptr_mpid)[0]) + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * monDictGlobal[mpid] = cb[i] + * mp[i].setPyHandler() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = ((__pyx_t_12 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5360 + * + * if len(sig.parameters) == 1: + * monDictGlobal[mpid] = cb[i] # <<<<<<<<<<<<<< + * mp[i].setPyHandler() + * + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5360, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5360, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_8, __pyx_t_2) < 0)) __PYX_ERR(3, 5360, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5361 + * if len(sig.parameters) == 1: + * monDictGlobal[mpid] = cb[i] + * mp[i].setPyHandler() # <<<<<<<<<<<<<< + * + * elif len(sig.parameters) == 2: + */ + (__pyx_v_mp[__pyx_v_i]).setPyHandler(); + + /* "PyCafe.pyx":5359 + * mp[i].setUserArgs( < void * > mpid) # ( ptr_mpid)[0]) + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * monDictGlobal[mpid] = cb[i] + * mp[i].setPyHandler() + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":5363 + * mp[i].setPyHandler() + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb[i]) + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = ((__pyx_t_12 == 2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5364 + * + * elif len(sig.parameters) == 2: + * mp[i].setPyCyHandler( cb[i]) # <<<<<<<<<<<<<< + * + * elif len(sig.parameters) == 3: + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5364, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + (__pyx_v_mp[__pyx_v_i]).setPyCyHandler(((void *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5363 + * mp[i].setPyHandler() + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb[i]) + * + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":5366 + * mp[i].setPyCyHandler( cb[i]) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * handleMonDictGlobal[cb[i]] = handleList[i] + * mp[i].setPyCyHandlerData( cb[i]) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = ((__pyx_t_12 == 3) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5367 + * + * elif len(sig.parameters) == 3: + * handleMonDictGlobal[cb[i]] = handleList[i] # <<<<<<<<<<<<<< + * mp[i].setPyCyHandlerData( cb[i]) + * + */ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__pyx_v_6PyCafe_handleMonDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5367, __pyx_L1_error) + } + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5367, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_handleMonDictGlobal, __pyx_t_8, __pyx_t_2) < 0)) __PYX_ERR(3, 5367, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5368 + * elif len(sig.parameters) == 3: + * handleMonDictGlobal[cb[i]] = handleList[i] + * mp[i].setPyCyHandlerData( cb[i]) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5368, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + (__pyx_v_mp[__pyx_v_i]).setPyCyHandlerData(((void *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":5366 + * mp[i].setPyCyHandler( cb[i]) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * handleMonDictGlobal[cb[i]] = handleList[i] + * mp[i].setPyCyHandlerData( cb[i]) + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":5371 + * + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="The signature of the monitor callback function is not supported. \ + * Supported fns are: \ + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5371, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5371, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_error_info, __pyx_kp_u_The_signature_of_the_monitor_cal) < 0) __PYX_ERR(3, 5371, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5375 + * Supported fns are: \ + * 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + * raise _cafeException # <<<<<<<<<<<<<< + * + * mpV.push_back(mp[i]) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5375, __pyx_L1_error) + } + __pyx_L18:; + + /* "PyCafe.pyx":5345 + * + * # For setUserArgs pass the address of the variable. + * if cb[i]: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb[i]) + * + */ + } + + /* "PyCafe.pyx":5377 + * raise _cafeException + * + * mpV.push_back(mp[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + try { + __pyx_v_mpV.push_back((__pyx_v_mp[__pyx_v_i])); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 5377, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":5380 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5382 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5383 + * + * with nogil: + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStart(__pyx_v_ghandle, __pyx_v_vStatus, __pyx_v_mpV); + } + + /* "PyCafe.pyx":5382 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L21; + } + __pyx_L21:; + } + } + + /* "PyCafe.pyx":5385 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5386 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5387 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5386 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5385 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5389 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __pyx_t_8 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5274 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStartWithCBList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XDECREF(__pyx_v_param); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5392 + * + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPVWithinGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,&__pyx_n_s_ghandleName,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getHandleFromPVWithinGroup", 1, 2, 2, 1); __PYX_ERR(3, 5392, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandleFromPVWithinGroup") < 0)) __PYX_ERR(3, 5392, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_pv = ((PyObject*)values[0]); + __pyx_v_ghandleName = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getHandleFromPVWithinGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5392, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyUnicode_Type), 1, "pv", 1))) __PYX_ERR(3, 5392, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_ghandleName); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_ghandle = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + char const *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + char const *__pyx_t_7; + unsigned int __pyx_t_8; + __Pyx_RefNannySetupContext("getHandleFromPVWithinGroup", 0); + + /* "PyCafe.pyx":5393 + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __Pyx_INCREF(__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh); + __pyx_v__METHOD = __pyx_kp_u_getHandleFromPVWithinGroup_pv_gh; + + /* "PyCafe.pyx":5394 + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5395 + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + */ + __Pyx_INCREF(__pyx_v_ghandleName); + __pyx_v_ghandle = __pyx_v_ghandleName; + + /* "PyCafe.pyx":5394 + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5396 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5397 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_ghandleName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(3, 5397, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_ghandle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5396 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5399 + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5399, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5399, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5399, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5401 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * return self.hh.getHandleFromPVWithinGroup(pv, ghandle) + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5401, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5402 + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + * return self.hh.getHandleFromPVWithinGroup(pv, ghandle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_pv); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(3, 5402, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandle); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5402, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getHandleFromPVWithinGroup(__pyx_t_7, __pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5392 + * + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_ghandle); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5406 + * ################################################################################## + * + * def getGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_343getGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_343getGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_342getGroupStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_342getGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupStr", 0); + + /* "PyCafe.pyx":5407 + * + * def getGroupStr(self, ghandleName): + * return self.getGroup(ghandleName, 'str') # <<<<<<<<<<<<<< + * + * def getGroupInt(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5406 + * ################################################################################## + * + * def getGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5409 + * return self.getGroup(ghandleName, 'str') + * + * def getGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_345getGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_345getGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_344getGroupInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_344getGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupInt", 0); + + /* "PyCafe.pyx":5410 + * + * def getGroupInt(self, ghandleName): + * return self.getGroup(ghandleName, 'int') # <<<<<<<<<<<<<< + * + * def getGroupFloat(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5410, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5410, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5409 + * return self.getGroup(ghandleName, 'str') + * + * def getGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5412 + * return self.getGroup(ghandleName, 'int') + * + * def getGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupFloat", 0); + + /* "PyCafe.pyx":5413 + * + * def getGroupFloat(self, ghandleName): + * return self.getGroup(ghandleName, 'float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5413, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5413, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5412 + * return self.getGroup(ghandleName, 'int') + * + * def getGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5416 + * + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_349getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_349getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getGroup") < 0)) __PYX_ERR(3, 5416, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5416, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 5416, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_348getGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_348getGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + long __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + long __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + unsigned int __pyx_t_13; + int __pyx_t_14; + unsigned int __pyx_t_15; + long __pyx_t_16; + __Pyx_RefNannySetupContext("getGroup", 0); + + /* "PyCafe.pyx":5417 + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_getGroup_ghandleName_str_dt_nati); + __pyx_v__METHOD = __pyx_kp_u_getGroup_ghandleName_str_dt_nati; + + /* "PyCafe.pyx":5418 + * def getGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5419 + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5420 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5420, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5419 + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5421 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5422 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5422, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5422, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5421 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5424 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5424, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5424, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5424, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5426 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5426, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5430 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5431 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5430 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5434 + * + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5435 + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * pvd[i].setHasAlarm(False) + * pvd[i].setHasTS(False) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_7 = __pyx_t_4; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":5436 + * pvd = pvg.getPVData() + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) # <<<<<<<<<<<<<< + * pvd[i].setHasTS(False) + * # pvd[i].setRule(False) + */ + (__pyx_v_pvd[__pyx_v_i]).setHasAlarm(0); + + /* "PyCafe.pyx":5437 + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) + * pvd[i].setHasTS(False) # <<<<<<<<<<<<<< + * # pvd[i].setRule(False) + * + */ + (__pyx_v_pvd[__pyx_v_i]).setHasTS(0); + } + + /* "PyCafe.pyx":5440 + * # pvd[i].setRule(False) + * + * pvg.setPVData(pvd) # <<<<<<<<<<<<<< + * # pvd=pvg.getPVData(); + * # print "get rule 0p", pvd[0].getRule() + */ + __pyx_v_pvg.setPVData(__pyx_v_pvd); + + /* "PyCafe.pyx":5447 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5448 + * + * with nogil: + * status = self._c_cafe.groupGet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status == ECA_TIMEOUT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":5447 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":5450 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status == ECA_TIMEOUT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5451 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5452 + * if status == ECA_TIMEOUT: + * print("======================================================") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5453 + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5454 + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5455 + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvg.getNameAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_9, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_9, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_9); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_dt); + __pyx_t_9 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5450 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5457 + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5458 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5459 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * # do not raise exception + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5458 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5457 + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5465 + * # pvg.showMaxMax(5,10) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5467 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5468 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5471 + * cdef unsigned int dtn, dtcheck + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_7 = __pyx_t_4; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":5472 + * + * for i in range(0, pvg.getNPV()): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":5474 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5474, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_13; + + /* "PyCafe.pyx":5476 + * dtcheck = getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5478 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5479 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":5480 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5479 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":5482 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5482, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5481 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":5484 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5483 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":5488 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5489 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5488 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L20; + } + + /* "PyCafe.pyx":5491 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5491, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L20:; + + /* "PyCafe.pyx":5485 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":5494 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5494, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5493 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":5496 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5496, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5495 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":5498 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(None) # no data + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5498, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5497 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":5500 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(None) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5500, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":5478 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":5502 + * localList.append(None) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5503 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":5504 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5505 + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5505, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5503 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":5507 + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5508 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5508, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5506 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":5510 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5511 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5511, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5509 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":5514 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5516 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5517 + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5516 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L29; + } + + /* "PyCafe.pyx":5519 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L29:; + } + + /* "PyCafe.pyx":5512 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":5522 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5524 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5524, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5521 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":5526 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5527 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5525 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":5529 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5530 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5528 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":5532 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(None) # no data + * localList.append(localListInner) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_15 = __pyx_t_13; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_j = __pyx_t_16; + + /* "PyCafe.pyx":5533 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5533, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":5534 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * return localList, status, statusList + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5534, __pyx_L1_error) + } + __pyx_L19:; + } + + /* "PyCafe.pyx":5536 + * localList.append(localListInner) + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5416 + * + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5544 + * ################################################################################## + * + * def getGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_351getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_351getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getGroupCache") < 0)) __PYX_ERR(3, 5544, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getGroupCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5544, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 5544, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_350getGroupCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_350getGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + long __pyx_v_i; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + unsigned int __pyx_t_7; + long __pyx_t_8; + unsigned int __pyx_t_9; + int __pyx_t_10; + unsigned int __pyx_t_11; + long __pyx_t_12; + __Pyx_RefNannySetupContext("getGroupCache", 0); + + /* "PyCafe.pyx":5545 + * + * def getGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_getGroupCache_self_ghandleName_s); + __pyx_v__METHOD = __pyx_kp_u_getGroupCache_self_ghandleName_s; + + /* "PyCafe.pyx":5546 + * def getGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5547 + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5548 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5548, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5547 + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5549 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5550 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5550, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5550, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5549 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5552 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5552, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5552, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5552, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5554 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5554, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5558 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5559 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5558 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5563 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5564 + * + * with nogil: + * status = self._c_cafe.groupGetCache(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGetCache(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":5563 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5566 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5567 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5568 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * # do not raise exception + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5567 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5566 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5573 + * #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5575 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5576 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5579 + * cdef unsigned int dtn, dtcheck + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_7 = __pyx_t_4; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":5580 + * + * for i in range(0, pvg.getNPV()): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":5582 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5582, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_9; + + /* "PyCafe.pyx":5584 + * dtcheck = getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5586 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5587 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":5588 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5588, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5587 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":5590 + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5590, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5589 + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":5592 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5592, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5592, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5591 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":5596 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5597 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5597, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5596 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L17; + } + + /* "PyCafe.pyx":5599 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5599, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L17:; + + /* "PyCafe.pyx":5593 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":5602 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5602, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5601 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":5604 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5603 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":5606 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(None) # no data + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5606, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5605 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":5608 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(None) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, Py_None); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5608, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":5586 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":5610 + * localList.append(None) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5611 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":5612 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5613 + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5611 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":5615 + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5616 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5616, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5614 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":5618 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5619 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5617 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":5622 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5624 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5625 + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5625, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5624 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":5627 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L26:; + } + + /* "PyCafe.pyx":5620 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":5630 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5632 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5632, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5629 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":5634 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5635 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5635, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5633 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":5637 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5638 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5638, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5636 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":5640 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(None) # no data + * localList.append(localListInner) + */ + __pyx_t_9 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_11 = __pyx_t_9; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":5641 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localListInner, Py_None); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5641, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":5642 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * return localList, status, statusList + */ + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 5642, __pyx_L1_error) + } + __pyx_L16:; + } + + /* "PyCafe.pyx":5644 + * localList.append(localListInner) + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5544 + * ################################################################################## + * + * def getGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5652 + * ################################################################################## + * + * def getPVGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupStr", 0); + + /* "PyCafe.pyx":5653 + * + * def getPVGroupStr(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='str') # <<<<<<<<<<<<<< + * + * def getPVGroupInt(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(3, 5653, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5652 + * ################################################################################## + * + * def getPVGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5655 + * return self.getPVGroup(ghandleName, dt='str') + * + * def getPVGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupInt", 0); + + /* "PyCafe.pyx":5656 + * + * def getPVGroupInt(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='int') # <<<<<<<<<<<<<< + * + * def getPVGroupFloat(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(3, 5656, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5655 + * return self.getPVGroup(ghandleName, dt='str') + * + * def getPVGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5658 + * return self.getPVGroup(ghandleName, dt='int') + * + * def getPVGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupFloat", 0); + + /* "PyCafe.pyx":5659 + * + * def getPVGroupFloat(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(3, 5659, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5658 + * return self.getPVGroup(ghandleName, dt='int') + * + * def getPVGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5662 + * + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_359getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_359getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVGroup") < 0)) __PYX_ERR(3, 5662, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5662, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 5662, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_358getPVGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_358getPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + long __pyx_v_i; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + unsigned int __pyx_t_11; + long __pyx_t_12; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_13; + int __pyx_t_14; + __Pyx_RefNannySetupContext("getPVGroup", 0); + + /* "PyCafe.pyx":5663 + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getPVGroup_ghandleName_str_dt_na); + __pyx_v__METHOD = __pyx_kp_u_getPVGroup_ghandleName_str_dt_na; + + /* "PyCafe.pyx":5665 + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5666 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5667 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5667, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5666 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5668 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5669 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * # elif isinstance(ghandleName, (pvgroup)) == 1: + * # print ("We have a PV Group ", type(ghandleName) ) + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5669, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5669, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5668 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5673 + * # print ("We have a PV Group ", type(ghandleName) ) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5673, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5673, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5673, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5675 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5675, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5681 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5682 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5681 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5684 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5695 + * ''' + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5696 + * + * with nogil: + * status = self._c_cafe.groupGet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":5695 + * ''' + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5698 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5699 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5700 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5701 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5699 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5698 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":5705 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + */ + __pyx_t_1 = ((__pyx_v_status == ECA_TIMEOUT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5706 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5707 + * if status == ECA_TIMEOUT: + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5708 + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundPVGroup(ghandle, dt) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5709 + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundPVGroup); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_dt); + __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5705 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + */ + } + + /* "PyCafe.pyx":5711 + * return self.getCompoundPVGroup(ghandle, dt) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5713 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5715 + * localList = [] + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_11 = __pyx_t_4; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":5718 + * #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 + * + */ + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(3, 5718, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":5721 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localList + */ + __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5723 + * pg = pvgroup() + * + * pg.pvdata = localList # <<<<<<<<<<<<<< + * + * pg.npv = pvg.getNPV() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localList; + + /* "PyCafe.pyx":5725 + * pg.pvdata = localList + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":5726 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":5727 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_pvg.getStatusGroup(); + + /* "PyCafe.pyx":5728 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * # pg.showMax(1) + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":5732 + * # pg.showMax(1) + * + * return pg # localList, status # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def getPVGroup(self, ghandleName, str dt='native') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":5662 + * + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5739 + * ################################################################################## + * + * def getPVGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroupCache" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVGroupCache") < 0)) __PYX_ERR(3, 5739, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVGroupCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5739, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(3, 5739, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + long __pyx_v_i; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + long __pyx_t_9; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("getPVGroupCache", 0); + + /* "PyCafe.pyx":5740 + * + * def getPVGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getPVGroupCache" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getPVGroupCache); + __pyx_v__METHOD = __pyx_n_u_getPVGroupCache; + + /* "PyCafe.pyx":5742 + * cdef str _METHOD = "getPVGroupCache" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5743 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5744 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5744, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5743 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5745 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5746 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * # elif isinstance(ghandleName, (pvgroup)) == 1: + * # print ("We have a PV Group ", type(ghandleName) ) + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 5746, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5746, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5745 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5750 + * # print ("We have a PV Group ", type(ghandleName) ) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5750, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5750, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5750, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5752 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5752, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5758 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5759 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * print("==============" ) + * print(_METHOD) + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5758 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5760 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) # <<<<<<<<<<<<<< + * print(_METHOD) + * pvg.showMax(1) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5761 + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + * print(_METHOD) # <<<<<<<<<<<<<< + * pvg.showMax(1) + * + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v__METHOD); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5762 + * print("==============" ) + * print(_METHOD) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":5764 + * pvg.showMax(1) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5766 + * pvd = pvg.getPVData() + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) # <<<<<<<<<<<<<< + * pvg.showMax(1) + * print("==============" ) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGetCache(__pyx_v_ghandle, __pyx_v_pvg); + + /* "PyCafe.pyx":5767 + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * print("==============" ) + * print(status, pvg.getStatusGroup()) + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":5768 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) + * print("==============" ) # <<<<<<<<<<<<<< + * print(status, pvg.getStatusGroup()) + * print("==============" ) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5769 + * pvg.showMax(1) + * print("==============" ) + * print(status, pvg.getStatusGroup()) # <<<<<<<<<<<<<< + * print("==============" ) + * if status != ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pvg.getStatusGroup()); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5770 + * print("==============" ) + * print(status, pvg.getStatusGroup()) + * print("==============" ) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5771 + * print(status, pvg.getStatusGroup()) + * print("==============" ) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5772 + * print("==============" ) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5773 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5774 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5772 + * print("==============" ) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5771 + * print(status, pvg.getStatusGroup()) + * print("==============" ) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":5778 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5780 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5782 + * localList = [] + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_8 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":5785 + * #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 + * + */ + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 5785, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5788 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localList + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5788, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5790 + * pg = pvgroup() + * + * pg.pvdata = localList # <<<<<<<<<<<<<< + * + * pg.npv = pvg.getNPV() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localList; + + /* "PyCafe.pyx":5792 + * pg.pvdata = localList + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":5793 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":5794 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_pvg.getStatusGroup(); + + /* "PyCafe.pyx":5795 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * return pg + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":5797 + * pg.groupHandle = pvg.getGroupHandle() + * + * return pg # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def getPVGroup(self, ghandleName, str dt='native') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":5739 + * ################################################################################## + * + * def getPVGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroupCache" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5804 + * ################################################################################## + * + * def PVGroupValuesToList(self, pvgroup pg): # <<<<<<<<<<<<<< + * glist = [] + * for i in range(0, pg.npv): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("PVGroupValuesToList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pg), __pyx_ptype_6PyCafe_pvgroup, 1, "pg", 0))) __PYX_ERR(3, 5804, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_pg)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg) { + PyObject *__pyx_v_glist = NULL; + long __pyx_v_i; + PyObject *__pyx_v_iL = NULL; + Py_ssize_t __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + unsigned int __pyx_t_3; + long __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + __Pyx_RefNannySetupContext("PVGroupValuesToList", 0); + + /* "PyCafe.pyx":5805 + * + * def PVGroupValuesToList(self, pvgroup pg): + * glist = [] # <<<<<<<<<<<<<< + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_glist = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5806 + * def PVGroupValuesToList(self, pvgroup pg): + * glist = [] + * for i in range(0, pg.npv): # <<<<<<<<<<<<<< + * if len(pg.pvdata[i].value) == 1: + * glist.append(pg.pvdata[i].value[0]) + */ + __pyx_t_2 = __pyx_v_pg->npv; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":5807 + * glist = [] + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * glist.append(pg.pvdata[i].value[0]) + * else: + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5807, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5807, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = ((__pyx_t_6 == 1) != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":5808 + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: + * glist.append(pg.pvdata[i].value[0]) # <<<<<<<<<<<<<< + * else: + * iL = [] + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5808, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 5808, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5807 + * glist = [] + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * glist.append(pg.pvdata[i].value[0]) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":5810 + * glist.append(pg.pvdata[i].value[0]) + * else: + * iL = [] # <<<<<<<<<<<<<< + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) + */ + /*else*/ { + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_iL, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5811 + * else: + * iL = [] + * for j in range(0, len(pg.pvdata[i].value)): # <<<<<<<<<<<<<< + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5811, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5811, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __pyx_t_6; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":5812 + * iL = [] + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) # <<<<<<<<<<<<<< + * glist.append(iL) + * return glist + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5812, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_iL, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 5812, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":5813 + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) # <<<<<<<<<<<<<< + * return glist + * ################################################################################## + */ + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_v_iL); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 5813, __pyx_L1_error) + } + __pyx_L5:; + } + + /* "PyCafe.pyx":5814 + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) + * return glist # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_glist); + __pyx_r = __pyx_v_glist; + goto __pyx_L0; + + /* "PyCafe.pyx":5804 + * ################################################################################## + * + * def PVGroupValuesToList(self, pvgroup pg): # <<<<<<<<<<<<<< + * glist = [] + * for i in range(0, pg.npv): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.PVGroupValuesToList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_glist); + __Pyx_XDECREF(__pyx_v_iL); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5819 + * ################################################################################## + * + * def groupMemberList(self, str gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_365groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_365groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMemberList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gname), (&PyUnicode_Type), 1, "gname", 1))) __PYX_ERR(3, 5819, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_364groupMemberList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_gname)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_364groupMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gname) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_pvlist; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("groupMemberList", 0); + + /* "PyCafe.pyx":5820 + * + * def groupMemberList(self, str gname): + * cdef str _METHOD = "groupMemberList(self, str gname)" # <<<<<<<<<<<<<< + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + */ + __Pyx_INCREF(__pyx_kp_u_groupMemberList_self_str_gname); + __pyx_v__METHOD = __pyx_kp_u_groupMemberList_self_str_gname; + + /* "PyCafe.pyx":5822 + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_gname); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(3, 5822, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupMemberList(__pyx_t_1, __pyx_v_pvlist); + + /* "PyCafe.pyx":5823 + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5824 + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5825 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return pvlist + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5824 + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5823 + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5827 + * self._c_cafe.printStatusMessage(status) + * + * return pvlist # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvlist); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5819 + * ################################################################################## + * + * def groupMemberList(self, str gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5831 + * ################################################################################## + * + * def grouping(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_367grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_367grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("grouping (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("grouping", 1, 2, 2, 1); __PYX_ERR(3, 5831, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "grouping") < 0)) __PYX_ERR(3, 5831, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(3, 5831, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("grouping", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5831, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(3, 5831, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_366grouping(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_366grouping(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + unsigned int __pyx_v_ghandle; + char *__pyx_v__gname; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + CYTHON_UNUSED PyObject *__pyx_v_localList = 0; + PyObject *__pyx_v_statusList = 0; + short __pyx_v_wtfsb; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + Py_ssize_t __pyx_t_13; + Py_ssize_t __pyx_t_14; + Py_ssize_t __pyx_t_15; + __Pyx_RefNannySetupContext("grouping", 0); + + /* "PyCafe.pyx":5832 + * + * def grouping(self, char * gname, list _pvlist): + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" # <<<<<<<<<<<<<< + * + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + */ + __Pyx_INCREF(__pyx_kp_u_grouping_char_gname_list__pvlist); + __pyx_v__METHOD = __pyx_kp_u_grouping_char_gname_list__pvlist; + + /* "PyCafe.pyx":5834 + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5834, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":5836 + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5837 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5838 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5837 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5836 + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5840 + * self._c_cafe.printStatusMessage(status) + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * cdef char * _gname = gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5841 + * + * cdef unsigned int ghandle = 0 + * cdef char * _gname = gname # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":5843 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "PyCafe.pyx":5845 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5846 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * ELSE: + * #Gil acquired and released within conduit.h + */ + try { + __pyx_t_6 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(3, 5846, __pyx_L12_error) + } + __pyx_v_status = __pyx_t_6; + } + + /* "PyCafe.pyx":5845 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L12_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5_error; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":5843 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L10_try_end; + __pyx_L5_error:; + + /* "PyCafe.pyx":5851 + * #with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) + * except: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + /*except:*/ { + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(3, 5851, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":5853 + * except: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, # <<<<<<<<<<<<<< + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5854 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) + */ + __pyx_t_11 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5854, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_11) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5855 + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5855, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_11) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5855, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_11) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5856 + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5856, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_11) < 0) __PYX_ERR(3, 5853, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5852 + * status = self._c_cafe.groupOpen(_gname, ghandle) + * except: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5852, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":5857 + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5857, __pyx_L7_except_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L6_exception_handled; + } + __pyx_L7_except_error:; + + /* "PyCafe.pyx":5843 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L6_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __pyx_L10_try_end:; + } + + /* "PyCafe.pyx":5859 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5861 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, # <<<<<<<<<<<<<< + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_8) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5862 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5863 + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5864 + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(3, 5861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5860 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5865 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5865, __pyx_L1_error) + + /* "PyCafe.pyx":5859 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + } + + /* "PyCafe.pyx":5874 + * list statusList + * + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * + * if wtfsb == FLUSH_NOW: + */ + __pyx_v_wtfsb = __pyx_v_self->_c_cafe->channelOpenGroupPolicy.getWhenToFlushSendBuffer(); + + /* "PyCafe.pyx":5876 + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getGroup(ghandle) + */ + __pyx_t_2 = ((__pyx_v_wtfsb == FLUSH_NOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5878 + * if wtfsb == FLUSH_NOW: + * + * localList, status, statusList = self.getGroup(ghandle) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(3, 5878, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_9 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_11 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); + #else + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext; + index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 2; __pyx_t_11 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 3) < 0) __PYX_ERR(3, 5878, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L19_unpacking_done; + __pyx_L18_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(3, 5878, __pyx_L1_error) + __pyx_L19_unpacking_done:; + } + if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(3, 5878, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5878, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(3, 5878, __pyx_L1_error) + __pyx_v_localList = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + __pyx_v_status = __pyx_t_6; + __pyx_v_statusList = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":5880 + * localList, status, statusList = self.getGroup(ghandle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5881 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("") + * print("Error in def grouping for group named", _gname) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5882 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") # <<<<<<<<<<<<<< + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5883 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + * print("Error in def grouping for group named", _gname) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Error_in_def_grouping_for_group); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_def_grouping_for_group); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Error_in_def_grouping_for_group); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5884 + * print("") + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5885 + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") # <<<<<<<<<<<<<< + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":5886 + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): # <<<<<<<<<<<<<< + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 5886, __pyx_L1_error) + } + __pyx_t_13 = PyList_GET_SIZE(__pyx_v_statusList); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(3, 5886, __pyx_L1_error) + __pyx_t_14 = __pyx_t_13; + for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { + __pyx_v_i = __pyx_t_15; + + /* "PyCafe.pyx":5887 + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5887, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 5887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":5888 + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], # <<<<<<<<<<<<<< + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + */ + if (unlikely(__pyx_v__pvlist == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5888, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v__pvlist, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 5888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":5889 + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") + */ + __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "PyCafe.pyx":5888 + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], # <<<<<<<<<<<<<< + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + */ + __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 5888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_n_u_PV_4); + __Pyx_GIVEREF(__pyx_n_u_PV_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_PV_4); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); + __Pyx_INCREF(__pyx_kp_u__121); + __Pyx_GIVEREF(__pyx_kp_u__121); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__121); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_11); + __Pyx_INCREF(__pyx_kp_u__122); + __Pyx_GIVEREF(__pyx_kp_u__122); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__122); + __Pyx_INCREF(__pyx_kp_u_has_error); + __Pyx_GIVEREF(__pyx_kp_u_has_error); + PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_kp_u_has_error); + __pyx_t_7 = 0; + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5890 + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) # <<<<<<<<<<<<<< + * print("") + * return ghandle + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 5890, __pyx_L1_error) + } + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_6); + + /* "PyCafe.pyx":5891 + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") # <<<<<<<<<<<<<< + * return ghandle + * + */ + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5887 + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + */ + } + } + + /* "PyCafe.pyx":5881 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("") + * print("Error in def grouping for group named", _gname) + */ + } + + /* "PyCafe.pyx":5880 + * localList, status, statusList = self.getGroup(ghandle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + */ + } + + /* "PyCafe.pyx":5876 + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getGroup(ghandle) + */ + } + + /* "PyCafe.pyx":5892 + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") + * return ghandle # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5831 + * ################################################################################## + * + * def grouping(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5896 + * + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_gname; + char const *__pyx_v_cname; + PyObject *__pyx_v_attrib = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupDefineFromCollection (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_cname,&__pyx_n_s_attrib,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cname)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, 1); __PYX_ERR(3, 5896, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, 2); __PYX_ERR(3, 5896, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupDefineFromCollection") < 0)) __PYX_ERR(3, 5896, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_gname = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(3, 5896, __pyx_L3_error) + __pyx_v_cname = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_cname) && PyErr_Occurred())) __PYX_ERR(3, 5896, __pyx_L3_error) + __pyx_v_attrib = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5896, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefineFromCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v_cname, __pyx_v_attrib); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gname, char const *__pyx_v_cname, PyObject *__pyx_v_attrib) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v__attribute_list = 0; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + std::vector __pyx_t_5; + __Pyx_RefNannySetupContext("groupDefineFromCollection", 0); + + /* "PyCafe.pyx":5897 + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): + * cdef str _METHOD = "groupDefineFromCollection" # <<<<<<<<<<<<<< + * cdef list _attribute_list + * if isinstance(attrib, str): + */ + __Pyx_INCREF(__pyx_n_u_groupDefineFromCollection); + __pyx_v__METHOD = __pyx_n_u_groupDefineFromCollection; + + /* "PyCafe.pyx":5899 + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + * if isinstance(attrib, str): # <<<<<<<<<<<<<< + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_attrib); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5900 + * cdef list _attribute_list + * if isinstance(attrib, str): + * _attribute_list = [attrib] # <<<<<<<<<<<<<< + * elif isinstance(attrib, list): + * _attribute_list = attrib + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_attrib); + __Pyx_GIVEREF(__pyx_v_attrib); + PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_attrib); + __pyx_v__attribute_list = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":5899 + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + * if isinstance(attrib, str): # <<<<<<<<<<<<<< + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5901 + * if isinstance(attrib, str): + * _attribute_list = [attrib] + * elif isinstance(attrib, list): # <<<<<<<<<<<<<< + * _attribute_list = attrib + * else: + */ + __pyx_t_2 = PyList_Check(__pyx_v_attrib); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5902 + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + * _attribute_list = attrib # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyList_CheckExact(__pyx_v_attrib))||((__pyx_v_attrib) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_attrib)->tp_name), 0))) __PYX_ERR(3, 5902, __pyx_L1_error) + __pyx_t_3 = __pyx_v_attrib; + __Pyx_INCREF(__pyx_t_3); + __pyx_v__attribute_list = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":5901 + * if isinstance(attrib, str): + * _attribute_list = [attrib] + * elif isinstance(attrib, list): # <<<<<<<<<<<<<< + * _attribute_list = attrib + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5904 + * _attribute_list = attrib + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("Third input argument, should be of type " + * "else of ")) + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5904, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5904, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_kp_u_Third_input_argument_should_be_o) < 0) __PYX_ERR(3, 5904, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":5907 + * _error_info=("Third input argument, should be of type " + * "else of ")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5907, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5909 + * raise _cafeException + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v__attribute_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5909, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefineFromCollection(__pyx_v_gname, __pyx_v_cname, __pyx_t_5); + + /* "PyCafe.pyx":5910 + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5911 + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5912 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5911 + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":5910 + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5913 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5896 + * + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefineFromCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v__attribute_list); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5917 + * + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_371groupDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_371groupDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupDefine (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefine", 1, 2, 2, 1); __PYX_ERR(3, 5917, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupDefine") < 0)) __PYX_ERR(3, 5917, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(3, 5917, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupDefine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5917, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(3, 5917, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_370groupDefine(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_370groupDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("groupDefine", 0); + + /* "PyCafe.pyx":5918 + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5918, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":5919 + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5920 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5921 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5920 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":5919 + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5922 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5917 + * + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5926 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_373defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_373defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("defineGroup", 1, 2, 2, 1); __PYX_ERR(3, 5926, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "defineGroup") < 0)) __PYX_ERR(3, 5926, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(3, 5926, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("defineGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5926, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.defineGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(3, 5926, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_372defineGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_372defineGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("defineGroup", 0); + + /* "PyCafe.pyx":5927 + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 5927, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":5928 + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5929 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5930 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5929 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":5928 + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5931 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5926 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.defineGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5935 + * + * ################################################################################## + * def groupOpen(self, char * gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupOpen(char * gname)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_375groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_375groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname) { + char *__pyx_v_gname; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupOpen (wrapper)", 0); + assert(__pyx_arg_gname); { + __pyx_v_gname = __Pyx_PyObject_AsWritableString(__pyx_arg_gname); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(3, 5935, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_374groupOpen(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char *)__pyx_v_gname)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_374groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname) { + PyObject *__pyx_v__METHOD = 0; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_ghandle; + char *__pyx_v__gname; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("groupOpen", 0); + + /* "PyCafe.pyx":5936 + * ################################################################################## + * def groupOpen(self, char * gname): + * cdef str _METHOD = "groupOpen(char * gname)" # <<<<<<<<<<<<<< + * + * if not isinstance(gname, (str)) : + */ + __Pyx_INCREF(__pyx_kp_u_groupOpen_char_gname); + __pyx_v__METHOD = __pyx_kp_u_groupOpen_char_gname; + + /* "PyCafe.pyx":5938 + * cdef str _METHOD = "groupOpen(char * gname)" + * + * if not isinstance(gname, (str)) : # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + */ + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_gname); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5939 + * + * if not isinstance(gname, (str)) : + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument should be for group name") + * raise _cafeException + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5939, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5939, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_c) < 0) __PYX_ERR(3, 5939, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 5939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":5941 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5941, __pyx_L1_error) + + /* "PyCafe.pyx":5938 + * cdef str _METHOD = "groupOpen(char * gname)" + * + * if not isinstance(gname, (str)) : # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + */ + } + + /* "PyCafe.pyx":5943 + * raise _cafeException + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * cdef char * _gname = gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5944 + * + * cdef unsigned int ghandle = 0 + * cdef char * _gname = gname # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":5946 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "PyCafe.pyx":5948 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5949 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * ELSE: + * #gil acquired and released in conduit.h at import + */ + try { + __pyx_t_8 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(3, 5949, __pyx_L11_error) + } + __pyx_v_status = __pyx_t_8; + } + + /* "PyCafe.pyx":5948 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L11_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L4_error; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":5946 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":5955 + * status = self._c_cafe.groupOpen(_gname, ghandle) + * + * except: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + */ + /*except:*/ { + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(3, 5955, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":5956 + * + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_11) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5957 + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5957, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_11) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5957, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_11) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5957, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_11) < 0) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":5956 + * + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 5956, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":5958 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5958, __pyx_L6_except_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L5_exception_handled; + } + __pyx_L6_except_error:; + + /* "PyCafe.pyx":5946 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + __pyx_L9_try_end:; + } + + /* "PyCafe.pyx":5960 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5961 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_1) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv_name, __pyx_t_1) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":5962 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_code, __pyx_t_1) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_text, __pyx_t_1) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_t_1) < 0) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":5961 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":5963 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return ghandle + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5963, __pyx_L1_error) + + /* "PyCafe.pyx":5960 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":5965 + * raise _cafeException + * + * return ghandle # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5935 + * + * ################################################################################## + * def groupOpen(self, char * gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupOpen(char * gname)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5970 + * ################################################################################## + * + * def groupClose(self, gHandleName, bint keepGroupName=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupClose(gHandleName)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_377groupClose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_377groupClose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_gHandleName = 0; + int __pyx_v_keepGroupName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupClose (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gHandleName,&__pyx_n_s_keepGroupName,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gHandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keepGroupName); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupClose") < 0)) __PYX_ERR(3, 5970, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_gHandleName = values[0]; + if (values[1]) { + __pyx_v_keepGroupName = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_keepGroupName == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5970, __pyx_L3_error) + } else { + __pyx_v_keepGroupName = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupClose", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 5970, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_376groupClose(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gHandleName, __pyx_v_keepGroupName); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_376groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName, int __pyx_v_keepGroupName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_gHandle; + PyObject *__pyx_v__gname = 0; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + __Pyx_RefNannySetupContext("groupClose", 0); + + /* "PyCafe.pyx":5971 + * + * def groupClose(self, gHandleName, bint keepGroupName=False): + * cdef str _METHOD = "groupClose(gHandleName)" # <<<<<<<<<<<<<< + * + * cdef unsigned int gHandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupClose_gHandleName); + __pyx_v__METHOD = __pyx_kp_u_groupClose_gHandleName; + + /* "PyCafe.pyx":5973 + * cdef str _METHOD = "groupClose(gHandleName)" + * + * cdef unsigned int gHandle = 0 # <<<<<<<<<<<<<< + * cdef str _gname = None + * status = ICAFE_NORMAL + */ + __pyx_v_gHandle = 0; + + /* "PyCafe.pyx":5974 + * + * cdef unsigned int gHandle = 0 + * cdef str _gname = None # <<<<<<<<<<<<<< + * status = ICAFE_NORMAL + * + */ + __Pyx_INCREF(Py_None); + __pyx_v__gname = ((PyObject*)Py_None); + + /* "PyCafe.pyx":5975 + * cdef unsigned int gHandle = 0 + * cdef str _gname = None + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if isinstance(gHandleName, (int, long)): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":5977 + * status = ICAFE_NORMAL + * + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_gHandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_gHandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5978 + * + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName # <<<<<<<<<<<<<< + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_gHandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5978, __pyx_L1_error) + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":5977 + * status = ICAFE_NORMAL + * + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5979 + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_gHandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5980 + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName # <<<<<<<<<<<<<< + * gHandle = self.checkForGroupHandle(gHandleName) + * else: + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_gHandleName))||((__pyx_v_gHandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_gHandleName)->tp_name), 0))) __PYX_ERR(3, 5980, __pyx_L1_error) + __pyx_t_5 = __pyx_v_gHandleName; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v__gname, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5981 + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_gHandleName))||((__pyx_v_gHandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_gHandleName)->tp_name), 0))) __PYX_ERR(3, 5981, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_gHandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 5981, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":5979 + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5983 + * gHandle = self.checkForGroupHandle(gHandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5983, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5983, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(3, 5983, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5985 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * if gHandle == 0: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5985, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5987 + * raise _cafeException + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_GROUP_HANDLE + * + */ + __pyx_t_1 = ((__pyx_v_gHandle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5988 + * + * if gHandle == 0: + * status = ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_status = ECAFE_INVALID_GROUP_HANDLE; + + /* "PyCafe.pyx":5990 + * status = ECAFE_INVALID_GROUP_HANDLE + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5991 + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5990 + * status = ECAFE_INVALID_GROUP_HANDLE + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + */ + } + + /* "PyCafe.pyx":5992 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_v__gname) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + + /* "PyCafe.pyx":5993 + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5992 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 5992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5994 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 5994, __pyx_L1_error) + + /* "PyCafe.pyx":5987 + * raise _cafeException + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_GROUP_HANDLE + * + */ + } + + /* "PyCafe.pyx":5997 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) + * #self.ca_pend_io(1.0) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5998 + * + * with nogil: + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) # <<<<<<<<<<<<<< + * #self.ca_pend_io(1.0) + * + */ + try { + __pyx_t_7 = __pyx_v_self->_c_cafe->groupCloseKeepName(__pyx_v_gHandle, __pyx_v_keepGroupName); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(3, 5998, __pyx_L9_error) + } + __pyx_v_status = __pyx_t_7; + } + + /* "PyCafe.pyx":5997 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) + * #self.ca_pend_io(1.0) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L10; + } + __pyx_L9_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L1_error; + } + __pyx_L10:; + } + } + + /* "PyCafe.pyx":6001 + * #self.ca_pend_io(1.0) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6002 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_v__gname) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + + /* "PyCafe.pyx":6003 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6002 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6004 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6004, __pyx_L1_error) + + /* "PyCafe.pyx":6001 + * #self.ca_pend_io(1.0) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":6006 + * raise _cafeException + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5970 + * ################################################################################## + * + * def groupClose(self, gHandleName, bint keepGroupName=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupClose(gHandleName)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.groupClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v__gname); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6010 + * + * + * def isGroup(self, const char * gName): # <<<<<<<<<<<<<< + * return self._c_cafe.isGroup(gName) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_379isGroup(PyObject *__pyx_v_self, PyObject *__pyx_arg_gName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_379isGroup(PyObject *__pyx_v_self, PyObject *__pyx_arg_gName) { + char const *__pyx_v_gName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isGroup (wrapper)", 0); + assert(__pyx_arg_gName); { + __pyx_v_gName = __Pyx_PyObject_AsString(__pyx_arg_gName); if (unlikely((!__pyx_v_gName) && PyErr_Occurred())) __PYX_ERR(3, 6010, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_378isGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_gName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_378isGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isGroup", 0); + + /* "PyCafe.pyx":6011 + * + * def isGroup(self, const char * gName): + * return self._c_cafe.isGroup(gName) # <<<<<<<<<<<<<< + * + * def isCollection(self, const char * cName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isGroup(__pyx_v_gName)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6010 + * + * + * def isGroup(self, const char * gName): # <<<<<<<<<<<<<< + * return self._c_cafe.isGroup(gName) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6013 + * return self._c_cafe.isGroup(gName) + * + * def isCollection(self, const char * cName): # <<<<<<<<<<<<<< + * return self._c_cafe.isCollection(cName) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_381isCollection(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_381isCollection(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName) { + char const *__pyx_v_cName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isCollection (wrapper)", 0); + assert(__pyx_arg_cName); { + __pyx_v_cName = __Pyx_PyObject_AsString(__pyx_arg_cName); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(3, 6013, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_380isCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_cName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_380isCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isCollection", 0); + + /* "PyCafe.pyx":6014 + * + * def isCollection(self, const char * cName): + * return self._c_cafe.isCollection(cName) # <<<<<<<<<<<<<< + * + * def getNoMonitors(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isCollection(__pyx_v_cName)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6013 + * return self._c_cafe.isGroup(gName) + * + * def isCollection(self, const char * cName): # <<<<<<<<<<<<<< + * return self._c_cafe.isCollection(cName) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6016 + * return self._c_cafe.isCollection(cName) + * + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getNoMonitors(handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getNoMonitors (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("getNoMonitors", 0); + + /* "PyCafe.pyx":6017 + * + * def getNoMonitors(self, handlePV): + * cdef str _METHOD = "getNoMonitors(handlePV)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getNoMonitors_handlePV); + __pyx_v__METHOD = __pyx_kp_u_getNoMonitors_handlePV; + + /* "PyCafe.pyx":6019 + * cdef str _METHOD = "getNoMonitors(handlePV)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6020 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6021 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6021, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6020 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6022 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6023 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 6023, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6023, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6022 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6025 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6025, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6025, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o) < 0) __PYX_ERR(3, 6025, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6027 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * return self.hh.getNmonitor(handle) + * ################################################################################## + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6027, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6028 + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + * return self.hh.getNmonitor(handle) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getNmonitor(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6016 + * return self._c_cafe.isCollection(cName) + * + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getNoMonitors(handlePV)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getNoMonitors", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6032 + * + * ################################################################################## + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDs(handlePV)" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDs(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDs(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDs (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_384getMonitorIDs(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_384getMonitorIDs(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("getMonitorIDs", 0); + + /* "PyCafe.pyx":6033 + * ################################################################################## + * def getMonitorIDs(self, handlePV): + * cdef str _METHOD = "getMonitorIDs(handlePV)" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_getMonitorIDs_handlePV); + __pyx_v__METHOD = __pyx_kp_u_getMonitorIDs_handlePV; + + /* "PyCafe.pyx":6034 + * def getMonitorIDs(self, handlePV): + * cdef str _METHOD = "getMonitorIDs(handlePV)" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6035 + * cdef str _METHOD = "getMonitorIDs(handlePV)" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6036 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6036, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6035 + * cdef str _METHOD = "getMonitorIDs(handlePV)" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6037 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6038 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 6038, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6038, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6037 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6040 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6040, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6040, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o) < 0) __PYX_ERR(3, 6040, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6042 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * return self.hh.getMonitorIDs(handle) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6042, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6044 + * raise _cafeException + * + * return self.hh.getMonitorIDs(handle) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_self->hh.getMonitorIDs(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6032 + * + * ################################################################################## + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDs(handlePV)" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorIDs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6048 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_387monitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_387monitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitor (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":6049 + * ############################################################################ + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitor") < 0)) __PYX_ERR(3, 6048, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6049, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__123; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6050, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__124; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6051, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitor", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6048, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_386monitor(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6048 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_386monitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("monitor", 0); + + /* "PyCafe.pyx":6053 + * unsigned short notify_milliseconds=0): + * + * return self.monitorStart(handlePV, cb, dbr, mask, notify_milliseconds) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_monitorStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbr); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_notify_milliseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_handlePV, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_handlePV, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_cb); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6048 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.monitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6056 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_389monitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_389monitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStart (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":6057 + * ############################################################################ + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitorStart") < 0)) __PYX_ERR(3, 6056, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6057, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__125; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6058, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__126; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6059, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitorStart", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6056, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_388monitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6056 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_388monitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = NULL; + PyObject *__pyx_v_pv = NULL; + int __pyx_v_status; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + MonitorPolicy __pyx_v_mp; + unsigned long __pyx_v_mpid; + PyObject *__pyx_v_sig = NULL; + short __pyx_v_wtfsb; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + __Pyx_RefNannySetupContext("monitorStart", 0); + + /* "PyCafe.pyx":6061 + * unsigned short notify_milliseconds=0): + * + * _METHOD = "monitorStart(handlePV, object cb=None, \ # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, \ + * unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" + */ + __Pyx_INCREF(__pyx_kp_u_monitorStart_handlePV_object_cb); + __pyx_v__METHOD = __pyx_kp_u_monitorStart_handlePV_object_cb; + + /* "PyCafe.pyx":6065 + * unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" + * + * pv = None # <<<<<<<<<<<<<< + * cdef int status = ICAFE_NORMAL + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_pv = Py_None; + + /* "PyCafe.pyx":6066 + * + * pv = None + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * # cdef pCallback my_callback + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6071 + * # my_callback=callbackHandlerMonitor + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6072 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6073 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * pv = handlePV + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6073, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6072 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6074 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * pv = handlePV + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6075 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * pv = handlePV # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_DECREF_SET(__pyx_v_pv, __pyx_v_handlePV); + + /* "PyCafe.pyx":6076 + * elif isinstance(handlePV, (str)): + * pv = handlePV + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 6076, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6076, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6074 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * pv = handlePV + * handle = self.checkForHandle(handlePV) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6078 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6079 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6079, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6079, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_10) < 0) __PYX_ERR(3, 6079, __pyx_L1_error) + + /* "PyCafe.pyx":6078 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6082 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * # Does channel Exist? + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6082, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6085 + * + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->isValid(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6086 + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_status = ECAFE_INVALID_HANDLE; + + /* "PyCafe.pyx":6087 + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6089 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_v_pv) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + + /* "PyCafe.pyx":6090 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6091 + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return status + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 6089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6088 + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6092 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return status + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6092, __pyx_L1_error) + + /* "PyCafe.pyx":6087 + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + */ + } + + /* "PyCafe.pyx":6093 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return status # <<<<<<<<<<<<<< + * + * cdef MonitorPolicy mp + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6085 + * + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":6096 + * + * cdef MonitorPolicy mp + * cdef unsigned long mpid = mp.getMonitorID() # <<<<<<<<<<<<<< + * + * # For setUserArgs pass the address of the variable. + */ + __pyx_v_mpid = __pyx_v_mp.getMonitorID(); + + /* "PyCafe.pyx":6100 + * # For setUserArgs pass the address of the variable. + * + * mp.setMask(mask) # <<<<<<<<<<<<<< + * mp.setNotifyDeltaMilliSeconds(notify_milliseconds) + * + */ + __pyx_v_mp.setMask(__pyx_v_mask); + + /* "PyCafe.pyx":6101 + * + * mp.setMask(mask) + * mp.setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * + * #print ("dbr=", dbr) + */ + __pyx_v_mp.setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6104 + * + * #print ("dbr=", dbr) + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":6107 + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + + /* "PyCafe.pyx":6109 + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) # <<<<<<<<<<<<<< + * mp.setCafeDbrType(dbr) + * #print ("def monitorStart ", mp.getCafeDbrType()) + */ + __pyx_v_mp.setDataType(__pyx_v_self->channelInfo.getDataType()); + + /* "PyCafe.pyx":6110 + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * #print ("def monitorStart ", mp.getCafeDbrType()) + * #print ("def monitorStart ", mp.getDbrDataType()) + */ + __pyx_v_mp.setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":6107 + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + */ + break; + default: + + /* "PyCafe.pyx":6114 + * #print ("def monitorStart ", mp.getDbrDataType()) + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) # <<<<<<<<<<<<<< + * print("dbr base type should be one of \ + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Warning_from_monitorStart_for_h); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_monitorStart_for_h); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Warning_from_monitorStart_for_h); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_handlePV); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6115 + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) + * print("dbr base type should be one of \ # <<<<<<<<<<<<<< + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6117 + * print("dbr base type should be one of \ + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(DBR_TIME) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6118 + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * mp.setDataType(self.channelInfo.getDataType()) # <<<<<<<<<<<<<< + * mp.setCafeDbrType(DBR_TIME) + * + */ + __pyx_v_mp.setDataType(__pyx_v_self->channelInfo.getDataType()); + + /* "PyCafe.pyx":6119 + * print("Assuming DBR_TIME") + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(DBR_TIME) # <<<<<<<<<<<<<< + * + * global monDictGlobal + */ + __pyx_v_mp.setCafeDbrType(DBR_TIME); + break; + } + + /* "PyCafe.pyx":6126 + * global hmd + * + * py_cb = cb # <<<<<<<<<<<<<< + * if cb is not None: + * #Cement to a global dictionary + */ + __Pyx_INCREF(__pyx_v_cb); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb, __pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + + /* "PyCafe.pyx":6127 + * + * py_cb = cb + * if cb is not None: # <<<<<<<<<<<<<< + * #Cement to a global dictionary + * hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6129 + * if cb is not None: + * #Cement to a global dictionary + * hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object # <<<<<<<<<<<<<< + * #print(hmd) + * sig = inspect.signature(cb) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6129, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_hmd, __pyx_v_cb, __pyx_t_6) < 0)) __PYX_ERR(3, 6129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6131 + * hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object + * #print(hmd) + * sig = inspect.signature(cb) # <<<<<<<<<<<<<< + * ''' + * print('SIGNATURE//3//:') + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_signature); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cb); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_sig = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6145 + * # The corresponding setPyHandler has to be set!! + * + * mp.setUserArgs(< void * > mpid) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_mp.setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":6148 + * + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * ###monDictGlobal[mpid] = cb + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = ((__pyx_t_8 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6151 + * ###monDictGlobal[mpid] = cb + * + * mp.setPyHandler() # <<<<<<<<<<<<<< + * # print (mp.getUserArgs()) + * + */ + __pyx_v_mp.setPyHandler(); + + /* "PyCafe.pyx":6148 + * + * + * if len(sig.parameters) == 1: # <<<<<<<<<<<<<< + * ###monDictGlobal[mpid] = cb + * + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":6154 + * # print (mp.getUserArgs()) + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp.setPyCyHandler( cb) + * #mp.setPyHandler() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = ((__pyx_t_8 == 2) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6155 + * + * elif len(sig.parameters) == 2: + * mp.setPyCyHandler( cb) # <<<<<<<<<<<<<< + * #mp.setPyHandler() + * #mp.setCyCallback( cb) + */ + __pyx_v_mp.setPyCyHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":6154 + * # print (mp.getUserArgs()) + * + * elif len(sig.parameters) == 2: # <<<<<<<<<<<<<< + * mp.setPyCyHandler( cb) + * #mp.setPyHandler() + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":6159 + * #mp.setCyCallback( cb) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * #py_cb=cb + * #self.hh.addWidget(handle, cb) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6159, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = ((__pyx_t_8 == 3) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6163 + * #self.hh.addWidget(handle, cb) + * + * mp.setPyCyHandlerData( ( py_cb)) # <<<<<<<<<<<<<< + * #handleMonDictGlobal[cb] = handle + * + */ + __pyx_v_mp.setPyCyHandlerData(((void *)__pyx_v_6PyCafe_py_cb)); + + /* "PyCafe.pyx":6159 + * #mp.setCyCallback( cb) + * + * elif len(sig.parameters) == 3: # <<<<<<<<<<<<<< + * #py_cb=cb + * #self.hh.addWidget(handle, cb) + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":6169 + * #mp.setCyCallback( cb) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="The signature of the monitor callback function \ + */ + /*else*/ { + + /* "PyCafe.pyx":6170 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="The signature of the monitor callback function \ + * given by the user is not supported. Valid fns are: \ + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6170, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6170, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_kp_u_The_signature_of_the_monitor_cal_2) < 0) __PYX_ERR(3, 6170, __pyx_L1_error) + + /* "PyCafe.pyx":6169 + * #mp.setCyCallback( cb) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="The signature of the monitor callback function \ + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":6174 + * given by the user is not supported. Valid fns are: \ + * 1) callback(handle) or 2) callback(pvdata, handle, pv_name) ") + * raise _cafeException # <<<<<<<<<<<<<< + * + * with nogil: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6174, __pyx_L1_error) + } + __pyx_L9:; + + /* "PyCafe.pyx":6127 + * + * py_cb = cb + * if cb is not None: # <<<<<<<<<<<<<< + * #Cement to a global dictionary + * hmd[cb] = handle ##otherwise cb gets ovewritten when casting to an object + */ + } + + /* "PyCafe.pyx":6176 + * raise _cafeException + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStart(handle, mp) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6177 + * + * with nogil: + * status = self._c_cafe.monitorStart(handle, mp) # <<<<<<<<<<<<<< + * + * # Need this to allow a fraction of a second for the callback fn to be called + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStart(__pyx_v_handle, __pyx_v_mp); + } + + /* "PyCafe.pyx":6176 + * raise _cafeException + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStart(handle, mp) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":6181 + * # Need this to allow a fraction of a second for the callback fn to be called + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * if wtfsb == FLUSH_NOW: + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + */ + __pyx_v_wtfsb = __pyx_v_self->_c_cafe->channelOpenGroupPolicy.getWhenToFlushSendBuffer(); + + /* "PyCafe.pyx":6182 + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + */ + __pyx_t_2 = ((__pyx_v_wtfsb == FLUSH_NOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6184 + * if wtfsb == FLUSH_NOW: + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6182 + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + */ + } + + /* "PyCafe.pyx":6185 + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6186 + * time.sleep(0.01) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6187 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6188 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6187 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":6190 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * return mpid + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L16:; + + /* "PyCafe.pyx":6186 + * time.sleep(0.01) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6185 + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":6192 + * self._c_cafe.printStatus(handle, status) + * + * return mpid # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6056 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pv); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6197 + * ############################################################################ + * + * def monitorStop(self, handlePV, mpid=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_391monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_391monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_mpid = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStop (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_mpid,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpid); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitorStop") < 0)) __PYX_ERR(3, 6197, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_mpid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitorStop", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6197, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_390monitorStop(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_mpid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_390monitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_mpid) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + unsigned int __pyx_v_mpidUI; + PyObject *__pyx_v__ncount = NULL; + CYTHON_UNUSED PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_v_l = NULL; + std::vector __pyx_v_mpidUIV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + std::vector ::size_type __pyx_t_21; + __Pyx_RefNannySetupContext("monitorStop", 0); + + /* "PyCafe.pyx":6198 + * + * def monitorStop(self, handlePV, mpid=None): + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_monitorStop_handlePV_mpid_None); + __pyx_v__METHOD = __pyx_kp_u_monitorStop_handlePV_mpid_None; + + /* "PyCafe.pyx":6200 + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6201 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6202 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6202, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6201 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6203 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6204 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 6204, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6203 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6206 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6207 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6207, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6207, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_3) < 0) __PYX_ERR(3, 6207, __pyx_L1_error) + + /* "PyCafe.pyx":6206 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6210 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6210, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6220 + * + * + * if mpid: # <<<<<<<<<<<<<< + * if isinstance(mpid, (int, long)): + * mpidUI = mpid + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mpid); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 6220, __pyx_L1_error) + if (__pyx_t_1) { + + /* "PyCafe.pyx":6221 + * + * if mpid: + * if isinstance(mpid, (int, long)): # <<<<<<<<<<<<<< + * mpidUI = mpid + * with nogil: + */ + __pyx_t_2 = PyInt_Check(__pyx_v_mpid); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_mpid); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L8_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6222 + * if mpid: + * if isinstance(mpid, (int, long)): + * mpidUI = mpid # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpidUI) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_mpid); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6222, __pyx_L1_error) + __pyx_v_mpidUI = __pyx_t_4; + + /* "PyCafe.pyx":6223 + * if isinstance(mpid, (int, long)): + * mpidUI = mpid + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopWithID(handle, mpidUI) + * time.sleep(0.01) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6224 + * mpidUI = mpid + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpidUI) # <<<<<<<<<<<<<< + * time.sleep(0.01) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStopWithID(__pyx_v_handle, __pyx_v_mpidUI); + } + + /* "PyCafe.pyx":6223 + * if isinstance(mpid, (int, long)): + * mpidUI = mpid + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopWithID(handle, mpidUI) + * time.sleep(0.01) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":6225 + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpidUI) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * if (status == ICAFE_NORMAL): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6227 + * time.sleep(0.01) + * + * if (status == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * #pass + * #print (monDictGlobal) + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6233 + * # if monDictGlobal.has_key(mpidUI): + * # Sep 2020 - try without del for testing! + * if mpidUI in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUI] + * + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpidUI); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(3, 6233, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 6233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6234 + * # Sep 2020 - try without del for testing! + * if mpidUI in monDictGlobal.keys(): + * del monDictGlobal[mpidUI] # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6234, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpidUI); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(PyDict_DelItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_7) < 0)) __PYX_ERR(3, 6234, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6233 + * # if monDictGlobal.has_key(mpidUI): + * # Sep 2020 - try without del for testing! + * if mpidUI in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUI] + * + */ + } + + /* "PyCafe.pyx":6227 + * time.sleep(0.01) + * + * if (status == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * #pass + * #print (monDictGlobal) + */ + } + + /* "PyCafe.pyx":6221 + * + * if mpid: + * if isinstance(mpid, (int, long)): # <<<<<<<<<<<<<< + * mpidUI = mpid + * with nogil: + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":6237 + * + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be of type ") + * else: + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 6237, __pyx_L1_error) + } + __pyx_L7:; + + /* "PyCafe.pyx":6220 + * + * + * if mpid: # <<<<<<<<<<<<<< + * if isinstance(mpid, (int, long)): + * mpidUI = mpid + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":6240 + * monitorPolicy ID (mpid) should be of type ") + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.01) + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6241 + * else: + * with nogil: + * status = self._c_cafe.monitorStop(handle) # <<<<<<<<<<<<<< + * time.sleep(0.01) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStop(__pyx_v_handle); + } + + /* "PyCafe.pyx":6240 + * monitorPolicy ID (mpid) should be of type ") + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.01) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":6242 + * with nogil: + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * _ncount = 0 + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L6:; + + /* "PyCafe.pyx":6244 + * time.sleep(0.01) + * + * _ncount = 0 # <<<<<<<<<<<<<< + * for key, value in hmd.items(): + * if value == handle: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v__ncount = __pyx_int_0; + + /* "PyCafe.pyx":6245 + * + * _ncount = 0 + * for key, value in hmd.items(): # <<<<<<<<<<<<<< + * if value == handle: + * _ncount += 1 + */ + __pyx_t_8 = 0; + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(3, 6245, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_6PyCafe_hmd, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __pyx_t_7 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_9, &__pyx_t_8, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_10); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(3, 6245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6246 + * _ncount = 0 + * for key, value in hmd.items(): + * if value == handle: # <<<<<<<<<<<<<< + * _ncount += 1 + * + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_value, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 6246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":6247 + * for key, value in hmd.items(): + * if value == handle: + * _ncount += 1 # <<<<<<<<<<<<<< + * + * for i in range (0, _ncount): + */ + __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v__ncount, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v__ncount, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6246 + * _ncount = 0 + * for key, value in hmd.items(): + * if value == handle: # <<<<<<<<<<<<<< + * _ncount += 1 + * + */ + } + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6249 + * _ncount += 1 + * + * for i in range (0, _ncount): # <<<<<<<<<<<<<< + * try: + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + */ + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_int_0); + __Pyx_INCREF(__pyx_v__ncount); + __Pyx_GIVEREF(__pyx_v__ncount); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v__ncount); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 6249, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_7))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 6249, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 6249, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_12(__pyx_t_7); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 6249, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6250 + * + * for i in range (0, _ncount): + * try: # <<<<<<<<<<<<<< + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + * #print (l) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":6251 + * for i in range (0, _ncount): + * try: + * l = list(hmd.keys())[list(hmd.values()).index(handle)] # <<<<<<<<<<<<<< + * #print (l) + * if l is not None: + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(3, 6251, __pyx_L23_error) + } + __pyx_t_5 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(3, 6251, __pyx_L23_error) + } + __pyx_t_16 = __Pyx_PyDict_Values(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_17 = PySequence_List(__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_18 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) { + __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_16); + if (likely(__pyx_t_18)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16); + __Pyx_INCREF(__pyx_t_18); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_16, function); + } + } + __pyx_t_5 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_18, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6251, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_16); + __pyx_t_16 = 0; + + /* "PyCafe.pyx":6253 + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + * #print (l) + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * except ValueError: + */ + __pyx_t_1 = (__pyx_v_l != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6254 + * #print (l) + * if l is not None: + * del hmd[l] # <<<<<<<<<<<<<< + * except ValueError: + * print("List does not contain handle {0}".format(handle)) + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6254, __pyx_L23_error) + } + if (unlikely(PyDict_DelItem(__pyx_v_6PyCafe_hmd, __pyx_v_l) < 0)) __PYX_ERR(3, 6254, __pyx_L23_error) + + /* "PyCafe.pyx":6253 + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + * #print (l) + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * except ValueError: + */ + } + + /* "PyCafe.pyx":6250 + * + * for i in range (0, _ncount): + * try: # <<<<<<<<<<<<<< + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + * #print (l) + */ + } + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L30_try_end; + __pyx_L23_error:; + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafe.pyx":6255 + * if l is not None: + * del hmd[l] + * except ValueError: # <<<<<<<<<<<<<< + * print("List does not contain handle {0}".format(handle)) + * #{k:v for k,v in hmd.items() if v != handle} + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_10) { + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(3, 6255, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":6256 + * del hmd[l] + * except ValueError: + * print("List does not contain handle {0}".format(handle)) # <<<<<<<<<<<<<< + * #{k:v for k,v in hmd.items() if v != handle} + * ##for a, v in hmd.items(): + */ + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_List_does_not_contain_handle_0, __pyx_n_s_format); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 6256, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_19 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_19)) __PYX_ERR(3, 6256, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_20 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) { + __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_18); + if (likely(__pyx_t_20)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); + __Pyx_INCREF(__pyx_t_20); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_18, function); + } + } + __pyx_t_17 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_18, __pyx_t_20, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(3, 6256, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 6256, __pyx_L25_except_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L24_exception_handled; + } + goto __pyx_L25_except_error; + __pyx_L25_except_error:; + + /* "PyCafe.pyx":6250 + * + * for i in range (0, _ncount): + * try: # <<<<<<<<<<<<<< + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + * #print (l) + */ + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L24_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_L30_try_end:; + } + + /* "PyCafe.pyx":6249 + * _ncount += 1 + * + * for i in range (0, _ncount): # <<<<<<<<<<<<<< + * try: + * l = list(hmd.keys())[list(hmd.values()).index(handle)] + */ + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6263 + * # Find handle with monitor ID and STOP thst one monitor! + * + * if (status == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * + * # print "size", self.hh.getNmonitor(handle) + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6266 + * + * # print "size", self.hh.getNmonitor(handle) + * mpidUIV = self.hh.getMonitorIDs(handle) # <<<<<<<<<<<<<< + * # print "size", mpidUIV.size() + * + */ + __pyx_v_mpidUIV = __pyx_v_self->hh.getMonitorIDs(__pyx_v_handle); + + /* "PyCafe.pyx":6269 + * # print "size", mpidUIV.size() + * + * for i in range(0, mpidUIV.size()): # <<<<<<<<<<<<<< + * + * # if monDictGlobal.has_key(mpidUIV[i]): + */ + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_mpidUIV.size()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { + __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 6269, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 6269, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 6269, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } + } else { + __pyx_t_7 = __pyx_t_12(__pyx_t_6); + if (unlikely(!__pyx_t_7)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 6269, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":6272 + * + * # if monDictGlobal.has_key(mpidUIV[i]): + * if mpidUIV[i] in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUIV[i]] + * + */ + __pyx_t_21 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_21 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 6272, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpidUIV[__pyx_t_21])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(3, 6272, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_7, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 6272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6273 + * # if monDictGlobal.has_key(mpidUIV[i]): + * if mpidUIV[i] in monDictGlobal.keys(): + * del monDictGlobal[mpidUIV[i]] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6273, __pyx_L1_error) + } + __pyx_t_21 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_21 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 6273, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpidUIV[__pyx_t_21])); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(PyDict_DelItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_5) < 0)) __PYX_ERR(3, 6273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6272 + * + * # if monDictGlobal.has_key(mpidUIV[i]): + * if mpidUIV[i] in monDictGlobal.keys(): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUIV[i]] + * + */ + } + + /* "PyCafe.pyx":6269 + * # print "size", mpidUIV.size() + * + * for i in range(0, mpidUIV.size()): # <<<<<<<<<<<<<< + * + * # if monDictGlobal.has_key(mpidUIV[i]): + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6263 + * # Find handle with monitor ID and STOP thst one monitor! + * + * if (status == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * + * # print "size", self.hh.getNmonitor(handle) + */ + } + + /* "PyCafe.pyx":6275 + * del monDictGlobal[mpidUIV[i]] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6276 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6277 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6278 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6277 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L40; + } + + /* "PyCafe.pyx":6280 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * return status + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L40:; + + /* "PyCafe.pyx":6276 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6275 + * del monDictGlobal[mpidUIV[i]] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":6282 + * self._c_cafe.printStatus(handle, status) + * + * return status # <<<<<<<<<<<<<< + * # 3 + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6197 + * ############################################################################ + * + * def monitorStop(self, handlePV, mpid=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v__ncount); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_l); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6286 + * + * ############################################################################ + * def monitorStopAll(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "monitorStopAll()" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_393monitorStopAll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_393monitorStopAll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStopAll (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_392monitorStopAll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_392monitorStopAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("monitorStopAll", 0); + + /* "PyCafe.pyx":6288 + * def monitorStopAll(self): + * + * cdef str _METHOD = "monitorStopAll()" # <<<<<<<<<<<<<< + * + * global monDictGlobal + */ + __Pyx_INCREF(__pyx_kp_u_monitorStopAll); + __pyx_v__METHOD = __pyx_kp_u_monitorStopAll; + + /* "PyCafe.pyx":6294 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopAll() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6295 + * cdef int status + * with nogil: + * status = self._c_cafe.monitorStopAll() # <<<<<<<<<<<<<< + * + * # give plenty of time for monitors to stop! + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStopAll(); + } + + /* "PyCafe.pyx":6294 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopAll() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":6298 + * + * # give plenty of time for monitors to stop! + * time.sleep(0.2) # <<<<<<<<<<<<<< + * + * monDictGlobal.clear() + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_float_0_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":6300 + * time.sleep(0.2) + * + * monDictGlobal.clear() # <<<<<<<<<<<<<< + * handleMonDictGlobal.clear() + * + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); + __PYX_ERR(3, 6300, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyDict_Clear(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 6300, __pyx_L1_error) + + /* "PyCafe.pyx":6301 + * + * monDictGlobal.clear() + * handleMonDictGlobal.clear() # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + if (unlikely(__pyx_v_6PyCafe_handleMonDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); + __PYX_ERR(3, 6301, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyDict_Clear(__pyx_v_6PyCafe_handleMonDictGlobal); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 6301, __pyx_L1_error) + + /* "PyCafe.pyx":6303 + * handleMonDictGlobal.clear() + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":6304 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":6305 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6304 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":6308 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + * .format(status)) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":6306 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + * .format(status)) + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 6306, __pyx_L1_error) + + /* "PyCafe.pyx":6303 + * handleMonDictGlobal.clear() + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6310 + * .format(status)) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6286 + * + * ############################################################################ + * def monitorStopAll(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "monitorStopAll()" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStopAll", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6315 + * ############################################################################## + * + * def set(self, handlePV, valSet): # <<<<<<<<<<<<<< + * cdef str _METHOD = "set(handlePV, valSet)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_395set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_395set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_valSet,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(3, 6315, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(3, 6315, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_valSet = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6315, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_394set(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_valSet); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_394set(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_valSet) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned short __pyx_v_valType; + int __pyx_v_status; + float __pyx_v_valSetF; + double __pyx_v_valSetD; + int __pyx_v_valSetI; + PY_LONG_LONG __pyx_v_valSetLL; + short __pyx_v_valSetShort; + unsigned short __pyx_v_valSetUShort; + std::string __pyx_v_valSetS; + std::vector __pyx_v_vecD; + std::vector __pyx_v_vecF; + std::vector __pyx_v_vecShort; + std::vector __pyx_v_vecUShort; + std::vector __pyx_v_vecChar; + std::vector __pyx_v_vecI; + std::vector __pyx_v_vecS; + unsigned int __pyx_v_nLA; + PyObject *__pyx_v_ctypesString = 0; + PyObject *__pyx_v_ctypesUChar = 0; + PyObject *__pyx_v_ctypesShort = 0; + PyObject *__pyx_v_ctypesUShort = 0; + PyObject *__pyx_v_ctypesInt = 0; + PyObject *__pyx_v_ctypesLongLong = 0; + PyObject *__pyx_v_dtypesString = 0; + PyObject *__pyx_v_dtypesUChar = 0; + PyObject *__pyx_v_dtypesShort = 0; + PyObject *__pyx_v_dtypesUShort = 0; + PyObject *__pyx_v_dtypesInt = 0; + PyObject *__pyx_v_dtypesLongLong = 0; + PyObject *__pyx_v_dtypesFloat = 0; + PyObject *__pyx_v_dtypesDouble = 0; + int __pyx_v_isGoodType; + int __pyx_v_isBytesType; + PyObject *__pyx_v_classType = 0; + PyObject *__pyx_v_substringmv = 0; + PyObject *__pyx_v_class_name = NULL; + int __pyx_v_data_type; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v_temp = NULL; + unsigned char __pyx_v_valSetUChar; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_t_17; + Py_ssize_t __pyx_t_18; + unsigned int __pyx_t_19; + Py_ssize_t __pyx_t_20; + Py_ssize_t __pyx_t_21; + double __pyx_t_22; + float __pyx_t_23; + dbr_long_t __pyx_t_24; + short __pyx_t_25; + unsigned short __pyx_t_26; + dbr_char_t __pyx_t_27; + std::string __pyx_t_28; + PY_LONG_LONG __pyx_t_29; + unsigned char __pyx_t_30; + __Pyx_RefNannySetupContext("set", 0); + __Pyx_INCREF(__pyx_v_valSet); + + /* "PyCafe.pyx":6316 + * + * def set(self, handlePV, valSet): + * cdef str _METHOD = "set(handlePV, valSet)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_set_handlePV_valSet); + __pyx_v__METHOD = __pyx_kp_u_set_handlePV_valSet; + + /* "PyCafe.pyx":6318 + * cdef str _METHOD = "set(handlePV, valSet)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6320 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6321 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6321, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6320 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6322 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6323 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 6323, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6322 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6325 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6326 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6326, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6326, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_3) < 0) __PYX_ERR(3, 6326, __pyx_L1_error) + + /* "PyCafe.pyx":6325 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6329 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6329, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6334 + * # CHECK FOR ALL DATA TYPES! + * + * cdef unsigned short valType = CAFE_STRING # <<<<<<<<<<<<<< + * cdef int status = ICAFE_NORMAL + * cdef float valSetF + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6335 + * + * cdef unsigned short valType = CAFE_STRING + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef float valSetF + * cdef double valSetD + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6352 + * cdef vector[string] vecS + * + * cdef unsigned int nLA = 0 # <<<<<<<<<<<<<< + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + */ + __pyx_v_nLA = 0; + + /* "PyCafe.pyx":6354 + * cdef unsigned int nLA = 0 + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) # <<<<<<<<<<<<<< + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_wchar); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_wchar_p); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesString = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6355 + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) # <<<<<<<<<<<<<< + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_char); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ubyte); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_5 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesUChar = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6356 + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) # <<<<<<<<<<<<<< + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_short); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_byte); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8); + __pyx_t_9 = 0; + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6357 + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) # <<<<<<<<<<<<<< + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint16); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ushort); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_v_ctypesUShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6358 + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, # <<<<<<<<<<<<<< + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6359 + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) # <<<<<<<<<<<<<< + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 6359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6358 + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, # <<<<<<<<<<<<<< + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + */ + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_5 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesInt = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6360 + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, # <<<<<<<<<<<<<< + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint64); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6361 + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, # <<<<<<<<<<<<<< + * ctypes.c_longlong, ctypes.c_ssize_t, + * ctypes.c_void_p, ctypes.c_voidp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ulong); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ulonglong); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_longdouble); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 6361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6362 + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, # <<<<<<<<<<<<<< + * ctypes.c_void_p, ctypes.c_voidp) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_longlong); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 6362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ssize_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 6362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6363 + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + * ctypes.c_void_p, ctypes.c_voidp) # <<<<<<<<<<<<<< + * + * # ctypes.c_char, ctypes.c_float, ctypes.c_double are separate + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_voidp); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6360 + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, # <<<<<<<<<<<<<< + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + */ + __pyx_t_6 = PyTuple_New(11); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_t_16); + __pyx_t_9 = 0; + __pyx_t_5 = 0; + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_v_ctypesLongLong = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6367 + * # ctypes.c_char, ctypes.c_float, ctypes.c_double are separate + * + * cdef tuple dtypesString = (np.str_, np.unicode_) # <<<<<<<<<<<<<< + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_str_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15); + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_v_dtypesString = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6368 + * + * cdef tuple dtypesString = (np.str_, np.unicode_) + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) # <<<<<<<<<<<<<< + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ubyte); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool8); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_13); + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_t_14 = 0; + __pyx_t_13 = 0; + __pyx_v_dtypesUChar = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6369 + * cdef tuple dtypesString = (np.str_, np.unicode_) + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) # <<<<<<<<<<<<<< + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_byte); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_short); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int8); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_15); + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_v_dtypesShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6370 + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) # <<<<<<<<<<<<<< + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint16); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ushort); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_v_dtypesUShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6371 + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) # <<<<<<<<<<<<<< + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + * np.ulonglong, np.longlong, np.intp, np.uintp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_intc); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintp); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_13); + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_t_14 = 0; + __pyx_t_13 = 0; + __pyx_v_dtypesInt = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6372 + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, # <<<<<<<<<<<<<< + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintc); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6373 + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + * np.ulonglong, np.longlong, np.intp, np.uintp) # <<<<<<<<<<<<<< + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ulonglong); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_longlong); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_intp); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintp); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6372 + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, # <<<<<<<<<<<<<< + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + */ + __pyx_t_6 = PyTuple_New(9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_8); + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_dtypesLongLong = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6375 + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) # <<<<<<<<<<<<<< + * cdef tuple dtypesDouble = (np.double, np.float_, np.float64) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_single); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float16); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_10); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_v_dtypesFloat = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6376 + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + * cdef tuple dtypesDouble = (np.double, np.float_, np.float64) # <<<<<<<<<<<<<< + * + * # List: Major[0] Minor[1] Patch[2] 'final'[3] 0 [4] + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __pyx_t_10 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_dtypesDouble = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6381 + * # print "type= // ", type(valSet) + * + * cdef bint isGoodType = False # <<<<<<<<<<<<<< + * cdef bint isBytesType = False + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":6382 + * + * cdef bint isGoodType = False + * cdef bint isBytesType = False # <<<<<<<<<<<<<< + * + * # print('set method', type(valSet)) + */ + __pyx_v_isBytesType = 0; + + /* "PyCafe.pyx":6404 + * # print(type(valSet)) + * # print (valSet.__class__) + * cdef str classType = (valSet.__class__).__name__ # <<<<<<<<<<<<<< + * cdef str substringmv = "_memoryviewslice" + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(3, 6404, __pyx_L1_error) + __pyx_v_classType = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":6405 + * # print (valSet.__class__) + * cdef str classType = (valSet.__class__).__name__ + * cdef str substringmv = "_memoryviewslice" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_n_u_memoryviewslice_2); + __pyx_v_substringmv = __pyx_n_u_memoryviewslice_2; + + /* "PyCafe.pyx":6413 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_python_version); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_tuple__129, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 6413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":6416 + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = PyList_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_ptype_7cpython_5array_array); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_8); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_memoryview_type); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6417 + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): + * isGoodType = True # <<<<<<<<<<<<<< + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":6416 + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * else: + */ + } + + /* "PyCafe.pyx":6413 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":6419 + * isGoodType = True + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = PyList_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_ptype_7cpython_5array_array); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6420 + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): + * isGoodType = True # <<<<<<<<<<<<<< + * + * if (isGoodType == False): + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":6419 + * isGoodType = True + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + } + } + __pyx_L6:; + + /* "PyCafe.pyx":6422 + * isGoodType = True + * + * if (isGoodType == False): # <<<<<<<<<<<<<< + * if (substringmv in classType): + * isGoodType = True + */ + __pyx_t_1 = ((__pyx_v_isGoodType == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6423 + * + * if (isGoodType == False): + * if (substringmv in classType): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + if (unlikely(__pyx_v_classType == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(3, 6423, __pyx_L1_error) + } + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_substringmv, __pyx_v_classType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 6423, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6424 + * if (isGoodType == False): + * if (substringmv in classType): + * isGoodType = True # <<<<<<<<<<<<<< + * + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":6423 + * + * if (isGoodType == False): + * if (substringmv in classType): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + } + + /* "PyCafe.pyx":6422 + * isGoodType = True + * + * if (isGoodType == False): # <<<<<<<<<<<<<< + * if (substringmv in classType): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":6428 + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): # <<<<<<<<<<<<<< + * if isinstance(valSet[0], bytes): + * isGoodType = False + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6428, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6429 + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): # <<<<<<<<<<<<<< + * isGoodType = False + * isBytesType = True + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = PyBytes_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6430 + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): + * isGoodType = False # <<<<<<<<<<<<<< + * isBytesType = True + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":6431 + * if isinstance(valSet[0], bytes): + * isGoodType = False + * isBytesType = True # <<<<<<<<<<<<<< + * + * # where the element of the array is of type bytes - there need to match to cafe.setSrting + */ + __pyx_v_isBytesType = 1; + + /* "PyCafe.pyx":6429 + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): # <<<<<<<<<<<<<< + * isGoodType = False + * isBytesType = True + */ + } + + /* "PyCafe.pyx":6428 + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): # <<<<<<<<<<<<<< + * if isinstance(valSet[0], bytes): + * isGoodType = False + */ + } + + /* "PyCafe.pyx":6445 + * #print("isBytesType ", isBytesType) + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * class_name = str(self.channelInfo.getClassNameAsString()) + * data_type = self.channelInfo.getDataType() + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":6446 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * class_name = str(self.channelInfo.getClassNameAsString()) # <<<<<<<<<<<<<< + * data_type = self.channelInfo.getDataType() + * + */ + __pyx_t_10 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->channelInfo.getClassNameAsString()); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_class_name = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6447 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * class_name = str(self.channelInfo.getClassNameAsString()) + * data_type = self.channelInfo.getDataType() # <<<<<<<<<<<<<< + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + */ + __pyx_v_data_type = __pyx_v_self->channelInfo.getDataType(); + + /* "PyCafe.pyx":6449 + * data_type = self.channelInfo.getDataType() + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: # <<<<<<<<<<<<<< + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + */ + __Pyx_INCREF(__pyx_v_class_name); + __pyx_t_6 = __pyx_v_class_name; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_waveform, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 6449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_17 = __pyx_v_data_type; + __pyx_t_3 = (((__pyx_t_17 == DBR_CHAR) != 0) != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L24_bool_binop_done:; + if (__pyx_t_2) { + + /* "PyCafe.pyx":6450 + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * elif isinstance(valSet, list): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L27_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L27_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6451 + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): + * isGoodType = True # <<<<<<<<<<<<<< + * elif isinstance(valSet, list): + * if len(valSet) == 1: + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":6450 + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * elif isinstance(valSet, list): + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":6452 + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + * elif isinstance(valSet, list): # <<<<<<<<<<<<<< + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + */ + __pyx_t_3 = PyList_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6453 + * isGoodType = True + * elif isinstance(valSet, list): + * if len(valSet) == 1: # <<<<<<<<<<<<<< + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6453, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_18 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6454 + * elif isinstance(valSet, list): + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * valSet = valSet[0] + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyUnicode_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L31_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6455 + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True # <<<<<<<<<<<<<< + * valSet = valSet[0] + * + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":6456 + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + * valSet = valSet[0] # <<<<<<<<<<<<<< + * + * if isGoodType: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_valSet, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6454 + * elif isinstance(valSet, list): + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * valSet = valSet[0] + */ + } + + /* "PyCafe.pyx":6453 + * isGoodType = True + * elif isinstance(valSet, list): + * if len(valSet) == 1: # <<<<<<<<<<<<<< + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":6452 + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + * elif isinstance(valSet, list): # <<<<<<<<<<<<<< + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + */ + } + __pyx_L26:; + + /* "PyCafe.pyx":6449 + * data_type = self.channelInfo.getDataType() + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: # <<<<<<<<<<<<<< + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":6458 + * valSet = valSet[0] + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + __pyx_t_3 = (__pyx_v_isGoodType != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6462 + * #print('set method', type(valSet[0])) + * + * nLA = len(valSet) # <<<<<<<<<<<<<< + * + * # Just check on first element if array.array etc.. + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6462, __pyx_L1_error) + __pyx_v_nLA = __pyx_t_18; + + /* "PyCafe.pyx":6465 + * + * # Just check on first element if array.array etc.. + * if not isinstance(valSet, (list)): # <<<<<<<<<<<<<< + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 + */ + __pyx_t_3 = PyList_Check(__pyx_v_valSet); + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6467 + * if not isinstance(valSet, (list)): + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 # <<<<<<<<<<<<<< + * + * for i in range(0, nLA): + */ + __pyx_v_nLA = 1; + + /* "PyCafe.pyx":6465 + * + * # Just check on first element if array.array etc.. + * if not isinstance(valSet, (list)): # <<<<<<<<<<<<<< + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 + */ + } + + /* "PyCafe.pyx":6469 + * nLA = 1 + * + * for i in range(0, nLA): # <<<<<<<<<<<<<< + * + * if isinstance(valSet[i], (str, bytes)): + */ + __pyx_t_4 = __pyx_v_nLA; + __pyx_t_19 = __pyx_t_4; + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_19; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":6471 + * for i in range(0, nLA): + * + * if isinstance(valSet[i], (str, bytes)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyUnicode_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L38_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6472 + * + * if isinstance(valSet[i], (str, bytes)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i], dtypesString): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6473 + * if isinstance(valSet[i], (str, bytes)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING + */ + goto __pyx_L36_break; + + /* "PyCafe.pyx":6471 + * for i in range(0, nLA): + * + * if isinstance(valSet[i], (str, bytes)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6474 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], dtypesString): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesString); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6474, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6475 + * break + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6476 + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L36_break; + + /* "PyCafe.pyx":6474 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], dtypesString): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6477 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6478 + * break + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":6477 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6479 + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesDouble); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6479, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6480 + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":6479 + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6481 + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): # <<<<<<<<<<<<<< + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesFloat); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6481, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6482 + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + */ + __pyx_v_valType = CAFE_FLOAT; + + /* "PyCafe.pyx":6481 + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): # <<<<<<<<<<<<<< + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6483 + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L40_bool_binop_done; + } + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L40_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6484 + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":6483 + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6485 + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyNumber_Add(__pyx_v_dtypesInt, __pyx_v_dtypesLongLong); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = PyNumber_Add(__pyx_t_10, __pyx_v_dtypesUChar); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_t_6, __pyx_t_8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6486 + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":6485 + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6487 + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): # <<<<<<<<<<<<<< + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_8, __pyx_v_dtypesShort); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6488 + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesUShort): + * valType = CAFE_USHORT + */ + __pyx_v_valType = CAFE_SHORT; + + /* "PyCafe.pyx":6487 + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): # <<<<<<<<<<<<<< + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6489 + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType = CAFE_USHORT + * else: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_8, __pyx_v_dtypesUShort); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6490 + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + * valType = CAFE_USHORT # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_v_valType = CAFE_USHORT; + + /* "PyCafe.pyx":6489 + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType = CAFE_USHORT + * else: + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":6493 + * else: + * + * print("PyCafe.pyx: We do not cater for type ", # <<<<<<<<<<<<<< + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + */ + /*else*/ { + + /* "PyCafe.pyx":6494 + * + * print("PyCafe.pyx: We do not cater for type ", + * type(valSet[i]), " and thus assume a string") # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":6493 + * else: + * + * print("PyCafe.pyx: We do not cater for type ", # <<<<<<<<<<<<<< + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + */ + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + __Pyx_GIVEREF(__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_8))); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_INCREF(__pyx_kp_u_and_thus_assume_a_string); + __Pyx_GIVEREF(__pyx_kp_u_and_thus_assume_a_string); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_and_thus_assume_a_string); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6495 + * print("PyCafe.pyx: We do not cater for type ", + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6496 + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * #print(valSet, len(valSet), valType) + */ + goto __pyx_L36_break; + } + __pyx_L37:; + } + __pyx_L36_break:; + + /* "PyCafe.pyx":6502 + * # valSet to vector since + * # coercion from Python not allowed without the GIL + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * + * vecD.reserve(len(valSet)) + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6504 + * if valType == CAFE_DOUBLE: + * + * vecD.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6504, __pyx_L1_error) + __pyx_v_vecD.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6505 + * + * vecD.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecD.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6505, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6506 + * vecD.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setVDouble(handle, vecD) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6506, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecD.push_back(__pyx_t_22); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6506, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6507 + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVDouble(handle, vecD) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6508 + * vecD.push_back(valSet[i]) + * with nogil: + * status = self._c_cafe.setVDouble(handle, vecD) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_FLOAT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVDouble(__pyx_v_handle, __pyx_v_vecD); + } + + /* "PyCafe.pyx":6507 + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVDouble(handle, vecD) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L46; + } + __pyx_L46:; + } + } + + /* "PyCafe.pyx":6502 + * # valSet to vector since + * # coercion from Python not allowed without the GIL + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * + * vecD.reserve(len(valSet)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":6512 + * elif valType == CAFE_FLOAT: + * + * vecF.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6512, __pyx_L1_error) + __pyx_v_vecF.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6513 + * + * vecF.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecF.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6513, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6514 + * vecF.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setVFloat(handle, vecF) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_t_8); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 6514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecF.push_back(__pyx_t_23); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6514, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6515 + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVFloat(handle, vecF) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6516 + * vecF.push_back(valSet[i]) + * with nogil: + * status = self._c_cafe.setVFloat(handle, vecF) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_LONG: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVFloat(__pyx_v_handle, __pyx_v_vecF); + } + + /* "PyCafe.pyx":6515 + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVFloat(handle, vecF) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L51; + } + __pyx_L51:; + } + } + + /* "PyCafe.pyx":6510 + * status = self._c_cafe.setVDouble(handle, vecD) + * + * elif valType == CAFE_FLOAT: # <<<<<<<<<<<<<< + * + * vecF.reserve(len(valSet)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6520 + * elif valType == CAFE_LONG: + * + * vecI.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6520, __pyx_L1_error) + __pyx_v_vecI.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6521 + * + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecI.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6521, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6522 + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_24 = __Pyx_PyInt_As_dbr_long_t(__pyx_t_8); if (unlikely((__pyx_t_24 == ((dbr_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 6522, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecI.push_back(__pyx_t_24); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6522, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6524 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVLong(handle, vecI) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6525 + * + * with nogil: + * status = self._c_cafe.setVLong(handle, vecI) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_SHORT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVLong(__pyx_v_handle, __pyx_v_vecI); + } + + /* "PyCafe.pyx":6524 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVLong(handle, vecI) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L56; + } + __pyx_L56:; + } + } + + /* "PyCafe.pyx":6518 + * status = self._c_cafe.setVFloat(handle, vecF) + * + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * + * vecI.reserve(len(valSet)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":6529 + * elif valType == CAFE_SHORT: + * + * vecShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6529, __pyx_L1_error) + __pyx_v_vecShort.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6530 + * + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecShort.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6530, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6531 + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_25 = __Pyx_PyInt_As_short(__pyx_t_8); if (unlikely((__pyx_t_25 == (short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6531, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecShort.push_back(__pyx_t_25); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6531, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6533 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVShort(handle, vecShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6534 + * + * with nogil: + * status = self._c_cafe.setVShort(handle, vecShort) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_USHORT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVShort(__pyx_v_handle, __pyx_v_vecShort); + } + + /* "PyCafe.pyx":6533 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVShort(handle, vecShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L61; + } + __pyx_L61:; + } + } + + /* "PyCafe.pyx":6527 + * status = self._c_cafe.setVLong(handle, vecI) + * + * elif valType == CAFE_SHORT: # <<<<<<<<<<<<<< + * + * vecShort.reserve(len(valSet)) + */ + break; + case CAFE_USHORT: + + /* "PyCafe.pyx":6538 + * elif valType == CAFE_USHORT: + * + * vecUShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6538, __pyx_L1_error) + __pyx_v_vecUShort.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6539 + * + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecUShort.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6539, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6540 + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_26 = __Pyx_PyInt_As_unsigned_short(__pyx_t_8); if (unlikely((__pyx_t_26 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6540, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecUShort.push_back(__pyx_t_26); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6540, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6542 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6543 + * + * with nogil: + * status = self._c_cafe.setVUShort(handle, vecUShort) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_CHAR: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVUShort(__pyx_v_handle, __pyx_v_vecUShort); + } + + /* "PyCafe.pyx":6542 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L66; + } + __pyx_L66:; + } + } + + /* "PyCafe.pyx":6536 + * status = self._c_cafe.setVShort(handle, vecShort) + * + * elif valType == CAFE_USHORT: # <<<<<<<<<<<<<< + * + * vecUShort.reserve(len(valSet)) + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":6547 + * elif valType == CAFE_CHAR: + * + * vecChar.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6547, __pyx_L1_error) + __pyx_v_vecChar.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6548 + * + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecChar.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6548, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6549 + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_27 = __Pyx_PyInt_As_dbr_char_t(__pyx_t_8); if (unlikely((__pyx_t_27 == ((dbr_char_t)-1)) && PyErr_Occurred())) __PYX_ERR(3, 6549, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecChar.push_back(__pyx_t_27); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6549, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6551 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVChar(handle, vecChar) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6552 + * + * with nogil: + * status = self._c_cafe.setVChar(handle, vecChar) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_STRING: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVChar(__pyx_v_handle, __pyx_v_vecChar); + } + + /* "PyCafe.pyx":6551 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVChar(handle, vecChar) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L71; + } + __pyx_L71:; + } + } + + /* "PyCafe.pyx":6545 + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + * elif valType == CAFE_CHAR: # <<<<<<<<<<<<<< + * + * vecChar.reserve(len(valSet)) + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":6556 + * elif valType == CAFE_STRING: + * + * vecS.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6556, __pyx_L1_error) + __pyx_v_vecS.reserve(__pyx_t_18); + + /* "PyCafe.pyx":6557 + * + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * if isinstance(valSet[i], str): + * #valSet[i] = (valSet[i]).encode('utf_8') + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6557, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":6558 + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): # <<<<<<<<<<<<<< + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('latin-1') + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyUnicode_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6560 + * if isinstance(valSet[i], str): + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('latin-1') # <<<<<<<<<<<<<< + * else: + * temp = valSet[i] + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_kp_u_latin_1) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_u_latin_1); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":6558 + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): # <<<<<<<<<<<<<< + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('latin-1') + */ + goto __pyx_L74; + } + + /* "PyCafe.pyx":6562 + * temp = (valSet[i]).encode('latin-1') + * else: + * temp = valSet[i] # <<<<<<<<<<<<<< + * vecS.push_back( temp) + * with nogil: + */ + /*else*/ { + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + } + __pyx_L74:; + + /* "PyCafe.pyx":6563 + * else: + * temp = valSet[i] + * vecS.push_back( temp) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setVString(handle, vecS) + */ + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_v_temp); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6563, __pyx_L1_error) + try { + __pyx_v_vecS.push_back(((std::string)__pyx_t_28)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6563, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6564 + * temp = valSet[i] + * vecS.push_back( temp) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVString(handle, vecS) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6565 + * vecS.push_back( temp) + * with nogil: + * status = self._c_cafe.setVString(handle, vecS) # <<<<<<<<<<<<<< + * + * elif isBytesType: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVString(__pyx_v_handle, __pyx_v_vecS); + } + + /* "PyCafe.pyx":6564 + * temp = valSet[i] + * vecS.push_back( temp) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVString(handle, vecS) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L77; + } + __pyx_L77:; + } + } + + /* "PyCafe.pyx":6554 + * status = self._c_cafe.setVChar(handle, vecChar) + * + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * + * vecS.reserve(len(valSet)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":6458 + * valSet = valSet[0] + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6567 + * status = self._c_cafe.setVString(handle, vecS) + * + * elif isBytesType: # <<<<<<<<<<<<<< + * #print("isBytesType") + * valSetS = valSet.value + */ + __pyx_t_2 = (__pyx_v_isBytesType != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6569 + * elif isBytesType: + * #print("isBytesType") + * valSetS = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6569, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_28); + + /* "PyCafe.pyx":6570 + * #print("isBytesType") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6571 + * valSetS = valSet.value + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_char)): + * #print("is ctypes.c_char") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6570 + * #print("isBytesType") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L80; + } + __pyx_L80:; + } + } + + /* "PyCafe.pyx":6567 + * status = self._c_cafe.setVString(handle, vecS) + * + * elif isBytesType: # <<<<<<<<<<<<<< + * #print("isBytesType") + * valSetS = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6572 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): # <<<<<<<<<<<<<< + * #print("is ctypes.c_char") + * # print(valSet.value) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_char); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6572, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6576 + * # print(valSet.value) + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6576, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_28; + + /* "PyCafe.pyx":6577 + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6578 + * valSetS = valSet.value.decode() + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6577 + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L83; + } + __pyx_L83:; + } + } + + /* "PyCafe.pyx":6572 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): # <<<<<<<<<<<<<< + * #print("is ctypes.c_char") + * # print(valSet.value) + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6579 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF = valSet.value + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_c_float); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6580 + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 6580, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_valSetF = ((float)__pyx_t_23); + + /* "PyCafe.pyx":6581 + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6582 + * valSetF = valSet.value + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setFloat(__pyx_v_handle, __pyx_v_valSetF); + } + + /* "PyCafe.pyx":6581 + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L86; + } + __pyx_L86:; + } + } + + /* "PyCafe.pyx":6579 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF = valSet.value + * with nogil: + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6583 + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD = valSet.value + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6584 + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6584, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetD = ((double)__pyx_t_22); + + /* "PyCafe.pyx":6585 + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6586 + * valSetD = valSet.value + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesInt): + * # print("ctypesInt") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setDouble(__pyx_v_handle, __pyx_v_valSetD); + } + + /* "PyCafe.pyx":6585 + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L89; + } + __pyx_L89:; + } + } + + /* "PyCafe.pyx":6583 + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD = valSet.value + * with nogil: + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6587 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * # print("ctypesInt") + * valSetI = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesInt); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6587, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6589 + * elif isinstance(valSet, ctypesInt): + * # print("ctypesInt") + * valSetI = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6589, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetI = ((int)__pyx_t_17); + + /* "PyCafe.pyx":6590 + * # print("ctypesInt") + * valSetI = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6591 + * valSetI = valSet.value + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesLongLong): + * # print("ctypesLongLong") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetI); + } + + /* "PyCafe.pyx":6590 + * # print("ctypesInt") + * valSetI = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L92; + } + __pyx_L92:; + } + } + + /* "PyCafe.pyx":6587 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * # print("ctypesInt") + * valSetI = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6592 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): # <<<<<<<<<<<<<< + * # print("ctypesLongLong") + * valSetLL = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesLongLong); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6592, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6594 + * elif isinstance(valSet, ctypesLongLong): + * # print("ctypesLongLong") + * valSetLL = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_29 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_10); if (unlikely((__pyx_t_29 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(3, 6594, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetLL = ((PY_LONG_LONG)__pyx_t_29); + + /* "PyCafe.pyx":6595 + * # print("ctypesLongLong") + * valSetLL = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6596 + * valSetLL = valSet.value + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesShort): + * #print("ctypesShort") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetLL); + } + + /* "PyCafe.pyx":6595 + * # print("ctypesLongLong") + * valSetLL = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L95; + } + __pyx_L95:; + } + } + + /* "PyCafe.pyx":6592 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): # <<<<<<<<<<<<<< + * # print("ctypesLongLong") + * valSetLL = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6597 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesShort); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6597, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6599 + * elif isinstance(valSet, ctypesShort): + * #print("ctypesShort") + * valSetShort = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_25 = __Pyx_PyInt_As_short(__pyx_t_10); if (unlikely((__pyx_t_25 == (short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6599, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetShort = ((short)__pyx_t_25); + + /* "PyCafe.pyx":6600 + * #print("ctypesShort") + * valSetShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6601 + * valSetShort = valSet.value + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesUShort): + * #print("ctypesUShort") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setShort(__pyx_v_handle, __pyx_v_valSetShort); + } + + /* "PyCafe.pyx":6600 + * #print("ctypesShort") + * valSetShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L98; + } + __pyx_L98:; + } + } + + /* "PyCafe.pyx":6597 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6602 + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): # <<<<<<<<<<<<<< + * #print("ctypesUShort") + * valSetUShort = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesUShort); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6602, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6604 + * elif isinstance(valSet, ctypesUShort): + * #print("ctypesUShort") + * valSetUShort = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_26 = __Pyx_PyInt_As_unsigned_short(__pyx_t_10); if (unlikely((__pyx_t_26 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(3, 6604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetUShort = ((unsigned short)__pyx_t_26); + + /* "PyCafe.pyx":6605 + * #print("ctypesUShort") + * valSetUShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6606 + * valSetUShort = valSet.value + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypesString)): + * #print("ctypesString") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setUShort(__pyx_v_handle, __pyx_v_valSetUShort); + } + + /* "PyCafe.pyx":6605 + * #print("ctypesUShort") + * valSetUShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L101; + } + __pyx_L101:; + } + } + + /* "PyCafe.pyx":6602 + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): # <<<<<<<<<<<<<< + * #print("ctypesUShort") + * valSetUShort = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6607 + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesString); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 6607, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6609 + * elif isinstance(valSet, (ctypesString)): + * #print("ctypesString") + * valSetS = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_28); + + /* "PyCafe.pyx":6610 + * #print("ctypesString") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6611 + * valSetS = valSet.value + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesUChar): + * #print("ctypesUChar") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6610 + * #print("ctypesString") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L104; + } + __pyx_L104:; + } + } + + /* "PyCafe.pyx":6607 + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6612 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): # <<<<<<<<<<<<<< + * #print("ctypesUChar") + * valSetUChar = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesUChar); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 6612, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6614 + * elif isinstance(valSet, ctypesUChar): + * #print("ctypesUChar") + * valSetUChar = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6614, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_30 = __Pyx_PyInt_As_unsigned_char(__pyx_t_10); if (unlikely((__pyx_t_30 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(3, 6614, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetUChar = ((unsigned char)__pyx_t_30); + + /* "PyCafe.pyx":6615 + * #print("ctypesUChar") + * valSetUChar = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6616 + * valSetUChar = valSet.value + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (float)): + * #print("float type") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setChar(__pyx_v_handle, __pyx_v_valSetUChar); + } + + /* "PyCafe.pyx":6615 + * #print("ctypesUChar") + * valSetUChar = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L107; + } + __pyx_L107:; + } + } + + /* "PyCafe.pyx":6612 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): # <<<<<<<<<<<<<< + * #print("ctypesUChar") + * valSetUChar = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6617 + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD = valSet + */ + __pyx_t_3 = PyFloat_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6619 + * elif isinstance(valSet, (float)): + * #print("float type") + * valSetD = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + */ + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_v_valSet); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(3, 6619, __pyx_L1_error) + __pyx_v_valSetD = ((float)__pyx_t_23); + + /* "PyCafe.pyx":6620 + * #print("float type") + * valSetD = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6621 + * valSetD = valSet + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (int, long)): + * #print("int/long type") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setDouble(__pyx_v_handle, __pyx_v_valSetD); + } + + /* "PyCafe.pyx":6620 + * #print("float type") + * valSetD = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L110; + } + __pyx_L110:; + } + } + + /* "PyCafe.pyx":6617 + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD = valSet + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6622 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI = valSet + */ + __pyx_t_3 = PyInt_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L111_bool_binop_done; + } + __pyx_t_1 = PyLong_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L111_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6624 + * elif isinstance(valSet, (int, long)): + * #print("int/long type") + * valSetI = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_v_valSet); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6624, __pyx_L1_error) + __pyx_v_valSetI = ((int)__pyx_t_17); + + /* "PyCafe.pyx":6625 + * #print("int/long type") + * valSetI = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6626 + * valSetI = valSet + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (str)): + * #print("str type", valSet) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetI); + } + + /* "PyCafe.pyx":6625 + * #print("int/long type") + * valSetI = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L115; + } + __pyx_L115:; + } + } + + /* "PyCafe.pyx":6622 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI = valSet + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6627 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * #print("str type", valSet) + * + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6630 + * #print("str type", valSet) + * + * valSetS = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_v_valSet); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6630, __pyx_L1_error) + __pyx_v_valSetS = __pyx_t_28; + + /* "PyCafe.pyx":6631 + * + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6632 + * valSetS = valSet + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (bytes, bytearray)): + * #print("bytes,bytearray") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6631 + * + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L118; + } + __pyx_L118:; + } + } + + /* "PyCafe.pyx":6627 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * #print("str type", valSet) + * + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6633 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * valSetS = valSet.decode('utf8') + */ + __pyx_t_3 = PyBytes_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L119_bool_binop_done; + } + __pyx_t_1 = PyByteArray_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L119_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6635 + * elif isinstance(valSet, (bytes, bytearray)): + * #print("bytes,bytearray") + * valSetS = valSet.decode('utf8') # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_n_u_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf8); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6635, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_28; + + /* "PyCafe.pyx":6636 + * #print("bytes,bytearray") + * valSetS = valSet.decode('utf8') + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6637 + * valSetS = valSet.decode('utf8') + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (unicode)): + * #print("unicode") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6636 + * #print("bytes,bytearray") + * valSetS = valSet.decode('utf8') + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L123; + } + __pyx_L123:; + } + } + + /* "PyCafe.pyx":6633 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * valSetS = valSet.decode('utf8') + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6638 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS = valSet + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6640 + * elif isinstance(valSet, (unicode)): + * #print("unicode") + * valSetS = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_28 = __pyx_convert_string_from_py_std__in_string(__pyx_v_valSet); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6640, __pyx_L1_error) + __pyx_v_valSetS = __pyx_t_28; + + /* "PyCafe.pyx":6641 + * #print("unicode") + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * else: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6642 + * valSetS = valSet + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":6641 + * #print("unicode") + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * else: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L126; + } + __pyx_L126:; + } + } + + /* "PyCafe.pyx":6638 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS = valSet + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":6644 + * status = self._c_cafe.setString(handle, valSetS) + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") # <<<<<<<<<<<<<< + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":6645 + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ # <<<<<<<<<<<<<< + * or not) should be of of type , or ") + * type(valSet) + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":6647 + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + * type(valSet) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + (void)(((PyObject *)Py_TYPE(__pyx_v_valSet))); + } + __pyx_L33:; + + /* "PyCafe.pyx":6649 + * type(valSet) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6650 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6651 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6652 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6651 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L129; + } + + /* "PyCafe.pyx":6654 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L129:; + + /* "PyCafe.pyx":6650 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6655 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6656 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6657 + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6656 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6658 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6658, __pyx_L1_error) + + /* "PyCafe.pyx":6655 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":6649 + * type(valSet) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":6660 + * raise _cafeException + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * # END def set(self, handlePV, valSet): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6315 + * ############################################################################## + * + * def set(self, handlePV, valSet): # <<<<<<<<<<<<<< + * cdef str _METHOD = "set(handlePV, valSet)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_ctypesString); + __Pyx_XDECREF(__pyx_v_ctypesUChar); + __Pyx_XDECREF(__pyx_v_ctypesShort); + __Pyx_XDECREF(__pyx_v_ctypesUShort); + __Pyx_XDECREF(__pyx_v_ctypesInt); + __Pyx_XDECREF(__pyx_v_ctypesLongLong); + __Pyx_XDECREF(__pyx_v_dtypesString); + __Pyx_XDECREF(__pyx_v_dtypesUChar); + __Pyx_XDECREF(__pyx_v_dtypesShort); + __Pyx_XDECREF(__pyx_v_dtypesUShort); + __Pyx_XDECREF(__pyx_v_dtypesInt); + __Pyx_XDECREF(__pyx_v_dtypesLongLong); + __Pyx_XDECREF(__pyx_v_dtypesFloat); + __Pyx_XDECREF(__pyx_v_dtypesDouble); + __Pyx_XDECREF(__pyx_v_classType); + __Pyx_XDECREF(__pyx_v_substringmv); + __Pyx_XDECREF(__pyx_v_class_name); + __Pyx_XDECREF(__pyx_v_temp); + __Pyx_XDECREF(__pyx_v_valSet); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6667 + * ############################################################################ + * + * def setScalarList(self, list handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setScalarList" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_397setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_397setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_valList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setScalarList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_valList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setScalarList", 1, 2, 2, 1); __PYX_ERR(3, 6667, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScalarList") < 0)) __PYX_ERR(3, 6667, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = ((PyObject*)values[0]); + __pyx_v_valList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setScalarList", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6667, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(3, 6667, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valList), (&PyList_Type), 1, "valList", 1))) __PYX_ERR(3, 6667, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_396setScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_valList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_396setScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_valList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + CYTHON_UNUSED unsigned int __pyx_v_nelemTotal; + Py_ssize_t __pyx_v_i; + std::vector __pyx_v_v; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + std::string __pyx_t_14; + double __pyx_t_15; + int __pyx_t_16; + unsigned int __pyx_t_17; + __Pyx_RefNannySetupContext("setScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":6668 + * + * def setScalarList(self, list handleList, list valList): + * cdef str _METHOD = "setScalarList" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_n_u_setScalarList); + __pyx_v__METHOD = __pyx_n_u_setScalarList; + + /* "PyCafe.pyx":6671 + * + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6671, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6672 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, __pyx_v_handleList, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(3, 6672, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":6671 + * + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6673 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + * First input argument, should be a 'list' of of type \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6673, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_Check(__pyx_t_1); + __pyx_t_4 = (__pyx_t_2 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_t_1); + __pyx_t_2 = (__pyx_t_4 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6674 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type \ + * if handles or if PVs") + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(3, 6674, __pyx_L1_error) + + /* "PyCafe.pyx":6673 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + * First input argument, should be a 'list' of of type \ + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":6678 + * if handles or if PVs") + * + * if len(handleList) != len(valList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6678, __pyx_L1_error) + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6678, __pyx_L1_error) + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6678, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6678, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_5 != __pyx_t_6) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6680 + * if len(handleList) != len(valList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ # <<<<<<<<<<<<<< + * the length of data list ", len(valList)) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6680, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6680, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":6681 + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + * the length of data list ", len(valList)) # <<<<<<<<<<<<<< + * + * nelemPrevious = [] + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6681, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6681, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":6679 + * + * if len(handleList) != len(valList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ # <<<<<<<<<<<<<< + * Length of handle list ", len(handleList), " does not match \ + * the length of data list ", len(valList)) + */ + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_does_not_match_the_length_of_da); + __Pyx_GIVEREF(__pyx_kp_u_does_not_match_the_length_of_da); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_does_not_match_the_length_of_da); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7); + __pyx_t_1 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(3, 6679, __pyx_L1_error) + + /* "PyCafe.pyx":6678 + * if handles or if PVs") + * + * if len(handleList) != len(valList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + */ + } + + /* "PyCafe.pyx":6683 + * the length of data list ", len(valList)) + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * # Better with PVDataHolder + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":6686 + * + * # Better with PVDataHolder + * cdef unsigned int nelemTotal = 0 # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + */ + __pyx_v_nelemTotal = 0; + + /* "PyCafe.pyx":6687 + * # Better with PVDataHolder + * cdef unsigned int nelemTotal = 0 + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + * nelemPrevious.append(self.hh.getNelemClient(handleList[i])) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6687, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6687, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6689 + * for i in range(0, len(handleList)): + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + * nelemPrevious.append(self.hh.getNelemClient(handleList[i])) # <<<<<<<<<<<<<< + * + * # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6689, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getNelemClient(__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_7); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 6689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":6695 + * # do this to avoid compiler warning messages + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6695, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6695, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6696 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Create temporary group from handleList + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6696, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6696, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6696, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6700 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * # cdef PVDataHolder * pvd = malloc( 100000000 + \ + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":6705 + * # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * # pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafe.pyx":6708 + * # pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * #cdef unsigned short valType = CAFE_STRING + */ + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(1)); + } + + /* "PyCafe.pyx":6712 + * #cdef unsigned short valType = CAFE_STRING + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafe.pyx":6713 + * + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): # <<<<<<<<<<<<<< + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6713, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = PyUnicode_Check(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6714 + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) # <<<<<<<<<<<<<< + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6714, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6714, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setString(__pyx_t_14)); + + /* "PyCafe.pyx":6713 + * + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): # <<<<<<<<<<<<<< + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":6715 + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): # <<<<<<<<<<<<<< + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6715, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyFloat_Check(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6716 + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) # <<<<<<<<<<<<<< + * elif isinstance(valList[i], (long, int)): + * pvd[i].setInt(valList[i]) + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6716, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6716, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setDouble(__pyx_t_15)); + + /* "PyCafe.pyx":6715 + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): # <<<<<<<<<<<<<< + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":6717 + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): # <<<<<<<<<<<<<< + * pvd[i].setInt(valList[i]) + * else: + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6717, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyLong_Check(__pyx_t_7); + __pyx_t_4 = (__pyx_t_3 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_4 = PyInt_Check(__pyx_t_7); + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L16_bool_binop_done:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6718 + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + * pvd[i].setInt(valList[i]) # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def setScalarList should never appear!") + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6718, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6718, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setInt(__pyx_t_16)); + + /* "PyCafe.pyx":6717 + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): # <<<<<<<<<<<<<< + * pvd[i].setInt(valList[i]) + * else: + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":6720 + * pvd[i].setInt(valList[i]) + * else: + * print("This line in PyCafe def setScalarList should never appear!") # <<<<<<<<<<<<<< + * + * cdef int status = ICAFE_NORMAL + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L15:; + } + + /* "PyCafe.pyx":6722 + * print("This line in PyCafe def setScalarList should never appear!") + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setPVArray(v, pvd) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6723 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6724 + * cdef int status = ICAFE_NORMAL + * with nogil: + * status = self._c_cafe.setPVArray(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setPVArray(__pyx_v_v, __pyx_v_pvd); + } + + /* "PyCafe.pyx":6723 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L20; + } + __pyx_L20:; + } + } + + /* "PyCafe.pyx":6726 + * status = self._c_cafe.setPVArray(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6726, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6726, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6727 + * + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_nelemPrevious, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyInt_NeObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 6727, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_3) { + + /* "PyCafe.pyx":6729 + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # return status for individual channels + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6729, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_nelemPrevious, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6728 + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_10, __pyx_t_17)); + + /* "PyCafe.pyx":6727 + * + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + } + + /* "PyCafe.pyx":6732 + * + * # return status for individual channels + * statusList = [] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_statusList = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":6734 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6735 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6736 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6735 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6734 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6738 + * self._c_cafe.printStatusMessage(status) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6738, __pyx_L1_error) + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6738, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6739 + * + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6740 + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6740, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 6740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":6741 + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6741, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6741, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_17)); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":6740 + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6742 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") + */ + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6743 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * print("") + * statusList.append(pvd[i].getStatus()) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":6744 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":6739 + * + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + + /* "PyCafe.pyx":6745 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_7); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 6745, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":6749 + * # free(pvd) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 6749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_statusList); + __pyx_t_7 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6667 + * ############################################################################ + * + * def setScalarList(self, list handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setScalarList" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.setScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6754 + * + * ################################################################################## + * def setCompoundList(self, handleList, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_399setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_399setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_vectorList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCompoundList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_vectorList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setCompoundList", 1, 2, 2, 1); __PYX_ERR(3, 6754, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompoundList") < 0)) __PYX_ERR(3, 6754, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = values[0]; + __pyx_v_vectorList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCompoundList", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6754, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vectorList), (&PyList_Type), 1, "vectorList", 1))) __PYX_ERR(3, 6754, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_398setCompoundList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_vectorList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_398setCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_vectorList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + int __pyx_v_i; + PVDataHolder *__pyx_v_pvdata; + CAFE_DATATYPE __pyx_v_valType; + long __pyx_v_k; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + unsigned int __pyx_t_10; + std::string __pyx_t_11; + double __pyx_t_12; + int __pyx_t_13; + Py_ssize_t __pyx_t_14; + long __pyx_t_15; + std::vector __pyx_t_16; + std::vector __pyx_t_17; + std::vector __pyx_t_18; + int __pyx_t_19; + __Pyx_RefNannySetupContext("setCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":6756 + * def setCompoundList(self, handleList, list vectorList): + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_kp_u_setCompoundList_handleList_list); + __pyx_v__METHOD = __pyx_kp_u_setCompoundList_handleList_list; + + /* "PyCafe.pyx":6758 + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6759 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * else: + * if not isinstance(handleList, (list)): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":6758 + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6761 + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_2 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6762 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 6762, __pyx_L1_error) + + /* "PyCafe.pyx":6761 + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":6765 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6766 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + */ + if (!(likely(PyList_CheckExact(__pyx_v_handleList))||((__pyx_v_handleList) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_handleList)->tp_name), 0))) __PYX_ERR(3, 6766, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandleList(__pyx_v_self, ((PyObject*)__pyx_v_handleList), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":6765 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":6767 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_1 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_1 = (__pyx_t_6 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L6_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6768 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(3, 6768, __pyx_L1_error) + + /* "PyCafe.pyx":6767 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L5:; + + /* "PyCafe.pyx":6771 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if len(handleList) != len(vectorList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6771, __pyx_L1_error) + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6771, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6771, __pyx_L1_error) + __pyx_t_1 = ((__pyx_t_7 != __pyx_t_8) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6773 + * if len(handleList) != len(vectorList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) # <<<<<<<<<<<<<< + * + * # do this to avoid compiler warning messages + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6773, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6773, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6773, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":6772 + * + * if len(handleList) != len(vectorList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ # <<<<<<<<<<<<<< + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + * + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_does_not_match_the_length_of_da_2); + __Pyx_GIVEREF(__pyx_kp_u_does_not_match_the_length_of_da_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_does_not_match_the_length_of_da_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 6772, __pyx_L1_error) + + /* "PyCafe.pyx":6771 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if len(handleList) != len(vectorList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + */ + } + } + __pyx_L3:; + + /* "PyCafe.pyx":6779 + * cdef int i + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6779, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6780 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Create temporary group from handleList + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6780, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 6780, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":6784 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * for i in range(0, len(vectorList)): + */ + __pyx_v_pvdata = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":6786 + * cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) + * + * for i in range(0, len(vectorList)): # <<<<<<<<<<<<<< + * + * # if not list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6786, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6786, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6789 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6789, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6790 + * # if not list + * if isinstance(vectorList[i], (str)): + * pvdata[i].setString(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (float)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6790, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6790, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_11)); + + /* "PyCafe.pyx":6789 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":6792 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6792, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyFloat_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6793 + * + * elif isinstance(vectorList[i], (float)): + * pvdata[i].setDouble(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6793, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6793, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_12)); + + /* "PyCafe.pyx":6792 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":6795 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6795, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6796 + * + * elif isinstance(vectorList[i], (long, int)): + * pvdata[i].setInt(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (list)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6796, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6796, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_13)); + + /* "PyCafe.pyx":6795 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":6798 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6798, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyList_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6801 + * + * # if list + * valType = CAFE_INVALID_DATATYPE # <<<<<<<<<<<<<< + * pvdata[i].setNelem(len(vectorList[i])) + * # for k in range(0, len(vectorList[i])): + */ + __pyx_v_valType = CAFE_INVALID_DATATYPE; + + /* "PyCafe.pyx":6802 + * # if list + * valType = CAFE_INVALID_DATATYPE + * pvdata[i].setNelem(len(vectorList[i])) # <<<<<<<<<<<<<< + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6802, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6802, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_14)); + + /* "PyCafe.pyx":6805 + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 # <<<<<<<<<<<<<< + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + */ + for (__pyx_t_15 = 0; __pyx_t_15 < 1; __pyx_t_15+=1) { + __pyx_v_k = __pyx_t_15; + + /* "PyCafe.pyx":6806 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6806, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PyUnicode_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6807 + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(vectorList[i][k], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6808 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L17_break; + + /* "PyCafe.pyx":6806 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":6809 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6809, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = PyFloat_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6810 + * break + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":6809 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":6811 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6811, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyLong_Check(__pyx_t_5); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_6 = PyInt_Check(__pyx_t_5); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L19_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6812 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + __pyx_t_2 = ((__pyx_v_valType != CAFE_DOUBLE) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6813 + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * else: + * valType = CAFE_STRING + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":6812 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + goto __pyx_L21; + } + + /* "PyCafe.pyx":6815 + * valType = CAFE_LONG + * else: + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6816 + * else: + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * # check dt of first element + */ + goto __pyx_L17_break; + } + __pyx_L21:; + + /* "PyCafe.pyx":6811 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + } + __pyx_L18:; + } + __pyx_L17_break:; + + /* "PyCafe.pyx":6819 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6820 + * # check dt of first element + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6820, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __pyx_convert_vector_from_py_double(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6820, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_16)); + + /* "PyCafe.pyx":6819 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6822 + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6822, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __pyx_convert_vector_from_py_int(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6822, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_17)); + + /* "PyCafe.pyx":6821 + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":6824 + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6824, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_18 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6824, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_18)); + + /* "PyCafe.pyx":6823 + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":6798 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":6827 + * + * else: + * print("This line in PyCafe def setCompoundList should never appear!") # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * Unknown data input; should be one of of type , , , ") + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6828 + * else: + * print("This line in PyCafe def setCompoundList should never appear!") + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 6828, __pyx_L1_error) + } + __pyx_L13:; + } + + /* "PyCafe.pyx":6833 + * # endForLoop + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setPVArray(v, pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6834 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvdata) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6835 + * cdef int status = ICAFE_NORMAL + * with nogil: + * status = self._c_cafe.setPVArray(v, pvdata) # <<<<<<<<<<<<<< + * + * # return status for individual channels + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setPVArray(__pyx_v_v, __pyx_v_pvdata); + } + + /* "PyCafe.pyx":6834 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvdata) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L24; + } + __pyx_L24:; + } + } + + /* "PyCafe.pyx":6838 + * + * # return status for individual channels + * statusList = [] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6840 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6841 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6842 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6841 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6840 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6844 + * self._c_cafe.printStatusMessage(status) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6844, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6845 + * + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_2 = (((__pyx_v_pvdata[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6846 + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":6847 + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6847, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":6846 + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + */ + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":6848 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + * print("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvdata[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":6849 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvdata[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":6850 + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + * print("") # <<<<<<<<<<<<<< + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + * statusList.append(pvdata[i].getStatus()) + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6850, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":6845 + * + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + + /* "PyCafe.pyx":6852 + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + * statusList.append(pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * + * return status, statusList + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvdata[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_4); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(3, 6852, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":6854 + * statusList.append(pvdata[i].getStatus()) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_statusList); + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6754 + * + * ################################################################################## + * def setCompoundList(self, handleList, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.setCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6859 + * + * ################################################################################## + * def setGroup(self, ghandleName, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_401setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_401setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_vectorList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_vectorList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGroup", 1, 2, 2, 1); __PYX_ERR(3, 6859, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGroup") < 0)) __PYX_ERR(3, 6859, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_ghandleName = values[0]; + __pyx_v_vectorList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6859, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vectorList), (&PyList_Type), 1, "vectorList", 1))) __PYX_ERR(3, 6859, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_400setGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_vectorList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_400setGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_vectorList) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvdata; + Py_ssize_t __pyx_v_i; + CAFE_DATATYPE __pyx_v_valType; + long __pyx_v_k; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PVDataHolder *__pyx_v_pvd; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + std::string __pyx_t_10; + double __pyx_t_11; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; + long __pyx_t_14; + std::vector __pyx_t_15; + std::vector __pyx_t_16; + std::vector __pyx_t_17; + PyObject *__pyx_t_18 = NULL; + unsigned int __pyx_t_19; + int __pyx_t_20; + __Pyx_RefNannySetupContext("setGroup", 0); + + /* "PyCafe.pyx":6861 + * def setGroup(self, ghandleName, list vectorList): + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_setGroup_self_ghandleName_list_v); + __pyx_v__METHOD = __pyx_kp_u_setGroup_self_ghandleName_list_v; + + /* "PyCafe.pyx":6863 + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6864 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6865 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6865, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6864 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6866 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6867 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_ghandleName))||((__pyx_v_ghandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_ghandleName)->tp_name), 0))) __PYX_ERR(3, 6867, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForGroupHandle(__pyx_v_self, ((PyObject*)__pyx_v_ghandleName), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6866 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6869 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 6869, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 6869, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_11) < 0) __PYX_ERR(3, 6869, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6871 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 6871, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6875 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6876 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * ### + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":6875 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":6880 + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + * + * cdef PVDataHolder * pvdata = pvg.getPVData() # <<<<<<<<<<<<<< + * + * for i in range(0, len(vectorList)): + */ + __pyx_v_pvdata = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6882 + * cdef PVDataHolder * pvdata = pvg.getPVData() + * + * for i in range(0, len(vectorList)): # <<<<<<<<<<<<<< + * + * # if not list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6882, __pyx_L1_error) + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6882, __pyx_L1_error) + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6885 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6885, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6886 + * # if not list + * if isinstance(vectorList[i], (str)): + * pvdata[i].setString(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (float)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6886, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_10)); + + /* "PyCafe.pyx":6885 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":6888 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6888, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6889 + * + * elif isinstance(vectorList[i], (float)): + * pvdata[i].setDouble(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6889, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_11)); + + /* "PyCafe.pyx":6888 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":6891 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6891, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyLong_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6892 + * + * elif isinstance(vectorList[i], (long, int)): + * pvdata[i].setInt(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (list)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6892, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_12)); + + /* "PyCafe.pyx":6891 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":6894 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6894, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyList_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6897 + * + * # if list + * valType = CAFE_INVALID_DATATYPE # <<<<<<<<<<<<<< + * pvdata[i].setNelem(len(vectorList[i])) + * # for k in range(0, len(vectorList[i])): + */ + __pyx_v_valType = CAFE_INVALID_DATATYPE; + + /* "PyCafe.pyx":6898 + * # if list + * valType = CAFE_INVALID_DATATYPE + * pvdata[i].setNelem(len(vectorList[i])) # <<<<<<<<<<<<<< + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6898, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_13)); + + /* "PyCafe.pyx":6901 + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 # <<<<<<<<<<<<<< + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + */ + for (__pyx_t_14 = 0; __pyx_t_14 < 1; __pyx_t_14+=1) { + __pyx_v_k = __pyx_t_14; + + /* "PyCafe.pyx":6902 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6902, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = PyUnicode_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6903 + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(vectorList[i][k], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6904 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L15_break; + + /* "PyCafe.pyx":6902 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":6905 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6905, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6906 + * break + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":6905 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":6907 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6907, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyLong_Check(__pyx_t_5); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_t_5); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L17_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6908 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + __pyx_t_2 = ((__pyx_v_valType != CAFE_DOUBLE) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6909 + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * else: + * valType = CAFE_STRING + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":6908 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":6911 + * valType = CAFE_LONG + * else: + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6912 + * else: + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * # check dt of first element + */ + goto __pyx_L15_break; + } + __pyx_L19:; + + /* "PyCafe.pyx":6907 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + } + __pyx_L16:; + } + __pyx_L15_break:; + + /* "PyCafe.pyx":6915 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6916 + * # check dt of first element + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6916, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __pyx_convert_vector_from_py_double(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6916, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_15)); + + /* "PyCafe.pyx":6915 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6918 + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6918, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __pyx_convert_vector_from_py_int(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_16)); + + /* "PyCafe.pyx":6917 + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":6920 + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6920, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 6920, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_17)); + + /* "PyCafe.pyx":6919 + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":6894 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":6924 + * else: + * + * print("PyCafe def setGroup: Unusual data type for element", # <<<<<<<<<<<<<< + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + */ + /*else*/ { + + /* "PyCafe.pyx":6925 + * + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + * Unknown data input; should be one of of type , , , ") + */ + __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 6925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6925, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":6924 + * else: + * + * print("PyCafe def setGroup: Unusual data type for element", # <<<<<<<<<<<<<< + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + */ + __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 6924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_INCREF(__pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + __Pyx_GIVEREF(__pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u__138); + __Pyx_GIVEREF(__pyx_kp_u__138); + PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_kp_u__138); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_6))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_6))); + PyTuple_SET_ITEM(__pyx_t_18, 3, ((PyObject *)Py_TYPE(__pyx_t_6))); + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6926 + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 6926, __pyx_L1_error) + } + __pyx_L11:; + } + + /* "PyCafe.pyx":6931 + * # endForLoop + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * statusList = [] + * pvg.setPVData(pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6932 + * + * cdef int status = ICAFE_NORMAL + * statusList = [] # <<<<<<<<<<<<<< + * pvg.setPVData(pvdata) + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6933 + * cdef int status = ICAFE_NORMAL + * statusList = [] + * pvg.setPVData(pvdata) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_pvg.setPVData(__pyx_v_pvdata); + + /* "PyCafe.pyx":6935 + * pvg.setPVData(pvdata) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupSet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6936 + * + * with nogil: + * status = self._c_cafe.groupSet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupSet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":6935 + * pvg.setPVData(pvdata) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupSet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L22; + } + __pyx_L22:; + } + } + + /* "PyCafe.pyx":6940 + * cdef PVDataHolder * pvd + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6941 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6942 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6941 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + } + + /* "PyCafe.pyx":6946 + * #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6948 + * pvd = pvg.getPVData() + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * else: + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_19 = __pyx_t_4; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_19; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":6949 + * + * for i in range(0, pvg.getNPV()): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * else: + * statusList.append(status) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(3, 6949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":6940 + * cdef PVDataHolder * pvd + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + goto __pyx_L23; + } + + /* "PyCafe.pyx":6951 + * statusList.append(pvd[i].getStatus()) + * else: + * statusList.append(status) # <<<<<<<<<<<<<< + * + * return status, statusList + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(3, 6951, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L23:; + + /* "PyCafe.pyx":6953 + * statusList.append(status) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_statusList); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_18; + __pyx_t_18 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6859 + * + * ################################################################################## + * def setGroup(self, ghandleName, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_AddTraceback("PyCafe.CyCafe.setGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6961 + * ################################################################################## + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_403gameSetAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_403gameSetAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVAction = 0; + PyObject *__pyx_v_valAction = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("gameSetAndMatch (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVAction,&__pyx_n_s_valAction,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + CYTHON_FALLTHROUGH; + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 1); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVAction)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 2); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valAction)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 3); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 4); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 5); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 6: + if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 6); __PYX_ERR(3, 6961, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 7: + if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 7); __PYX_ERR(3, 6961, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gameSetAndMatch") < 0)) __PYX_ERR(3, 6961, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + } + __pyx_v_handlePVSet = ((PyObject*)values[0]); + __pyx_v_valSet = ((PyObject*)values[1]); + __pyx_v_handlePVAction = values[2]; + __pyx_v_valAction = values[3]; + __pyx_v_handlePVMatch = ((PyObject*)values[4]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6961, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 6961, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 6961, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 6961, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.gameSetAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVSet), (&PyList_Type), 1, "handlePVSet", 1))) __PYX_ERR(3, 6961, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(3, 6961, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(3, 6961, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_402gameSetAndMatch(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVAction, __pyx_v_valAction, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_402gameSetAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVAction, PyObject *__pyx_v_valAction, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_tmp = NULL; + std::vector __pyx_v_handleSet; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + std::vector __pyx_v_handleAction; + std::vector __pyx_v_valActionV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + std::string __pyx_t_11; + double __pyx_t_12; + __Pyx_RefNannySetupContext("gameSetAndMatch", 0); + __Pyx_INCREF(__pyx_v_handlePVAction); + __Pyx_INCREF(__pyx_v_valAction); + + /* "PyCafe.pyx":6962 + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_gameSetAndMatch_list_handlePVSet); + __pyx_v__METHOD = __pyx_kp_u_gameSetAndMatch_list_handlePVSet; + + /* "PyCafe.pyx":6965 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6965, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6965, __pyx_L1_error) + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6965, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6965, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6966 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 6966, __pyx_L1_error) + + /* "PyCafe.pyx":6965 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + } + + /* "PyCafe.pyx":6969 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6969, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6969, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6969, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6969, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_2 != __pyx_t_1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6970 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 6970, __pyx_L1_error) + + /* "PyCafe.pyx":6969 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":6973 + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + * if not isinstance(handlePVAction, (list)): # <<<<<<<<<<<<<< + * tmp = handlePVAction + * handlePVAction = [] + */ + __pyx_t_3 = PyList_Check(__pyx_v_handlePVAction); + __pyx_t_5 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":6974 + * + * if not isinstance(handlePVAction, (list)): + * tmp = handlePVAction # <<<<<<<<<<<<<< + * handlePVAction = [] + * handlePVAction.append(tmp) + */ + __Pyx_INCREF(__pyx_v_handlePVAction); + __pyx_v_tmp = __pyx_v_handlePVAction; + + /* "PyCafe.pyx":6975 + * if not isinstance(handlePVAction, (list)): + * tmp = handlePVAction + * handlePVAction = [] # <<<<<<<<<<<<<< + * handlePVAction.append(tmp) + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handlePVAction, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":6976 + * tmp = handlePVAction + * handlePVAction = [] + * handlePVAction.append(tmp) # <<<<<<<<<<<<<< + * + * if not isinstance(valAction, (list)): + */ + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_handlePVAction, __pyx_v_tmp); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 6976, __pyx_L1_error) + + /* "PyCafe.pyx":6973 + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + * if not isinstance(handlePVAction, (list)): # <<<<<<<<<<<<<< + * tmp = handlePVAction + * handlePVAction = [] + */ + } + + /* "PyCafe.pyx":6978 + * handlePVAction.append(tmp) + * + * if not isinstance(valAction, (list)): # <<<<<<<<<<<<<< + * tmp = valAction + * valAction = [] + */ + __pyx_t_5 = PyList_Check(__pyx_v_valAction); + __pyx_t_3 = ((!(__pyx_t_5 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6979 + * + * if not isinstance(valAction, (list)): + * tmp = valAction # <<<<<<<<<<<<<< + * valAction = [] + * valAction.append(tmp) + */ + __Pyx_INCREF(__pyx_v_valAction); + __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_v_valAction); + + /* "PyCafe.pyx":6980 + * if not isinstance(valAction, (list)): + * tmp = valAction + * valAction = [] # <<<<<<<<<<<<<< + * valAction.append(tmp) + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_valAction, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":6981 + * tmp = valAction + * valAction = [] + * valAction.append(tmp) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleSet + */ + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_valAction, __pyx_v_tmp); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 6981, __pyx_L1_error) + + /* "PyCafe.pyx":6978 + * handlePVAction.append(tmp) + * + * if not isinstance(valAction, (list)): # <<<<<<<<<<<<<< + * tmp = valAction + * valAction = [] + */ + } + + /* "PyCafe.pyx":6984 + * + * cdef vector[unsigned int] handleSet + * handleSet.reserve(len(handlePVSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleMatch + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6984, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6984, __pyx_L1_error) + __pyx_v_handleSet.reserve(__pyx_t_1); + + /* "PyCafe.pyx":6987 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6987, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6987, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_1); + + /* "PyCafe.pyx":6990 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleAction + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6990, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6990, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":6993 + * + * cdef vector[unsigned int] handleAction + * handleAction.reserve(len(handlePVAction)) # <<<<<<<<<<<<<< + * + * cdef vector[string] valActionV + */ + __pyx_t_1 = PyObject_Length(__pyx_v_handlePVAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6993, __pyx_L1_error) + __pyx_v_handleAction.reserve(__pyx_t_1); + + /* "PyCafe.pyx":6996 + * + * cdef vector[string] valActionV + * valActionV.reserve(len(valAction)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVSet)): + */ + __pyx_t_1 = PyObject_Length(__pyx_v_valAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6996, __pyx_L1_error) + __pyx_v_valActionV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":6998 + * valActionV.reserve(len(valAction)) + * + * for i in range(0, len(handlePVSet)): # <<<<<<<<<<<<<< + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 6998, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 6998, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":6999 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 6999, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyInt_Check(__pyx_t_4); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_4); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L10_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7000 + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7000, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7000, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7000, __pyx_L1_error) + } + + /* "PyCafe.pyx":6999 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":7001 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7001, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7002 + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVSet))||((__pyx_v_handlePVSet) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVSet)->tp_name), 0))) __PYX_ERR(3, 7002, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVSet), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7002, __pyx_L1_error) + } + + /* "PyCafe.pyx":7001 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":7004 + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7004, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7004, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_ThandlePVSet_list_member_should) < 0) __PYX_ERR(3, 7004, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":7006 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7006, __pyx_L1_error) + } + __pyx_L9:; + } + + /* "PyCafe.pyx":7008 + * raise _cafeException + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7008, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7008, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7009 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7009, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = PyInt_Check(__pyx_t_10); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_10); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7010 + * 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)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7010, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7010, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7010, __pyx_L1_error) + } + + /* "PyCafe.pyx":7009 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":7011 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7011, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = PyUnicode_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7012 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVMatch))||((__pyx_v_handlePVMatch) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVMatch)->tp_name), 0))) __PYX_ERR(3, 7012, __pyx_L1_error) + __pyx_t_10 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7012, __pyx_L1_error) + } + + /* "PyCafe.pyx":7011 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":7014 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7014, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7014, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_kp_u_handleMatch_list_member_should_b) < 0) __PYX_ERR(3, 7014, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7016 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVAction)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7016, __pyx_L1_error) + } + __pyx_L14:; + } + + /* "PyCafe.pyx":7018 + * raise _cafeException + * + * for i in range(0, len(handlePVAction)): # <<<<<<<<<<<<<< + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_handlePVAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7018, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7019 + * + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): # <<<<<<<<<<<<<< + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyInt_Check(__pyx_t_4); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_4); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L20_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7020 + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVAction[i], (str)): + * handleAction.push_back(self.checkForHandle(handlePVAction)) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleAction.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7020, __pyx_L1_error) + } + + /* "PyCafe.pyx":7019 + * + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): # <<<<<<<<<<<<<< + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":7021 + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): # <<<<<<<<<<<<<< + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7022 + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + * handleAction.push_back(self.checkForHandle(handlePVAction)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVAction))||((__pyx_v_handlePVAction) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVAction)->tp_name), 0))) __PYX_ERR(3, 7022, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVAction), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7022, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleAction.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7022, __pyx_L1_error) + } + + /* "PyCafe.pyx":7021 + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): # <<<<<<<<<<<<<< + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":7024 + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handlePVAction list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7024, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7024, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_handlePVAction_list_member_shoul) < 0) __PYX_ERR(3, 7024, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":7026 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handlePVAction list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valAction)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7026, __pyx_L1_error) + } + __pyx_L19:; + } + + /* "PyCafe.pyx":7028 + * raise _cafeException + * + * for i in range(0, len(valAction)): # <<<<<<<<<<<<<< + * if not isinstance(valAction[i], (str)): + * valActionV.push_back(str(valAction[i])) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_valAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7028, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7029 + * + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): # <<<<<<<<<<<<<< + * valActionV.push_back(str(valAction[i])) + * else: + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = PyUnicode_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7030 + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): + * valActionV.push_back(str(valAction[i])) # <<<<<<<<<<<<<< + * else: + * valActionV.push_back(valAction[i]) + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7030, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valActionV.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7030, __pyx_L1_error) + } + + /* "PyCafe.pyx":7029 + * + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): # <<<<<<<<<<<<<< + * valActionV.push_back(str(valAction[i])) + * else: + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":7032 + * valActionV.push_back(str(valAction[i])) + * else: + * valActionV.push_back(valAction[i]) # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + /*else*/ { + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7032, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valActionV.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7032, __pyx_L1_error) + } + } + __pyx_L24:; + } + + /* "PyCafe.pyx":7034 + * valActionV.push_back(valAction[i]) + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7034, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7034, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7035 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7035, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7035, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7035, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7039 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.gameSetAndMatch( + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7040 + * + * with nogil: + * status = self._c_cafe.gameSetAndMatch( # <<<<<<<<<<<<<< + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->gameSetAndMatch(__pyx_v_handleSet, __pyx_v_valSetV, __pyx_v_handleAction, __pyx_v_valActionV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7039 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.gameSetAndMatch( + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":7043 + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7044 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7045 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7044 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7047 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7046 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + * + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 7046, __pyx_L1_error) + + /* "PyCafe.pyx":7043 + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7049 + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6961 + * ################################################################################## + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.gameSetAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_tmp); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handlePVAction); + __Pyx_XDECREF(__pyx_v_valAction); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7054 + * ################################################################################## + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_405setAndMatchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_405setAndMatchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setAndMatchMany (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 1); __PYX_ERR(3, 7054, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 2); __PYX_ERR(3, 7054, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 3); __PYX_ERR(3, 7054, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 4); __PYX_ERR(3, 7054, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 5); __PYX_ERR(3, 7054, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatchMany") < 0)) __PYX_ERR(3, 7054, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + } + __pyx_v_handlePVSet = ((PyObject*)values[0]); + __pyx_v_valSet = ((PyObject*)values[1]); + __pyx_v_handlePVMatch = ((PyObject*)values[2]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7054, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7054, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7054, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7054, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVSet), (&PyList_Type), 1, "handlePVSet", 1))) __PYX_ERR(3, 7054, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(3, 7054, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(3, 7054, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_404setAndMatchMany(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_404setAndMatchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_handleSet; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + double __pyx_t_10; + __Pyx_RefNannySetupContext("setAndMatchMany", 0); + + /* "PyCafe.pyx":7055 + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatchMany_list_handlePVSet); + __pyx_v__METHOD = __pyx_kp_u_setAndMatchMany_list_handlePVSet; + + /* "PyCafe.pyx":7058 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7058, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7058, __pyx_L1_error) + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7058, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7058, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7059 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7059, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 7059, __pyx_L1_error) + + /* "PyCafe.pyx":7058 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + } + + /* "PyCafe.pyx":7062 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7062, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7062, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7062, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7062, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_2 != __pyx_t_1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7063 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 7063, __pyx_L1_error) + + /* "PyCafe.pyx":7062 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":7067 + * + * cdef vector[unsigned int] handleSet + * handleSet.reserve(len(handlePVSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleMatch + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7067, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7067, __pyx_L1_error) + __pyx_v_handleSet.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7070 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7070, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7070, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7073 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVSet)): + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7073, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7073, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7075 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVSet)): # <<<<<<<<<<<<<< + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7075, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7075, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7076 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7076, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7077 + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7077, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7077, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7077, __pyx_L1_error) + } + + /* "PyCafe.pyx":7076 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":7078 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7078, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7079 + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVSet))||((__pyx_v_handlePVSet) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVSet)->tp_name), 0))) __PYX_ERR(3, 7079, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVSet), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7079, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7079, __pyx_L1_error) + } + + /* "PyCafe.pyx":7078 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":7081 + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7081, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7081, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_ThandlePVSet_list_member_should) < 0) __PYX_ERR(3, 7081, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":7083 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7083, __pyx_L1_error) + } + __pyx_L7:; + } + + /* "PyCafe.pyx":7085 + * raise _cafeException + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7085, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7085, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7086 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7086, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyInt_Check(__pyx_t_9); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_9); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L13_bool_binop_done:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7087 + * 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)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7087, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7087, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7087, __pyx_L1_error) + } + + /* "PyCafe.pyx":7086 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":7088 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7088, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyUnicode_Check(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7089 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVMatch))||((__pyx_v_handlePVMatch) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVMatch)->tp_name), 0))) __PYX_ERR(3, 7089, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7089, __pyx_L1_error) + } + + /* "PyCafe.pyx":7088 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":7091 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7091, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7091, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_kp_u_handleMatch_list_member_should_b) < 0) __PYX_ERR(3, 7091, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7093 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7093, __pyx_L1_error) + } + __pyx_L12:; + } + + /* "PyCafe.pyx":7095 + * raise _cafeException + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7095, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7095, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7096 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7096, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7096, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7096, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7100 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatchMany( + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7101 + * + * with nogil: + * status = self._c_cafe.setAndMatchMany( # <<<<<<<<<<<<<< + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setAndMatchMany(__pyx_v_handleSet, __pyx_v_valSetV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7100 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatchMany( + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":7104 + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7105 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7106 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7105 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7108 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7107 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + * + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 7107, __pyx_L1_error) + + /* "PyCafe.pyx":7104 + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7110 + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7054 + * ################################################################################## + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7115 + * ############################################################################ + * + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, # <<<<<<<<<<<<<< + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_407setAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_407setAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + double __pyx_v_valSet; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setAndMatch (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 1); __PYX_ERR(3, 7115, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 2); __PYX_ERR(3, 7115, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 3); __PYX_ERR(3, 7115, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 4); __PYX_ERR(3, 7115, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 5); __PYX_ERR(3, 7115, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatch") < 0)) __PYX_ERR(3, 7115, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + } + __pyx_v_handlePVSet = values[0]; + __pyx_v_valSet = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_valSet == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7115, __pyx_L3_error) + __pyx_v_handlePVMatch = values[2]; + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7116, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7116, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7116, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7115, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_406setAndMatch(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_406setAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handleSet; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_handleMatch; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("setAndMatch", 0); + + /* "PyCafe.pyx":7117 + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," # <<<<<<<<<<<<<< + * "handlePVMatch, double tolerance," + * "double timeout, bint printFlag)") + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatch_handlePVSet_double_v); + __pyx_v__METHOD = __pyx_kp_u_setAndMatch_handlePVSet_double_v; + + /* "PyCafe.pyx":7121 + * "double timeout, bint printFlag)") + * + * cdef unsigned int handleSet = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + */ + __pyx_v_handleSet = 0; + + /* "PyCafe.pyx":7122 + * + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): # <<<<<<<<<<<<<< + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVSet); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7123 + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet, (str)): + * handleSet = self.checkForHandle(handlePVSet) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVSet); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7123, __pyx_L1_error) + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":7122 + * + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): # <<<<<<<<<<<<<< + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7124 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): # <<<<<<<<<<<<<< + * handleSet = self.checkForHandle(handlePVSet) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVSet); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7125 + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + * handleSet = self.checkForHandle(handlePVSet) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVSet))||((__pyx_v_handlePVSet) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVSet)->tp_name), 0))) __PYX_ERR(3, 7125, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVSet), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":7124 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): # <<<<<<<<<<<<<< + * handleSet = self.checkForHandle(handlePVSet) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7127 + * handleSet = self.checkForHandle(handlePVSet) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("First input argument, should be of type if handle," + + */ + /*else*/ { + + /* "PyCafe.pyx":7128 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("First input argument, should be of type if handle," + + * "else if PV")) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7128, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7128, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_6) < 0) __PYX_ERR(3, 7128, __pyx_L1_error) + + /* "PyCafe.pyx":7127 + * handleSet = self.checkForHandle(handlePVSet) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7131 + * _error_info=("First input argument, should be of type if handle," + + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef unsigned int handleMatch = 0 + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7131, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7133 + * raise _cafeException + * + * cdef unsigned int handleMatch = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":7134 + * + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVMatch); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVMatch); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7135 + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVMatch); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7135, __pyx_L1_error) + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7134 + * + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7136 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7137 + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVMatch))||((__pyx_v_handlePVMatch) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVMatch)->tp_name), 0))) __PYX_ERR(3, 7137, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7136 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7139 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("Third input argument, should be of type if handle," + + */ + /*else*/ { + + /* "PyCafe.pyx":7140 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("Third input argument, should be of type if handle," + + * "else if PV")) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7140, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7140, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_kp_u_Third_input_argument_should_be_o_2) < 0) __PYX_ERR(3, 7140, __pyx_L1_error) + + /* "PyCafe.pyx":7139 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("Third input argument, should be of type if handle," + + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7143 + * _error_info=("Third input argument, should be of type if handle," + + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7143, __pyx_L1_error) + } + __pyx_L6:; + + /* "PyCafe.pyx":7147 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatch( + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7148 + * + * with nogil: + * status = self._c_cafe.setAndMatch( # <<<<<<<<<<<<<< + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setAndMatch(__pyx_v_handleSet, __pyx_v_valSet, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7147 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatch( + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":7151 + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7152 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7153 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7152 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7155 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7154 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + * + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(3, 7154, __pyx_L1_error) + + /* "PyCafe.pyx":7151 + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7157 + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7115 + * ############################################################################ + * + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, # <<<<<<<<<<<<<< + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7162 + * ################################################################################## + * + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_409matchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_409matchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("matchMany (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 1); __PYX_ERR(3, 7162, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 2); __PYX_ERR(3, 7162, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 3); __PYX_ERR(3, 7162, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 4); __PYX_ERR(3, 7162, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matchMany") < 0)) __PYX_ERR(3, 7162, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_valSet = ((PyObject*)values[0]); + __pyx_v_handlePVMatch = ((PyObject*)values[1]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7162, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7162, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7162, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7162, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.matchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(3, 7162, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(3, 7162, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_408matchMany(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_408matchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + double __pyx_t_10; + __Pyx_RefNannySetupContext("matchMany", 0); + + /* "PyCafe.pyx":7164 + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_matchMany_list_valSet_list_handl); + __pyx_v__METHOD = __pyx_kp_u_matchMany_list_valSet_list_handl; + + /* "PyCafe.pyx":7167 + * + * + * 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!") + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7167, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7167, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7167, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7167, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7168 + * + * 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!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(3, 7168, __pyx_L1_error) + + /* "PyCafe.pyx":7167 + * + * + * 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!") + */ + } + + /* "PyCafe.pyx":7172 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7172, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7172, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7175 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7175, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7175, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7177 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7177, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7177, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7178 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7178, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7179 + * 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)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7179, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7179, __pyx_L1_error) + } + + /* "PyCafe.pyx":7178 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7180 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7180, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7181 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVMatch))||((__pyx_v_handlePVMatch) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVMatch)->tp_name), 0))) __PYX_ERR(3, 7181, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7181, __pyx_L1_error) + } + + /* "PyCafe.pyx":7180 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7183 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7183, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7183, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o) < 0) __PYX_ERR(3, 7183, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":7185 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7185, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":7187 + * raise _cafeException + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7187, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7187, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7188 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7188, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7188, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7192 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchMany( + * valSetV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7193 + * + * with nogil: + * status = self._c_cafe.matchMany( # <<<<<<<<<<<<<< + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->matchMany(__pyx_v_valSetV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7192 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchMany( + * valSetV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":7196 + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7197 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7198 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7197 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7200 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":7199 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + * + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(3, 7199, __pyx_L1_error) + + /* "PyCafe.pyx":7196 + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7202 + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7162 + * ################################################################################## + * + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.matchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7207 + * ############################################################################ + * + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_411match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_411match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_valSet; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("match (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 1); __PYX_ERR(3, 7207, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 2); __PYX_ERR(3, 7207, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 3); __PYX_ERR(3, 7207, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 4); __PYX_ERR(3, 7207, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "match") < 0)) __PYX_ERR(3, 7207, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_valSet = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_valSet == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7207, __pyx_L3_error) + __pyx_v_handlePVMatch = values[1]; + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7207, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(3, 7207, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7207, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7207, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.match", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_410match(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_410match(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handleMatch; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("match", 0); + + /* "PyCafe.pyx":7209 + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") # <<<<<<<<<<<<<< + * + * cdef unsigned int handleMatch = 0 + */ + __Pyx_INCREF(__pyx_kp_u_match_double_valSet_handlePVMatc); + __pyx_v__METHOD = __pyx_kp_u_match_double_valSet_handlePVMatc; + + /* "PyCafe.pyx":7211 + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + * + * cdef unsigned int handleMatch = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePVMatch, (int, long)): + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":7213 + * cdef unsigned int handleMatch = 0 + * + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVMatch); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVMatch); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7214 + * + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVMatch); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7214, __pyx_L1_error) + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7213 + * cdef unsigned int handleMatch = 0 + * + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7215 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7216 + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePVMatch))||((__pyx_v_handlePVMatch) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePVMatch)->tp_name), 0))) __PYX_ERR(3, 7216, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7215 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7218 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7219 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7218 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7218, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7223 + * "if handle, else if PV"))) + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7226 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.match( + * valSet, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7227 + * + * with nogil: + * status = self._c_cafe.match( # <<<<<<<<<<<<<< + * valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->match(__pyx_v_valSet, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7226 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.match( + * valSet, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":7230 + * valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7231 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7232 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7231 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7234 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7233 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + * + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7233, __pyx_L1_error) + + /* "PyCafe.pyx":7230 + * valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7236 + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * + * return 1 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7238 + * return status + * + * return 1 # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_1); + __pyx_r = __pyx_int_1; + goto __pyx_L0; + + /* "PyCafe.pyx":7207 + * ############################################################################ + * + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.match", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7243 + * ############################################################################ + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_413setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_413setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemCtrl (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_nelem_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemCtrl", 1, 2, 2, 1); __PYX_ERR(3, 7243, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemCtrl") < 0)) __PYX_ERR(3, 7243, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_nelem = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_nelem == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7243, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelemCtrl", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7243, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_412setNelemCtrl(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_nelem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_412setNelemCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemCtrl", 0); + + /* "PyCafe.pyx":7244 + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i); + __pyx_v__METHOD = __pyx_kp_u_setNelemCtrl_handlePV_unsigned_i; + + /* "PyCafe.pyx":7246 + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7247 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7248 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7248, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7247 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7249 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7250 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7250, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7249 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7252 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7253 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7252 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7252, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7257 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7258 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7259 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7258 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":7261 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7261, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7261, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 7261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7262 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 7261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7263 + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 7261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7260 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7264 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # returns nelem + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7264, __pyx_L1_error) + + /* "PyCafe.pyx":7257 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7267 + * + * # returns nelem + * return self.hh.setNelemCtrl(handle, nelem) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelemCtrl(__pyx_v_handle, __pyx_v_nelem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7243 + * ############################################################################ + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7271 + * ################################################################################## + * + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelem" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_415setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_415setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelem (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_nelem_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelem", 1, 2, 2, 1); __PYX_ERR(3, 7271, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelem") < 0)) __PYX_ERR(3, 7271, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_nelem = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_nelem == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7271, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelem", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7271, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_414setNelem(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_nelem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_414setNelem(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelem", 0); + + /* "PyCafe.pyx":7272 + * + * def setNelem(self, handlePV, unsigned int nelem): + * cdef str _METHOD = "setNelem" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelem); + __pyx_v__METHOD = __pyx_n_u_setNelem; + + /* "PyCafe.pyx":7274 + * cdef str _METHOD = "setNelem" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7275 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7276 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7276, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7275 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7277 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7278 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7278, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7277 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7280 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7281 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7280 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7280, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7285 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7286 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7287 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7286 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":7289 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7289, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7289, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 7289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7290 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 7289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7291 + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 7289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7288 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7292 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7292, __pyx_L1_error) + + /* "PyCafe.pyx":7285 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7296 + * + * # returns nelem + * return self.hh.setNelem(handle, nelem) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelem(__pyx_v_handle, __pyx_v_nelem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7271 + * ################################################################################## + * + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelem" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7299 + * + * ############################################################################ + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToNative" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_417setNelemToNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_417setNelemToNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToNative (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_416setNelemToNative(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_416setNelemToNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToNative", 0); + + /* "PyCafe.pyx":7300 + * ############################################################################ + * def setNelemToNative(self, handlePV): + * cdef str _METHOD = "setNelemToNative" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelemToNative); + __pyx_v__METHOD = __pyx_n_u_setNelemToNative; + + /* "PyCafe.pyx":7302 + * cdef str _METHOD = "setNelemToNative" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7303 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7304 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7304, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7303 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7305 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7306 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7306, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7305 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7308 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7309 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7308 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7308, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7313 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7314 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7315 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7314 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":7317 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(3, 7317, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(3, 7317, __pyx_L1_error) + + /* "PyCafe.pyx":7318 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(3, 7317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7319 + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(3, 7317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7320 + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(3, 7317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7316 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7321 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # returns nelem + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(3, 7321, __pyx_L1_error) + + /* "PyCafe.pyx":7313 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7324 + * + * # returns nelem + * return self.hh.setNelemToNative(handle) # <<<<<<<<<<<<<< + * + * ############################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelemToNative(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7299 + * + * ############################################################################ + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToNative" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToNative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7328 + * ############################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_419setNelemToRetrieveFromCacheToOne(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_419setNelemToRetrieveFromCacheToOne(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCacheToOne (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_418setNelemToRetrieveFromCacheToOne(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_418setNelemToRetrieveFromCacheToOne(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCacheToOne", 0); + + /* "PyCafe.pyx":7329 + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelemToRetrieveFromCacheToOne); + __pyx_v__METHOD = __pyx_n_u_setNelemToRetrieveFromCacheToOne; + + /* "PyCafe.pyx":7331 + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7332 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7333 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7333, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7332 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7334 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7335 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7335, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7334 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7337 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7338 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7337 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7337, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7342 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7343 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7344 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7343 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7345 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7345, __pyx_L1_error) + + /* "PyCafe.pyx":7342 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7349 + * + * # returns previous nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToOne(handle) # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToOne(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7328 + * ############################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCacheToOne", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7352 + * + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): # <<<<<<<<<<<<<< + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_421setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_421setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + int __pyx_v_netrfc; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_netrfc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_netrfc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, 1); __PYX_ERR(3, 7352, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemToRetrieveFromCache") < 0)) __PYX_ERR(3, 7352, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_netrfc = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_netrfc == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7352, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7352, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_420setNelemToRetrieveFromCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_netrfc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_420setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_netrfc) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCache", 0); + + /* "PyCafe.pyx":7353 + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): + * cdef str _METHOD="etNelemToRetrieveFromCache" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_etNelemToRetrieveFromCache); + __pyx_v__METHOD = __pyx_n_u_etNelemToRetrieveFromCache; + + /* "PyCafe.pyx":7354 + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7355 + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7356 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7356, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7355 + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7357 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7358 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7358, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7358, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7357 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7360 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7361 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7360 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7360, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7365 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7366 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7367 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7366 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7368 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7368, __pyx_L1_error) + + /* "PyCafe.pyx":7365 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7372 + * + * # returns new nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToPrevious(handle, netrfc) # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToPrevious(__pyx_v_handle, __pyx_v_netrfc)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7352 + * + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): # <<<<<<<<<<<<<< + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7376 + * ################################################################################ + * + * def terminate(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.terminate() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_423terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_423terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("terminate (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_422terminate(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_422terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("terminate", 0); + + /* "PyCafe.pyx":7377 + * + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7378 + * def terminate(self): + * with nogil: + * self._c_cafe.terminate() # <<<<<<<<<<<<<< + * return + * ################################################################################ + */ + (void)(__pyx_v_self->_c_cafe->terminate()); + } + + /* "PyCafe.pyx":7377 + * + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7379 + * with nogil: + * self._c_cafe.terminate() + * return # <<<<<<<<<<<<<< + * ################################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":7376 + * ################################################################################ + * + * def terminate(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.terminate() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7386 + * ################################################################################ + * + * def prepareSFdbpm(self): # <<<<<<<<<<<<<< + * cdef: + * vector[string] bpmList + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_425prepareSFdbpm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_425prepareSFdbpm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("prepareSFdbpm (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_424prepareSFdbpm(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_424prepareSFdbpm(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_bpmList; + std::vector __pyx_v_bpmHandles; + std::vector __pyx_v_bpmDev; + std::vector __pyx_v_bpmPos; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + DBPMKeeper __pyx_t_2; + __Pyx_RefNannySetupContext("prepareSFdbpm", 0); + + /* "PyCafe.pyx":7393 + * vector[float] bpmPos + * + * self._c_cafe.prepareDBPM(bpmList, bpmHandles, bpmDev, bpmPos) # <<<<<<<<<<<<<< + * + * # for i in range(0, self.bpmDev.size()): + */ + (void)(__pyx_v_self->_c_cafe->prepareDBPM(__pyx_v_bpmList, __pyx_v_bpmHandles, __pyx_v_bpmDev, __pyx_v_bpmPos)); + + /* "PyCafe.pyx":7398 + * #print (bpmPos[i], bpmDev[i] ) + * + * if not self.dbpmInitialized: # <<<<<<<<<<<<<< + * self.dbpm = DBPMKeeper( + * bpmList, bpmHandles, bpmDev, bpmPos) + */ + __pyx_t_1 = ((!(__pyx_v_self->dbpmInitialized != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7399 + * + * if not self.dbpmInitialized: + * self.dbpm = DBPMKeeper( # <<<<<<<<<<<<<< + * bpmList, bpmHandles, bpmDev, bpmPos) + * self.dbpmInitialized = True + */ + try { + __pyx_t_2 = DBPMKeeper(__pyx_v_bpmList, __pyx_v_bpmHandles, __pyx_v_bpmDev, __pyx_v_bpmPos); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7399, __pyx_L1_error) + } + __pyx_v_self->dbpm = __pyx_t_2; + + /* "PyCafe.pyx":7401 + * self.dbpm = DBPMKeeper( + * bpmList, bpmHandles, bpmDev, bpmPos) + * self.dbpmInitialized = True # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->dbpmInitialized = 1; + + /* "PyCafe.pyx":7398 + * #print (bpmPos[i], bpmDev[i] ) + * + * if not self.dbpmInitialized: # <<<<<<<<<<<<<< + * self.dbpm = DBPMKeeper( + * bpmList, bpmHandles, bpmDev, bpmPos) + */ + } + + /* "PyCafe.pyx":7402 + * bpmList, bpmHandles, bpmDev, bpmPos) + * self.dbpmInitialized = True + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":7386 + * ################################################################################ + * + * def prepareSFdbpm(self): # <<<<<<<<<<<<<< + * cdef: + * vector[string] bpmList + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.prepareSFdbpm", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7408 + * ################################################################################## + * + * def setSFdbpmBS(self, bint bsFlag=True): # <<<<<<<<<<<<<< + * return self.dbpm.setBS(bsFlag) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_427setSFdbpmBS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_427setSFdbpmBS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_bsFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSFdbpmBS (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bsFlag,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bsFlag); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSFdbpmBS") < 0)) __PYX_ERR(3, 7408, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_bsFlag = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_bsFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7408, __pyx_L3_error) + } else { + __pyx_v_bsFlag = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setSFdbpmBS", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7408, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSFdbpmBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_426setSFdbpmBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_bsFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_426setSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_bsFlag) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSFdbpmBS", 0); + + /* "PyCafe.pyx":7409 + * + * def setSFdbpmBS(self, bint bsFlag=True): + * return self.dbpm.setBS(bsFlag) # <<<<<<<<<<<<<< + * + * def resetSFdbpmBS(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dbpm.setBS(__pyx_v_bsFlag)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7408 + * ################################################################################## + * + * def setSFdbpmBS(self, bint bsFlag=True): # <<<<<<<<<<<<<< + * return self.dbpm.setBS(bsFlag) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSFdbpmBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7411 + * return self.dbpm.setBS(bsFlag) + * + * def resetSFdbpmBS(self): # <<<<<<<<<<<<<< + * return self.dbpm.resetBS() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_429resetSFdbpmBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_429resetSFdbpmBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("resetSFdbpmBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_428resetSFdbpmBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_428resetSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("resetSFdbpmBS", 0); + + /* "PyCafe.pyx":7412 + * + * def resetSFdbpmBS(self): + * return self.dbpm.resetBS() # <<<<<<<<<<<<<< + * + * def closeSFdbpmBS(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dbpm.resetBS()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7411 + * return self.dbpm.setBS(bsFlag) + * + * def resetSFdbpmBS(self): # <<<<<<<<<<<<<< + * return self.dbpm.resetBS() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.resetSFdbpmBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7414 + * return self.dbpm.resetBS() + * + * def closeSFdbpmBS(self): # <<<<<<<<<<<<<< + * return self.dbpm.closeBS() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_431closeSFdbpmBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_431closeSFdbpmBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeSFdbpmBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_430closeSFdbpmBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_430closeSFdbpmBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("closeSFdbpmBS", 0); + + /* "PyCafe.pyx":7415 + * + * def closeSFdbpmBS(self): + * return self.dbpm.closeBS() # <<<<<<<<<<<<<< + * + * def readSFdbpmOffsets(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->dbpm.closeBS()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7414 + * return self.dbpm.resetBS() + * + * def closeSFdbpmBS(self): # <<<<<<<<<<<<<< + * return self.dbpm.closeBS() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.closeSFdbpmBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7417 + * return self.dbpm.closeBS() + * + * def readSFdbpmOffsets(self): # <<<<<<<<<<<<<< + * return self._c_cafe.readDBPMOffsets(self.dbpm) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_433readSFdbpmOffsets(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_433readSFdbpmOffsets(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("readSFdbpmOffsets (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_432readSFdbpmOffsets(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_432readSFdbpmOffsets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("readSFdbpmOffsets", 0); + + /* "PyCafe.pyx":7418 + * + * def readSFdbpmOffsets(self): + * return self._c_cafe.readDBPMOffsets(self.dbpm) # <<<<<<<<<<<<<< + * + * def getSFdbpm(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->readDBPMOffsets(__pyx_v_self->dbpm)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7417 + * return self.dbpm.closeBS() + * + * def readSFdbpmOffsets(self): # <<<<<<<<<<<<<< + * return self._c_cafe.readDBPMOffsets(self.dbpm) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.readSFdbpmOffsets", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7420 + * return self._c_cafe.readDBPMOffsets(self.dbpm) + * + * def getSFdbpm(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getSFdbpm" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_435getSFdbpm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_435getSFdbpm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSFdbpm (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_434getSFdbpm(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_434getSFdbpm(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + std::vector __pyx_v_handleV; + long __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + long __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getSFdbpm", 0); + + /* "PyCafe.pyx":7422 + * def getSFdbpm(self): + * + * cdef str _METHOD = "getSFdbpm" # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_INCREF(__pyx_n_u_getSFdbpm); + __pyx_v__METHOD = __pyx_n_u_getSFdbpm; + + /* "PyCafe.pyx":7426 + * cdef int status + * cdef vector[unsigned int] handleV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDBPM(self.dbpm) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7427 + * cdef vector[unsigned int] handleV + * with nogil: + * status = self._c_cafe.getDBPM(self.dbpm) # <<<<<<<<<<<<<< + * + * if status >= ICAFE_ERRNO_BASE: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDBPM(__pyx_v_self->dbpm); + } + + /* "PyCafe.pyx":7426 + * cdef int status + * cdef vector[unsigned int] handleV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDBPM(self.dbpm) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7429 + * status = self._c_cafe.getDBPM(self.dbpm) + * + * if status >= ICAFE_ERRNO_BASE: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: + */ + __pyx_t_1 = ((__pyx_v_status >= ICAFE_ERRNO_BASE) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7430 + * + * if status >= ICAFE_ERRNO_BASE: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * elif status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7429 + * status = self._c_cafe.getDBPM(self.dbpm) + * + * if status >= ICAFE_ERRNO_BASE: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7431 + * if status >= ICAFE_ERRNO_BASE: + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * # self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7432 + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * # self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7435 + * # self._c_cafe.printStatusMessage(status) + * + * handleV = self.dbpm.getHandle() # <<<<<<<<<<<<<< + * # for i in range(0, self.dbpm.getNDBPM()): + * # if x[i].getStatus != + */ + __pyx_v_handleV = __pyx_v_self->dbpm.getHandle(); + + /* "PyCafe.pyx":7439 + * # if x[i].getStatus != + * #print (self.bpmPos[i], self.bpmDev[i] ) + * for i in range(0, self.dbpm.getNPV()): # <<<<<<<<<<<<<< + * if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL): + * self._c_cafe.printStatus(handleV[i], status) + */ + __pyx_t_2 = __pyx_v_self->dbpm.getNPV(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":7440 + * #print (self.bpmPos[i], self.bpmDev[i] ) + * for i in range(0, self.dbpm.getNPV()): + * if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handleV[i], status) + * + */ + __pyx_t_1 = (((__pyx_v_self->dbpm.pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7441 + * for i in range(0, self.dbpm.getNPV()): + * if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL): + * self._c_cafe.printStatus(handleV[i], status) # <<<<<<<<<<<<<< + * + * return dbpmHolderToStruct(self.dbpm) + */ + __pyx_v_self->_c_cafe->printStatus((__pyx_v_handleV[__pyx_v_i]), __pyx_v_status); + + /* "PyCafe.pyx":7440 + * #print (self.bpmPos[i], self.bpmDev[i] ) + * for i in range(0, self.dbpm.getNPV()): + * if (self.dbpm.pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handleV[i], status) + * + */ + } + } + + /* "PyCafe.pyx":7432 + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * # self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":7431 + * if status >= ICAFE_ERRNO_BASE: + * self._c_cafe.printStatusMessage(status) + * elif status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * # self._c_cafe.printStatusMessage(status) + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":7443 + * self._c_cafe.printStatus(handleV[i], status) + * + * return dbpmHolderToStruct(self.dbpm) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_dbpmHolderToStruct(__pyx_v_self->dbpm)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7420 + * return self._c_cafe.readDBPMOffsets(self.dbpm) + * + * def getSFdbpm(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getSFdbpm" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getSFdbpm", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7450 + * + * + * def getSFdbpmOffs_x(self): # <<<<<<<<<<<<<< + * return self.dbpm.getOffsetX() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_437getSFdbpmOffs_x(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_437getSFdbpmOffs_x(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSFdbpmOffs_x (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_436getSFdbpmOffs_x(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_436getSFdbpmOffs_x(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getSFdbpmOffs_x", 0); + + /* "PyCafe.pyx":7451 + * + * def getSFdbpmOffs_x(self): + * return self.dbpm.getOffsetX() # <<<<<<<<<<<<<< + * + * def getSFdbpmOffs_y(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_double(__pyx_v_self->dbpm.getOffsetX()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7450 + * + * + * def getSFdbpmOffs_x(self): # <<<<<<<<<<<<<< + * return self.dbpm.getOffsetX() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getSFdbpmOffs_x", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7453 + * return self.dbpm.getOffsetX() + * + * def getSFdbpmOffs_y(self): # <<<<<<<<<<<<<< + * return self.dbpm.getOffsetY() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_439getSFdbpmOffs_y(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_439getSFdbpmOffs_y(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSFdbpmOffs_y (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_438getSFdbpmOffs_y(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_438getSFdbpmOffs_y(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getSFdbpmOffs_y", 0); + + /* "PyCafe.pyx":7454 + * + * def getSFdbpmOffs_y(self): + * return self.dbpm.getOffsetY() # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_double(__pyx_v_self->dbpm.getOffsetY()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7453 + * return self.dbpm.getOffsetX() + * + * def getSFdbpmOffs_y(self): # <<<<<<<<<<<<<< + * return self.dbpm.getOffsetY() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getSFdbpmOffs_y", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7458 + * ################################################################################ + * + * def setBS(self, list pv=None, modulo=None, offset=None, int timeoutMS=0): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setBS" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_441setBS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_441setBS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_modulo = 0; + PyObject *__pyx_v_offset = 0; + int __pyx_v_timeoutMS; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setBS (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,&__pyx_n_s_modulo,&__pyx_n_s_offset,&__pyx_n_s_timeoutMS,0}; + PyObject* values[4] = {0,0,0,0}; + values[0] = ((PyObject*)Py_None); + values[1] = ((PyObject *)Py_None); + values[2] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_modulo); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeoutMS); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBS") < 0)) __PYX_ERR(3, 7458, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = ((PyObject*)values[0]); + __pyx_v_modulo = values[1]; + __pyx_v_offset = values[2]; + if (values[3]) { + __pyx_v_timeoutMS = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_timeoutMS == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7458, __pyx_L3_error) + } else { + __pyx_v_timeoutMS = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setBS", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7458, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyList_Type), 1, "pv", 1))) __PYX_ERR(3, 7458, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_440setBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_modulo, __pyx_v_offset, __pyx_v_timeoutMS); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_440setBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_modulo, PyObject *__pyx_v_offset, int __pyx_v_timeoutMS) { + PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + unsigned int __pyx_v_i; + CYTHON_UNUSED int __pyx_v_pFlag; + std::vector __pyx_v_v; + PyObject *__pyx_v_eachKey = NULL; + unsigned int __pyx_8genexpr1__pyx_v_i; + unsigned int __pyx_8genexpr2__pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + std::string __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + __Pyx_RefNannySetupContext("setBS", 0); + __Pyx_INCREF(__pyx_v_modulo); + __Pyx_INCREF(__pyx_v_offset); + + /* "PyCafe.pyx":7460 + * def setBS(self, list pv=None, modulo=None, offset=None, int timeoutMS=0): + * + * cdef str _METHOD = "setBS" # <<<<<<<<<<<<<< + * cdef int status = ICAFE_NORMAL + * cdef unsigned int i + */ + __Pyx_INCREF(__pyx_n_u_setBS); + __pyx_v__METHOD = __pyx_n_u_setBS; + + /* "PyCafe.pyx":7461 + * + * cdef str _METHOD = "setBS" + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef unsigned int i + * cdef bint pFlag = False + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7463 + * cdef int status = ICAFE_NORMAL + * cdef unsigned int i + * cdef bint pFlag = False # <<<<<<<<<<<<<< + * + * if isinstance(modulo, numbers.Number): + */ + __pyx_v_pFlag = 0; + + /* "PyCafe.pyx":7465 + * cdef bint pFlag = False + * + * if isinstance(modulo, numbers.Number): # <<<<<<<<<<<<<< + * if int(modulo) <= 0: + * raise ValueError("{} {} \n{}".format( + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_modulo, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 7465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7466 + * + * if isinstance(modulo, numbers.Number): + * if int(modulo) <= 0: # <<<<<<<<<<<<<< + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_modulo); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 7466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_4) { + + /* "PyCafe.pyx":7467 + * if isinstance(modulo, numbers.Number): + * if int(modulo) <= 0: + * raise ValueError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "modulo input argument must be positive!")) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":7468 + * if int(modulo) <= 0: + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "modulo input argument must be positive!")) + * elif not TypeError(modulo, dict): + */ + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_modulo_input_argument_must_be_po}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_modulo_input_argument_must_be_po}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_modulo_input_argument_must_be_po); + __Pyx_GIVEREF(__pyx_kp_u_modulo_input_argument_must_be_po); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_modulo_input_argument_must_be_po); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7467 + * if isinstance(modulo, numbers.Number): + * if int(modulo) <= 0: + * raise ValueError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "modulo input argument must be positive!")) + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(3, 7467, __pyx_L1_error) + + /* "PyCafe.pyx":7466 + * + * if isinstance(modulo, numbers.Number): + * if int(modulo) <= 0: # <<<<<<<<<<<<<< + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + + /* "PyCafe.pyx":7465 + * cdef bint pFlag = False + * + * if isinstance(modulo, numbers.Number): # <<<<<<<<<<<<<< + * if int(modulo) <= 0: + * raise ValueError("{} {} \n{}".format( + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7470 + * self._exception_text, _METHOD, + * "modulo input argument must be positive!")) + * elif not TypeError(modulo, dict): # <<<<<<<<<<<<<< + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_modulo); + __Pyx_GIVEREF(__pyx_v_modulo); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_modulo); + __Pyx_INCREF(((PyObject *)(&PyDict_Type))); + __Pyx_GIVEREF(((PyObject *)(&PyDict_Type))); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)(&PyDict_Type))); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 7470, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!__pyx_t_4) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7471 + * "modulo input argument must be positive!")) + * elif not TypeError(modulo, dict): + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("modulo input arg, should be of type , " + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":7472 + * elif not TypeError(modulo, dict): + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("modulo input arg, should be of type , " + * "else {pv_name : modulo}"))) + */ + __pyx_t_7 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_modulo_input_arg_should_be_of_ty}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_modulo_input_arg_should_be_of_ty}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_modulo_input_arg_should_be_of_ty); + __Pyx_GIVEREF(__pyx_kp_u_modulo_input_arg_should_be_of_ty); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_kp_u_modulo_input_arg_should_be_of_ty); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7471 + * "modulo input argument must be positive!")) + * elif not TypeError(modulo, dict): + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("modulo input arg, should be of type , " + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(3, 7471, __pyx_L1_error) + + /* "PyCafe.pyx":7470 + * self._exception_text, _METHOD, + * "modulo input argument must be positive!")) + * elif not TypeError(modulo, dict): # <<<<<<<<<<<<<< + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":7476 + * "else {pv_name : modulo}"))) + * + * if isinstance(offset, (numbers.Number)): # <<<<<<<<<<<<<< + * if int(offset) < 0: + * raise ValueError("{} {} \n{}".format( + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_offset, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 7476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7477 + * + * if isinstance(offset, (numbers.Number)): + * if int(offset) < 0: # <<<<<<<<<<<<<< + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 7477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + + /* "PyCafe.pyx":7478 + * if isinstance(offset, (numbers.Number)): + * if int(offset) < 0: + * raise ValueError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "offset input argument cannot be negative!")) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":7479 + * if int(offset) < 0: + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "offset input argument cannot be negative!")) + * elif not isinstance(offset, (dict)): + */ + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_offset_input_argument_cannot_be}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_offset_input_argument_cannot_be}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_offset_input_argument_cannot_be); + __Pyx_GIVEREF(__pyx_kp_u_offset_input_argument_cannot_be); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_offset_input_argument_cannot_be); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":7478 + * if isinstance(offset, (numbers.Number)): + * if int(offset) < 0: + * raise ValueError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "offset input argument cannot be negative!")) + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(3, 7478, __pyx_L1_error) + + /* "PyCafe.pyx":7477 + * + * if isinstance(offset, (numbers.Number)): + * if int(offset) < 0: # <<<<<<<<<<<<<< + * raise ValueError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + + /* "PyCafe.pyx":7476 + * "else {pv_name : modulo}"))) + * + * if isinstance(offset, (numbers.Number)): # <<<<<<<<<<<<<< + * if int(offset) < 0: + * raise ValueError("{} {} \n{}".format( + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":7481 + * self._exception_text, _METHOD, + * "offset input argument cannot be negative!")) + * elif not isinstance(offset, (dict)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = PyDict_Check(__pyx_v_offset); + __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7482 + * "offset input argument cannot be negative!")) + * elif not isinstance(offset, (dict)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("offset input arg, should be of type , " + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":7483 + * elif not isinstance(offset, (dict)): + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("offset input arg, should be of type , " + * "else {pv_name : offset} "))) + */ + __pyx_t_7 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_offset_input_arg_should_be_of_ty}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_offset_input_arg_should_be_of_ty}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_offset_input_arg_should_be_of_ty); + __Pyx_GIVEREF(__pyx_kp_u_offset_input_arg_should_be_of_ty); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_kp_u_offset_input_arg_should_be_of_ty); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7482 + * "offset input argument cannot be negative!")) + * elif not isinstance(offset, (dict)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("offset input arg, should be of type , " + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(3, 7482, __pyx_L1_error) + + /* "PyCafe.pyx":7481 + * self._exception_text, _METHOD, + * "offset input argument cannot be negative!")) + * elif not isinstance(offset, (dict)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L5:; + + /* "PyCafe.pyx":7487 + * "else {pv_name : offset} "))) + * + * if self.BSInitialized == True: # <<<<<<<<<<<<<< + * print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") + * return status + */ + __pyx_t_3 = ((__pyx_v_self->BSInitialized == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7488 + * + * if self.BSInitialized == True: + * print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7489 + * if self.BSInitialized == True: + * print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") + * return status # <<<<<<<<<<<<<< + * + * cdef vector[string] v + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7487 + * "else {pv_name : offset} "))) + * + * if self.BSInitialized == True: # <<<<<<<<<<<<<< + * print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") + * return status + */ + } + + /* "PyCafe.pyx":7493 + * cdef vector[string] v + * + * if timeoutMS > 0: # <<<<<<<<<<<<<< + * self.bsd.setTimeout(timeoutMS) + * + */ + __pyx_t_3 = ((__pyx_v_timeoutMS > 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7494 + * + * if timeoutMS > 0: + * self.bsd.setTimeout(timeoutMS) # <<<<<<<<<<<<<< + * + * if pv is not None: + */ + __pyx_v_self->bsd.setTimeout(__pyx_v_timeoutMS); + + /* "PyCafe.pyx":7493 + * cdef vector[string] v + * + * if timeoutMS > 0: # <<<<<<<<<<<<<< + * self.bsd.setTimeout(timeoutMS) + * + */ + } + + /* "PyCafe.pyx":7496 + * self.bsd.setTimeout(timeoutMS) + * + * if pv is not None: # <<<<<<<<<<<<<< + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + */ + __pyx_t_3 = (__pyx_v_pv != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7498 + * if pv is not None: + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): # <<<<<<<<<<<<<< + * v.push_back(pv[i]) + * self.bsd.init(v) + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7498, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_pv); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7498, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":7499 + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + * v.push_back(pv[i]) # <<<<<<<<<<<<<< + * self.bsd.init(v) + * + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7499, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pv, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7499, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7499, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7500 + * for i in range(0, len(pv)): + * v.push_back(pv[i]) + * self.bsd.init(v) # <<<<<<<<<<<<<< + * + * if isinstance(modulo, (numbers.Number)): + */ + __pyx_v_self->bsd.init(__pyx_v_v); + + /* "PyCafe.pyx":7502 + * self.bsd.init(v) + * + * if isinstance(modulo, (numbers.Number)): # <<<<<<<<<<<<<< + * modulo = dict([(pv[i], int(modulo)) + * for i in range(0, len(pv))]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = PyObject_IsInstance(__pyx_v_modulo, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 7502, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7503 + * + * if isinstance(modulo, (numbers.Number)): + * modulo = dict([(pv[i], int(modulo)) # <<<<<<<<<<<<<< + * for i in range(0, len(pv))]) + * + */ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":7504 + * if isinstance(modulo, (numbers.Number)): + * modulo = dict([(pv[i], int(modulo)) + * for i in range(0, len(pv))]) # <<<<<<<<<<<<<< + * + * if isinstance(offset, (numbers.Number)): + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7504, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_pv); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7504, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_8genexpr1__pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":7503 + * + * if isinstance(modulo, (numbers.Number)): + * modulo = dict([(pv[i], int(modulo)) # <<<<<<<<<<<<<< + * for i in range(0, len(pv))]) + * + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7503, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pv, __pyx_8genexpr1__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_modulo); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_2 = 0; + __pyx_t_5 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + } /* exit inner scope */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_modulo, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":7502 + * self.bsd.init(v) + * + * if isinstance(modulo, (numbers.Number)): # <<<<<<<<<<<<<< + * modulo = dict([(pv[i], int(modulo)) + * for i in range(0, len(pv))]) + */ + } + + /* "PyCafe.pyx":7506 + * for i in range(0, len(pv))]) + * + * if isinstance(offset, (numbers.Number)): # <<<<<<<<<<<<<< + * offset = dict([(pv[i], int(offset)) + * for i in range(0, len(pv))]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_offset, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 7506, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7507 + * + * if isinstance(offset, (numbers.Number)): + * offset = dict([(pv[i], int(offset)) # <<<<<<<<<<<<<< + * for i in range(0, len(pv))]) + * + */ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":7508 + * if isinstance(offset, (numbers.Number)): + * offset = dict([(pv[i], int(offset)) + * for i in range(0, len(pv))]) # <<<<<<<<<<<<<< + * + * if modulo is not None: + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7508, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_pv); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7508, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_8genexpr2__pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":7507 + * + * if isinstance(offset, (numbers.Number)): + * offset = dict([(pv[i], int(offset)) # <<<<<<<<<<<<<< + * for i in range(0, len(pv))]) + * + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7507, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_pv, __pyx_8genexpr2__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_7 = 0; + __pyx_t_5 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + } /* exit inner scope */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":7506 + * for i in range(0, len(pv))]) + * + * if isinstance(offset, (numbers.Number)): # <<<<<<<<<<<<<< + * offset = dict([(pv[i], int(offset)) + * for i in range(0, len(pv))]) + */ + } + + /* "PyCafe.pyx":7496 + * self.bsd.setTimeout(timeoutMS) + * + * if pv is not None: # <<<<<<<<<<<<<< + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + */ + } + + /* "PyCafe.pyx":7510 + * for i in range(0, len(pv))]) + * + * if modulo is not None: # <<<<<<<<<<<<<< + * for eachKey in modulo: + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + */ + __pyx_t_4 = (__pyx_v_modulo != Py_None); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7511 + * + * if modulo is not None: + * for eachKey in modulo: # <<<<<<<<<<<<<< + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: + */ + if (likely(PyList_CheckExact(__pyx_v_modulo)) || PyTuple_CheckExact(__pyx_v_modulo)) { + __pyx_t_2 = __pyx_v_modulo; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_modulo); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 7511, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7511, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7511, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_12(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 7511, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_eachKey, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":7512 + * if modulo is not None: + * for eachKey in modulo: + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) # <<<<<<<<<<<<<< + * if offset is not None: + * for eachKey in offset: + */ + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_v_eachKey); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7512, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_modulo, __pyx_v_eachKey); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7512, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->bsd.setBSModulo(__pyx_t_11, __pyx_t_6); + + /* "PyCafe.pyx":7511 + * + * if modulo is not None: + * for eachKey in modulo: # <<<<<<<<<<<<<< + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7510 + * for i in range(0, len(pv))]) + * + * if modulo is not None: # <<<<<<<<<<<<<< + * for eachKey in modulo: + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + */ + } + + /* "PyCafe.pyx":7513 + * for eachKey in modulo: + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: # <<<<<<<<<<<<<< + * for eachKey in offset: + * self.bsd.setBSOffset(eachKey, offset[eachKey]) + */ + __pyx_t_3 = (__pyx_v_offset != Py_None); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7514 + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: + * for eachKey in offset: # <<<<<<<<<<<<<< + * self.bsd.setBSOffset(eachKey, offset[eachKey]) + * + */ + if (likely(PyList_CheckExact(__pyx_v_offset)) || PyTuple_CheckExact(__pyx_v_offset)) { + __pyx_t_2 = __pyx_v_offset; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 7514, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_12)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7514, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7514, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_12(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 7514, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_eachKey, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":7515 + * if offset is not None: + * for eachKey in offset: + * self.bsd.setBSOffset(eachKey, offset[eachKey]) # <<<<<<<<<<<<<< + * + * # self.initBSwithCA() + */ + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_v_eachKey); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7515, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_offset, __pyx_v_eachKey); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7515, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->bsd.setBSOffset(__pyx_t_11, __pyx_t_6); + + /* "PyCafe.pyx":7514 + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: + * for eachKey in offset: # <<<<<<<<<<<<<< + * self.bsd.setBSOffset(eachKey, offset[eachKey]) + * + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7513 + * for eachKey in modulo: + * self.bsd.setBSModulo(eachKey, modulo[eachKey]) + * if offset is not None: # <<<<<<<<<<<<<< + * for eachKey in offset: + * self.bsd.setBSOffset(eachKey, offset[eachKey]) + */ + } + + /* "PyCafe.pyx":7518 + * + * # self.initBSwithCA() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.initBSwithCA(self.bsd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7519 + * # self.initBSwithCA() + * with nogil: + * self._c_cafe.initBSwithCA(self.bsd) # <<<<<<<<<<<<<< + * + * with nogil: + */ + (void)(__pyx_v_self->_c_cafe->initBSwithCA(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7518 + * + * # self.initBSwithCA() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.initBSwithCA(self.bsd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L26; + } + __pyx_L26:; + } + } + + /* "PyCafe.pyx":7521 + * self._c_cafe.initBSwithCA(self.bsd) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7522 + * + * with nogil: + * self._c_cafe.getBS(self.bsd) # <<<<<<<<<<<<<< + * + * with nogil: + */ + (void)(__pyx_v_self->_c_cafe->getBS(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7521 + * self._c_cafe.initBSwithCA(self.bsd) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":7524 + * self._c_cafe.getBS(self.bsd) + * + * with nogil: # <<<<<<<<<<<<<< + * # status=self._c_cafe.setBS_Step1(self.bsd) + * status = self._c_cafe.setBS(self.bsd) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7526 + * with nogil: + * # status=self._c_cafe.setBS_Step1(self.bsd) + * status = self._c_cafe.setBS(self.bsd) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setBS(__pyx_v_self->bsd); + } + + /* "PyCafe.pyx":7524 + * self._c_cafe.getBS(self.bsd) + * + * with nogil: # <<<<<<<<<<<<<< + * # status=self._c_cafe.setBS_Step1(self.bsd) + * status = self._c_cafe.setBS(self.bsd) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L32; + } + __pyx_L32:; + } + } + + /* "PyCafe.pyx":7528 + * status = self._c_cafe.setBS(self.bsd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * self.BSInitialized = True + * self.isBSinCAOnly = False + */ + __pyx_t_4 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":7529 + * + * if status == ICAFE_NORMAL: + * self.BSInitialized = True # <<<<<<<<<<<<<< + * self.isBSinCAOnly = False + * + */ + __pyx_v_self->BSInitialized = 1; + + /* "PyCafe.pyx":7530 + * if status == ICAFE_NORMAL: + * self.BSInitialized = True + * self.isBSinCAOnly = False # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_v_self->isBSinCAOnly = 0; + + /* "PyCafe.pyx":7528 + * status = self._c_cafe.setBS(self.bsd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * self.BSInitialized = True + * self.isBSinCAOnly = False + */ + } + + /* "PyCafe.pyx":7532 + * self.isBSinCAOnly = False + * + * return status # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7458 + * ################################################################################ + * + * def setBS(self, list pv=None, modulo=None, offset=None, int timeoutMS=0): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setBS" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.setBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_eachKey); + __Pyx_XDECREF(__pyx_v_modulo); + __Pyx_XDECREF(__pyx_v_offset); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7536 + * ################################################################################ + * + * def initBSwithCA(self): # <<<<<<<<<<<<<< + * + * # self.openPrepare() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_443initBSwithCA(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_443initBSwithCA(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initBSwithCA (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_442initBSwithCA(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_442initBSwithCA(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initBSwithCA", 0); + + /* "PyCafe.pyx":7539 + * + * # self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.initBSwithCA(self.bsd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7540 + * # self.openPrepare() + * with nogil: + * self._c_cafe.initBSwithCA(self.bsd) # <<<<<<<<<<<<<< + * + * # self.openNowAndWait(0.4) + */ + (void)(__pyx_v_self->_c_cafe->initBSwithCA(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7539 + * + * # self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.initBSwithCA(self.bsd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7536 + * ################################################################################ + * + * def initBSwithCA(self): # <<<<<<<<<<<<<< + * + * # self.openPrepare() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7546 + * + * ################################################################################ + * def setBS2CA(self, list pv=None): # <<<<<<<<<<<<<< + * + * cdef vector[string] v + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_445setBS2CA(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_445setBS2CA(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setBS2CA (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_3,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject*)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_3); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBS2CA") < 0)) __PYX_ERR(3, 7546, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = ((PyObject*)values[0]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setBS2CA", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7546, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setBS2CA", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyList_Type), 1, "pv", 1))) __PYX_ERR(3, 7546, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_444setBS2CA(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_444setBS2CA(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + std::string __pyx_t_7; + __Pyx_RefNannySetupContext("setBS2CA", 0); + + /* "PyCafe.pyx":7549 + * + * cdef vector[string] v + * if pv is not None: # <<<<<<<<<<<<<< + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + */ + __pyx_t_1 = (__pyx_v_pv != ((PyObject*)Py_None)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7551 + * if pv is not None: + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): # <<<<<<<<<<<<<< + * v.push_back(pv[i]) + * self.bsd.init(v) + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(3, 7551, __pyx_L1_error) + } + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_pv); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 7551, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7552 + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + * v.push_back(pv[i]) # <<<<<<<<<<<<<< + * self.bsd.init(v) + * + */ + if (unlikely(__pyx_v_pv == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(3, 7552, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(3, 7552, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7553 + * for i in range(0, len(pv)): + * v.push_back(pv[i]) + * self.bsd.init(v) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_self->bsd.init(__pyx_v_v); + + /* "PyCafe.pyx":7549 + * + * cdef vector[string] v + * if pv is not None: # <<<<<<<<<<<<<< + * # do this to avoid compiler warning messages + * for i in range(0, len(pv)): + */ + } + + /* "PyCafe.pyx":7555 + * self.bsd.init(v) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.setBS2CAGroup(self.bsd) + * self.isBSinCAOnly = True + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7556 + * + * with nogil: + * self._c_cafe.setBS2CAGroup(self.bsd) # <<<<<<<<<<<<<< + * self.isBSinCAOnly = True + * + */ + (void)(__pyx_v_self->_c_cafe->setBS2CAGroup(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7555 + * self.bsd.init(v) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.setBS2CAGroup(self.bsd) + * self.isBSinCAOnly = True + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":7557 + * with nogil: + * self._c_cafe.setBS2CAGroup(self.bsd) + * self.isBSinCAOnly = True # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->isBSinCAOnly = 1; + + /* "PyCafe.pyx":7546 + * + * ################################################################################ + * def setBS2CA(self, list pv=None): # <<<<<<<<<<<<<< + * + * cdef vector[string] v + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.setBS2CA", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7560 + * + * + * def getBSSlim(self): # <<<<<<<<<<<<<< + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_447getBSSlim(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_447getBSSlim(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getBSSlim (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_446getBSSlim(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_446getBSSlim(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v_t1 = NULL; + std::vector __pyx_v_PVDataV; + PyObject *__pyx_v_pvlist = NULL; + long __pyx_v_i; + PyObject *__pyx_v_bs_slim = NULL; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_v_t2 = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + unsigned int __pyx_t_6; + long __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + __Pyx_RefNannySetupContext("getBSSlim", 0); + + /* "PyCafe.pyx":7561 + * + * def getBSSlim(self): + * if self.BSInitialized == False: # <<<<<<<<<<<<<< + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" + */ + __pyx_t_1 = ((__pyx_v_self->BSInitialized == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7562 + * def getBSSlim(self): + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: # <<<<<<<<<<<<<< + * print(("Message from getBS: BS stream not initialized;" + * "cafe.setBS(pvList) has first to be called.")) + */ + __pyx_t_1 = ((__pyx_v_self->isBSinCAOnly == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7563 + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" # <<<<<<<<<<<<<< + * "cafe.setBS(pvList) has first to be called.")) + * return None + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7565 + * print(("Message from getBS: BS stream not initialized;" + * "cafe.setBS(pvList) has first to be called.")) + * return None # <<<<<<<<<<<<<< + * + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":7562 + * def getBSSlim(self): + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: # <<<<<<<<<<<<<< + * print(("Message from getBS: BS stream not initialized;" + * "cafe.setBS(pvList) has first to be called.")) + */ + } + + /* "PyCafe.pyx":7561 + * + * def getBSSlim(self): + * if self.BSInitialized == False: # <<<<<<<<<<<<<< + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" + */ + } + + /* "PyCafe.pyx":7567 + * return None + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7568 + * + * with nogil: + * self._c_cafe.getBS(self.bsd) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->getBS(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7567 + * return None + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L7; + } + __pyx_L7:; + } + } + + /* "PyCafe.pyx":7571 + * + * + * t1= time.time() # <<<<<<<<<<<<<< + * PVDataV = self.bsd.getPVDataV() + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_t1 = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafe.pyx":7572 + * + * t1= time.time() + * PVDataV = self.bsd.getPVDataV() # <<<<<<<<<<<<<< + * + * pvlist = [None] * self.bsd.getNPV() + */ + __pyx_v_PVDataV = __pyx_v_self->bsd.getPVDataV(); + + /* "PyCafe.pyx":7574 + * PVDataV = self.bsd.getPVDataV() + * + * pvlist = [None] * self.bsd.getNPV() # <<<<<<<<<<<<<< + * #cdef pvdata p1 + * + */ + __pyx_t_2 = PyList_New(1 * ((((int)__pyx_v_self->bsd.getNPV())<0) ? 0:((int)__pyx_v_self->bsd.getNPV()))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < ((int)__pyx_v_self->bsd.getNPV()); __pyx_temp++) { + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_2, __pyx_temp, Py_None); + } + } + __pyx_v_pvlist = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":7577 + * #cdef pvdata p1 + * + * for i in range (0, self.bsd.getNPV()): # <<<<<<<<<<<<<< + * #p1 = pvdata() + * #p1 = PVDataHolderToStruct(self.bsd.pvdata[i]) + */ + __pyx_t_5 = __pyx_v_self->bsd.getNPV(); + __pyx_t_6 = __pyx_t_5; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7580 + * #p1 = pvdata() + * #p1 = PVDataHolderToStruct(self.bsd.pvdata[i]) + * pvlist[i]=PVDataHolderToStruct(PVDataV[i]) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_PVDataV[__pyx_v_i]), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvlist, __pyx_v_i, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(3, 7580, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + + /* "PyCafe.pyx":7583 + * + * + * bs_slim = {} # <<<<<<<<<<<<<< + * + * for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()): + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_bs_slim = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":7585 + * bs_slim = {} + * + * for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()): # <<<<<<<<<<<<<< + * bs_slim[handle] = data + * + */ + __pyx_t_2 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_self->bsd.getHandles()); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_pvlist); + __Pyx_GIVEREF(__pyx_v_pvlist); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pvlist); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + } else { + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7585, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_9)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7585, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(3, 7585, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_9(__pyx_t_4); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(3, 7585, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(3, 7585, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_10 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_10); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; + index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(3, 7585, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(3, 7585, __pyx_L1_error) + __pyx_L13_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_handle, __pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":7586 + * + * for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()): + * bs_slim[handle] = data # <<<<<<<<<<<<<< + * + * t2= time.time() + */ + if (unlikely(PyDict_SetItem(__pyx_v_bs_slim, __pyx_v_handle, __pyx_v_data) < 0)) __PYX_ERR(3, 7586, __pyx_L1_error) + + /* "PyCafe.pyx":7585 + * bs_slim = {} + * + * for data, handle in zip(pvlist, self.bsd.getHandles()): # self.bsd.getIsBS()): # <<<<<<<<<<<<<< + * bs_slim[handle] = data + * + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7588 + * bs_slim[handle] = data + * + * t2= time.time() # <<<<<<<<<<<<<< + * print("diff in reading BSDataHolderToStruc", t2 - t1) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_t2 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7589 + * + * t2= time.time() + * print("diff in reading BSDataHolderToStruc", t2 - t1) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 7589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_kp_u_diff_in_reading_BSDataHolderToSt); + __Pyx_GIVEREF(__pyx_kp_u_diff_in_reading_BSDataHolderToSt); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_diff_in_reading_BSDataHolderToSt); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 7589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7592 + * + * + * return bs_slim # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_bs_slim); + __pyx_r = __pyx_v_bs_slim; + goto __pyx_L0; + + /* "PyCafe.pyx":7560 + * + * + * def getBSSlim(self): # <<<<<<<<<<<<<< + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.getBSSlim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_t1); + __Pyx_XDECREF(__pyx_v_pvlist); + __Pyx_XDECREF(__pyx_v_bs_slim); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XDECREF(__pyx_v_t2); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7595 + * + * ################################################################################ + * def getBS(self): # <<<<<<<<<<<<<< + * + * if self.BSInitialized == False: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_449getBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_449getBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_448getBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_448getBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v__bsd = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getBS", 0); + + /* "PyCafe.pyx":7597 + * def getBS(self): + * + * if self.BSInitialized == False: # <<<<<<<<<<<<<< + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" + */ + __pyx_t_1 = ((__pyx_v_self->BSInitialized == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7598 + * + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: # <<<<<<<<<<<<<< + * print(("Message from getBS: BS stream not initialized;" + * "cafe.setBS(pvList) has first to be called.")) + */ + __pyx_t_1 = ((__pyx_v_self->isBSinCAOnly == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7599 + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" # <<<<<<<<<<<<<< + * "cafe.setBS(pvList) has first to be called.")) + * + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":7602 + * "cafe.setBS(pvList) has first to be called.")) + * + * return None # <<<<<<<<<<<<<< + * # CHECK STATUS!!!! + * #print("getBS in cycafe" + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":7598 + * + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: # <<<<<<<<<<<<<< + * print(("Message from getBS: BS stream not initialized;" + * "cafe.setBS(pvList) has first to be called.")) + */ + } + + /* "PyCafe.pyx":7597 + * def getBS(self): + * + * if self.BSInitialized == False: # <<<<<<<<<<<<<< + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" + */ + } + + /* "PyCafe.pyx":7607 + * #start = time.time() + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7608 + * + * with nogil: + * self._c_cafe.getBS(self.bsd) # <<<<<<<<<<<<<< + * + * _bsd = BSDataHolderToStruct(self.bsd) + */ + (void)(__pyx_v_self->_c_cafe->getBS(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7607 + * #start = time.time() + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.getBS(self.bsd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L7; + } + __pyx_L7:; + } + } + + /* "PyCafe.pyx":7610 + * self._c_cafe.getBS(self.bsd) + * + * _bsd = BSDataHolderToStruct(self.bsd) # <<<<<<<<<<<<<< + * #_bsd.show() + * return _bsd #BSDataHolderToStruct(self.bsd) + */ + __pyx_t_2 = __pyx_f_6PyCafe_BSDataHolderToStruct(__pyx_v_self->bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__bsd = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafe.pyx":7612 + * _bsd = BSDataHolderToStruct(self.bsd) + * #_bsd.show() + * return _bsd #BSDataHolderToStruct(self.bsd) # <<<<<<<<<<<<<< + * + * ''' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v__bsd); + __pyx_r = __pyx_v__bsd; + goto __pyx_L0; + + /* "PyCafe.pyx":7595 + * + * ################################################################################ + * def getBS(self): # <<<<<<<<<<<<<< + * + * if self.BSInitialized == False: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__bsd); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7632 + * ################################################################################ + * + * def closeBS(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.closeBS(self.bsd) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_451closeBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_451closeBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_450closeBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_450closeBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeBS", 0); + + /* "PyCafe.pyx":7633 + * + * def closeBS(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeBS(self.bsd) + * self.BSInitialized = False + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7634 + * def closeBS(self): + * with nogil: + * self._c_cafe.closeBS(self.bsd) # <<<<<<<<<<<<<< + * self.BSInitialized = False + * self.isBSinCAOnly = False + */ + (void)(__pyx_v_self->_c_cafe->closeBS(__pyx_v_self->bsd)); + } + + /* "PyCafe.pyx":7633 + * + * def closeBS(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeBS(self.bsd) + * self.BSInitialized = False + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7635 + * with nogil: + * self._c_cafe.closeBS(self.bsd) + * self.BSInitialized = False # <<<<<<<<<<<<<< + * self.isBSinCAOnly = False + * + */ + __pyx_v_self->BSInitialized = 0; + + /* "PyCafe.pyx":7636 + * self._c_cafe.closeBS(self.bsd) + * self.BSInitialized = False + * self.isBSinCAOnly = False # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->isBSinCAOnly = 0; + + /* "PyCafe.pyx":7632 + * ################################################################################ + * + * def closeBS(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.closeBS(self.bsd) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7639 + * + * + * def getTimeoutMSBS(self): # <<<<<<<<<<<<<< + * return self.bsd.getTimeout() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_453getTimeoutMSBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_453getTimeoutMSBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeoutMSBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_452getTimeoutMSBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_452getTimeoutMSBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getTimeoutMSBS", 0); + + /* "PyCafe.pyx":7640 + * + * def getTimeoutMSBS(self): + * return self.bsd.getTimeout() # <<<<<<<<<<<<<< + * + * def setTimeoutMSBS(self, int timeoutMS): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->bsd.getTimeout()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 7640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7639 + * + * + * def getTimeoutMSBS(self): # <<<<<<<<<<<<<< + * return self.bsd.getTimeout() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeoutMSBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7642 + * return self.bsd.getTimeout() + * + * def setTimeoutMSBS(self, int timeoutMS): # <<<<<<<<<<<<<< + * self.bsd.setTimeout(timeoutMS) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_455setTimeoutMSBS(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeoutMS); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_455setTimeoutMSBS(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeoutMS) { + int __pyx_v_timeoutMS; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setTimeoutMSBS (wrapper)", 0); + assert(__pyx_arg_timeoutMS); { + __pyx_v_timeoutMS = __Pyx_PyInt_As_int(__pyx_arg_timeoutMS); if (unlikely((__pyx_v_timeoutMS == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7642, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setTimeoutMSBS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_454setTimeoutMSBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_timeoutMS)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_454setTimeoutMSBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_timeoutMS) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setTimeoutMSBS", 0); + + /* "PyCafe.pyx":7643 + * + * def setTimeoutMSBS(self, int timeoutMS): + * self.bsd.setTimeout(timeoutMS) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->bsd.setTimeout(__pyx_v_timeoutMS); + + /* "PyCafe.pyx":7642 + * return self.bsd.getTimeout() + * + * def setTimeoutMSBS(self, int timeoutMS): # <<<<<<<<<<<<<< + * self.bsd.setTimeout(timeoutMS) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7646 + * + * + * def reconnectBS(self): # <<<<<<<<<<<<<< + * self.bsd.reconnect() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_457reconnectBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_457reconnectBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reconnectBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_456reconnectBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_456reconnectBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reconnectBS", 0); + + /* "PyCafe.pyx":7647 + * + * def reconnectBS(self): + * self.bsd.reconnect() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->bsd.reconnect()); + + /* "PyCafe.pyx":7646 + * + * + * def reconnectBS(self): # <<<<<<<<<<<<<< + * self.bsd.reconnect() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7650 + * + * + * def flushBS(self): # <<<<<<<<<<<<<< + * self.bsd.reconnect() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_459flushBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_459flushBS(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flushBS (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_458flushBS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_458flushBS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("flushBS", 0); + + /* "PyCafe.pyx":7651 + * + * def flushBS(self): + * self.bsd.reconnect() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->bsd.reconnect()); + + /* "PyCafe.pyx":7650 + * + * + * def flushBS(self): # <<<<<<<<<<<<<< + * self.bsd.reconnect() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7654 + * + * + * def monitorPulseID(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.monitorPulseID() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_461monitorPulseID(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_461monitorPulseID(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorPulseID (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_460monitorPulseID(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_460monitorPulseID(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorPulseID", 0); + + /* "PyCafe.pyx":7655 + * + * def monitorPulseID(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.monitorPulseID() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7656 + * def monitorPulseID(self): + * with nogil: + * self._c_cafe.monitorPulseID() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->monitorPulseID()); + } + + /* "PyCafe.pyx":7655 + * + * def monitorPulseID(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.monitorPulseID() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7654 + * + * + * def monitorPulseID(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.monitorPulseID() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7659 + * + * + * def monitorStopPulseID(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.monitorStopPulseID() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_463monitorStopPulseID(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_463monitorStopPulseID(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStopPulseID (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_462monitorStopPulseID(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_462monitorStopPulseID(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStopPulseID", 0); + + /* "PyCafe.pyx":7660 + * + * def monitorStopPulseID(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.monitorStopPulseID() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7661 + * def monitorStopPulseID(self): + * with nogil: + * self._c_cafe.monitorStopPulseID() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->monitorStopPulseID()); + } + + /* "PyCafe.pyx":7660 + * + * def monitorStopPulseID(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.monitorStopPulseID() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":7659 + * + * + * def monitorStopPulseID(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.monitorStopPulseID() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7664 + * + * + * def setPulseIDBufferSize(self, handlePV, int bufferSize = 10): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setPulseIDBufferSize" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_465setPulseIDBufferSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_465setPulseIDBufferSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + int __pyx_v_bufferSize; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPulseIDBufferSize (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_bufferSize,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bufferSize); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPulseIDBufferSize") < 0)) __PYX_ERR(3, 7664, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + if (values[1]) { + __pyx_v_bufferSize = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_bufferSize == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7664, __pyx_L3_error) + } else { + __pyx_v_bufferSize = ((int)10); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setPulseIDBufferSize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7664, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPulseIDBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_464setPulseIDBufferSize(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_bufferSize); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_464setPulseIDBufferSize(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_bufferSize) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setPulseIDBufferSize", 0); + + /* "PyCafe.pyx":7665 + * + * def setPulseIDBufferSize(self, handlePV, int bufferSize = 10): + * cdef str _METHOD = "setPulseIDBufferSize" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setPulseIDBufferSize); + __pyx_v__METHOD = __pyx_n_u_setPulseIDBufferSize; + + /* "PyCafe.pyx":7667 + * cdef str _METHOD = "setPulseIDBufferSize" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7668 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7669 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7669, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7668 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7670 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7671 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(3, 7671, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePV), 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7670 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7673 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type if handle " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__46, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7674 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type if handle " + * "else if PV."))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7673 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type if handle " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 7673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(3, 7673, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7678 + * "else if PV."))) + * + * self._c_cafe.setPulseIDBufferSize(handle, bufferSize) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->setPulseIDBufferSize(__pyx_v_handle, __pyx_v_bufferSize)); + + /* "PyCafe.pyx":7664 + * + * + * def setPulseIDBufferSize(self, handlePV, int bufferSize = 10): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setPulseIDBufferSize" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setPulseIDBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7681 + * + * + * def setPulseIDBufferSizeAll(self, int bufferSize = 10): # <<<<<<<<<<<<<< + * self._c_cafe.setPulseIDBufferSizeAll(bufferSize) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_467setPulseIDBufferSizeAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_467setPulseIDBufferSizeAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_bufferSize; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPulseIDBufferSizeAll (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bufferSize,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bufferSize); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPulseIDBufferSizeAll") < 0)) __PYX_ERR(3, 7681, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_bufferSize = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_bufferSize == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 7681, __pyx_L3_error) + } else { + __pyx_v_bufferSize = ((int)10); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setPulseIDBufferSizeAll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 7681, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPulseIDBufferSizeAll", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_466setPulseIDBufferSizeAll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_bufferSize); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_466setPulseIDBufferSizeAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_bufferSize) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPulseIDBufferSizeAll", 0); + + /* "PyCafe.pyx":7682 + * + * def setPulseIDBufferSizeAll(self, int bufferSize = 10): + * self._c_cafe.setPulseIDBufferSizeAll(bufferSize) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->setPulseIDBufferSizeAll(__pyx_v_bufferSize)); + + /* "PyCafe.pyx":7681 + * + * + * def setPulseIDBufferSizeAll(self, int bufferSize = 10): # <<<<<<<<<<<<<< + * self._c_cafe.setPulseIDBufferSizeAll(bufferSize) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7687 + * ################################################################################### + * + * def setBSInit(self, list pv): # <<<<<<<<<<<<<< + * self.bsd.init(pv) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_469setBSInit(PyObject *__pyx_v_self, PyObject *__pyx_v_pv); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_469setBSInit(PyObject *__pyx_v_self, PyObject *__pyx_v_pv) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setBSInit (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyList_Type), 1, "pv", 1))) __PYX_ERR(3, 7687, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_468setBSInit(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_pv)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_468setBSInit(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + __Pyx_RefNannySetupContext("setBSInit", 0); + + /* "PyCafe.pyx":7688 + * + * def setBSInit(self, list pv): + * self.bsd.init(pv) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_pv); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 7688, __pyx_L1_error) + __pyx_v_self->bsd.init(__pyx_t_1); + + /* "PyCafe.pyx":7687 + * ################################################################################### + * + * def setBSInit(self, list pv): # <<<<<<<<<<<<<< + * self.bsd.init(pv) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setBSInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_471__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_471__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_470__reduce_cython__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_470__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_473__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_473__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_472__setstate_cython__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_472__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6PyCafe_3__pyx_unpickle_CafeException = {"__pyx_unpickle_CafeException", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CafeException") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + */ + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8ae6b84) != 0); + if (__pyx_t_1) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v___pyx_PickleError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum != 0x8ae6b84: + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x8a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v___pyx_PickleError); + __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v___pyx_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_1 = (__pyx_v___pyx_state != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "(tree fragment)":9 + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(struct __pyx_obj_6PyCafe_CafeException *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + unsigned int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->error_code = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->error_info); + __Pyx_DECREF(__pyx_v___pyx_result->error_info); + __pyx_v___pyx_result->error_info = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->error_text); + __Pyx_DECREF(__pyx_v___pyx_result->error_text); + __pyx_v___pyx_result->error_text = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->handle = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->source); + __Pyx_DECREF(__pyx_v___pyx_result->source); + __pyx_v___pyx_result->source = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->type); + __Pyx_DECREF(__pyx_v___pyx_result->type); + __pyx_v___pyx_result->type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_6 = ((__pyx_t_5 > 7) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_4 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_4 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":14 + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<< + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * # experimental exception made for __getbuffer__ and __releasebuffer__ + * # -- the details of this may change. + * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_i; + int __pyx_v_ndim; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + int __pyx_v_t; + char *__pyx_v_f; + PyArray_Descr *__pyx_v_descr = 0; + int __pyx_v_offset; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + PyArray_Descr *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + char *__pyx_t_9; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 + * + * cdef int i, ndim + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + */ + __pyx_v_endian_detector = 1; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 + * cdef int i, ndim + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * + * ndim = PyArray_NDIM(self) + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + */ + __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 272, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 276, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 + * raise ValueError(u"ndarray is not Fortran contiguous") + * + * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 + * + * info.buf = PyArray_DATA(self) + * info.ndim = ndim # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * # Allocate new buffer for strides and shape info. + */ + __pyx_v_info->ndim = __pyx_v_ndim; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< + * info.shape = info.strides + ndim + * for i in range(ndim): + */ + __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 + * # This is allocated as one block, strides first. + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) + * info.shape = info.strides + ndim # <<<<<<<<<<<<<< + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] + */ + __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) + * info.shape = info.strides + ndim + * for i in range(ndim): # <<<<<<<<<<<<<< + * info.strides[i] = PyArray_STRIDES(self)[i] + * info.shape[i] = PyArray_DIMS(self)[i] + */ + __pyx_t_4 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 + * info.shape = info.strides + ndim + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< + * info.shape[i] = PyArray_DIMS(self)[i] + * else: + */ + (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287 + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] + * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< + * else: + * info.strides = PyArray_STRIDES(self) + */ + (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + goto __pyx_L9; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 + * info.shape[i] = PyArray_DIMS(self)[i] + * else: + * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL + */ + /*else*/ { + __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 + * else: + * info.strides = PyArray_STRIDES(self) + * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) + */ + __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); + } + __pyx_L9:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * info.strides = PyArray_STRIDES(self) + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = PyArray_ITEMSIZE(self) + * info.readonly = not PyArray_ISWRITEABLE(self) + */ + __pyx_v_info->suboffsets = NULL; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< + * info.readonly = not PyArray_ISWRITEABLE(self) + * + */ + __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) + * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< + * + * cdef int t + */ + __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296 + * + * cdef int t + * cdef char* f = NULL # <<<<<<<<<<<<<< + * cdef dtype descr = PyArray_DESCR(self) + * cdef int offset + */ + __pyx_v_f = NULL; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297 + * cdef int t + * cdef char* f = NULL + * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< + * cdef int offset + * + */ + __pyx_t_7 = PyArray_DESCR(__pyx_v_self); + __pyx_t_3 = ((PyObject *)__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300 + * cdef int offset + * + * info.obj = self # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(descr): + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 + * info.obj = self + * + * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303 + * + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num # <<<<<<<<<<<<<< + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + */ + __pyx_t_4 = __pyx_v_descr->type_num; + __pyx_v_t = __pyx_t_4; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); + if (!__pyx_t_2) { + goto __pyx_L15_next_or; + } else { + } + __pyx_t_2 = (__pyx_v_little_endian != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_L15_next_or:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305 + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + */ + __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 306, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307 + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + */ + switch (__pyx_v_t) { + case NPY_BYTE: + __pyx_v_f = ((char *)"b"); + break; + case NPY_UBYTE: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308 + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + */ + __pyx_v_f = ((char *)"B"); + break; + case NPY_SHORT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309 + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + */ + __pyx_v_f = ((char *)"h"); + break; + case NPY_USHORT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310 + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + */ + __pyx_v_f = ((char *)"H"); + break; + case NPY_INT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311 + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + */ + __pyx_v_f = ((char *)"i"); + break; + case NPY_UINT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312 + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + */ + __pyx_v_f = ((char *)"I"); + break; + case NPY_LONG: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313 + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + */ + __pyx_v_f = ((char *)"l"); + break; + case NPY_ULONG: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314 + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + */ + __pyx_v_f = ((char *)"L"); + break; + case NPY_LONGLONG: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315 + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + */ + __pyx_v_f = ((char *)"q"); + break; + case NPY_ULONGLONG: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316 + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + */ + __pyx_v_f = ((char *)"Q"); + break; + case NPY_FLOAT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317 + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + */ + __pyx_v_f = ((char *)"f"); + break; + case NPY_DOUBLE: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318 + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + */ + __pyx_v_f = ((char *)"d"); + break; + case NPY_LONGDOUBLE: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319 + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + */ + __pyx_v_f = ((char *)"g"); + break; + case NPY_CFLOAT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320 + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + */ + __pyx_v_f = ((char *)"Zf"); + break; + case NPY_CDOUBLE: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321 + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" + */ + __pyx_v_f = ((char *)"Zd"); + break; + case NPY_CLONGDOUBLE: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322 + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f = "O" + * else: + */ + __pyx_v_f = ((char *)"Zg"); + break; + case NPY_OBJECT: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323 + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_v_f = ((char *)"O"); + break; + default: + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325 + * elif t == NPY_OBJECT: f = "O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * info.format = f + * return + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 325, __pyx_L1_error) + break; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f # <<<<<<<<<<<<<< + * return + * else: + */ + __pyx_v_info->format = __pyx_v_f; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f + * return # <<<<<<<<<<<<<< + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 + * info.obj = self + * + * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + goto __pyx_L12; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329 + * return + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + */ + /*else*/ { + __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330 + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, + */ + (__pyx_v_info->format[0]) = '^'; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331 + * info.format = PyObject_Malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 # <<<<<<<<<<<<<< + * f = _util_dtypestring(descr, info.format + 1, + * info.format + _buffer_format_string_len, + */ + __pyx_v_offset = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332 + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< + * info.format + _buffer_format_string_len, + * &offset) + */ + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(4, 332, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335 + * info.format + _buffer_format_string_len, + * &offset) + * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + */ + (__pyx_v_f[0]) = '\x00'; + } + __pyx_L12:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * # experimental exception made for __getbuffer__ and __releasebuffer__ + * # -- the details of this may change. + * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + */ + +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * PyObject_Free(info.strides) + */ + PyObject_Free(__pyx_v_info->format); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * PyObject_Free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341 + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * PyObject_Free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + PyObject_Free(__pyx_v_info->strides); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * PyObject_Free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + goto __pyx_L3; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + __pyx_L3:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * return () + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { + PyArray_Descr *__pyx_v_child = 0; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + PyObject *__pyx_v_fields = 0; + PyObject *__pyx_v_childname = NULL; + PyObject *__pyx_v_new_offset = NULL; + PyObject *__pyx_v_t = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("_util_dtypestring", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 + * + * cdef dtype child + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * cdef tuple fields + */ + __pyx_v_endian_detector = 1; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848 + * cdef dtype child + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields + * + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + if (unlikely(__pyx_v_descr->names == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(4, 851, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(4, 851, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 + * + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields + * + */ + if (unlikely(__pyx_v_descr->fields == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(4, 852, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(4, 852, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< + * + * if (end - f) - (new_offset - offset[0]) < 15: + */ + if (likely(__pyx_v_fields != Py_None)) { + PyObject* sequence = __pyx_v_fields; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(4, 853, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(4, 853, __pyx_L1_error) + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 + * child, new_offset = fields + * + * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 856, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 + * child, new_offset = fields + * + * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); + if (!__pyx_t_7) { + goto __pyx_L8_next_or; + } else { + } + __pyx_t_7 = (__pyx_v_little_endian != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_L8_next_or:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859 + * + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * # One could encode it in the format string and have Cython + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); + __pyx_t_6 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + if (__pyx_t_6) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860 + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * # One could encode it in the format string and have Cython + * # complain instead, BUT: < and > in format strings also imply + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 860, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870 + * + * # Output padding bytes + * while offset[0] < new_offset: # <<<<<<<<<<<<<< + * f[0] = 120 # "x"; pad byte + * f += 1 + */ + while (1) { + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_6) break; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871 + * # Output padding bytes + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< + * f += 1 + * offset[0] += 1 + */ + (__pyx_v_f[0]) = 0x78; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872 + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte + * f += 1 # <<<<<<<<<<<<<< + * offset[0] += 1 + * + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873 + * f[0] = 120 # "x"; pad byte + * f += 1 + * offset[0] += 1 # <<<<<<<<<<<<<< + * + * offset[0] += child.itemsize + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875 + * offset[0] += 1 + * + * offset[0] += child.itemsize # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(child): + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 + * + * if not PyDataType_HASFIELDS(child): + * t = child.type_num # <<<<<<<<<<<<<< + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(4, 880, __pyx_L1_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883 + * + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 98; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884 + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 66; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885 + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x68; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886 + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 72; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887 + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x69; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888 + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 73; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889 + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x6C; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890 + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 76; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891 + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x71; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892 + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 81; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893 + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x66; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894 + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x64; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895 + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x67; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896 + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x66; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897 + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x64; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898 + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x67; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899 + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 79; + goto __pyx_L15; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901 + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * f += 1 + * else: + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(4, 901, __pyx_L1_error) + } + __pyx_L15:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * f += 1 # <<<<<<<<<<<<<< + * else: + * # Cython ignores struct boundary information ("T{...}"), + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + goto __pyx_L13; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906 + * # Cython ignores struct boundary information ("T{...}"), + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< + * return f + * + */ + /*else*/ { + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(4, 906, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; + } + __pyx_L13:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907 + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) + * return f # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_f; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * return () + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_child); + __Pyx_XDECREF(__pyx_v_fields); + __Pyx_XDECREF(__pyx_v_childname); + __Pyx_XDECREF(__pyx_v_new_offset); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * _import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036 + * cdef inline int import_array() except -1: + * try: + * _import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1036, __pyx_L3_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 + * try: + * _import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1037, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + * _import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1038, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1038, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * _import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1042, __pyx_L3_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1043, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1044, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1044, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1048, __pyx_L3_error) + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1049, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1050, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1050, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":93 + * __data_union data + * + * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) { + PyObject *__pyx_v_item_count = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + char *__pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + char __pyx_t_7; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "array.pxd":98 + * # In particular strided access is always provided regardless + * # of flags + * item_count = Py_SIZE(self) # <<<<<<<<<<<<<< + * + * info.suboffsets = NULL + */ + __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_item_count = __pyx_t_1; + __pyx_t_1 = 0; + + /* "array.pxd":100 + * item_count = Py_SIZE(self) + * + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.buf = self.data.as_chars + * info.readonly = 0 + */ + __pyx_v_info->suboffsets = NULL; + + /* "array.pxd":101 + * + * info.suboffsets = NULL + * info.buf = self.data.as_chars # <<<<<<<<<<<<<< + * info.readonly = 0 + * info.ndim = 1 + */ + __pyx_t_2 = __pyx_v_self->data.as_chars; + __pyx_v_info->buf = __pyx_t_2; + + /* "array.pxd":102 + * info.suboffsets = NULL + * info.buf = self.data.as_chars + * info.readonly = 0 # <<<<<<<<<<<<<< + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + */ + __pyx_v_info->readonly = 0; + + /* "array.pxd":103 + * info.buf = self.data.as_chars + * info.readonly = 0 + * info.ndim = 1 # <<<<<<<<<<<<<< + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + * info.len = info.itemsize * item_count + */ + __pyx_v_info->ndim = 1; + + /* "array.pxd":104 + * info.readonly = 0 + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<< + * info.len = info.itemsize * item_count + * + */ + __pyx_t_3 = __pyx_v_self->ob_descr->itemsize; + __pyx_v_info->itemsize = __pyx_t_3; + + /* "array.pxd":105 + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + * info.len = info.itemsize * item_count # <<<<<<<<<<<<<< + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + */ + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_info->len = __pyx_t_5; + + /* "array.pxd":107 + * info.len = info.itemsize * item_count + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<< + * if not info.shape: + * raise MemoryError() + */ + __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2))); + + /* "array.pxd":108 + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: # <<<<<<<<<<<<<< + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + */ + __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0); + if (__pyx_t_6) { + + /* "array.pxd":109 + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: + * raise MemoryError() # <<<<<<<<<<<<<< + * info.shape[0] = item_count # constant regardless of resizing + * info.strides = &info.itemsize + */ + PyErr_NoMemory(); __PYX_ERR(5, 109, __pyx_L1_error) + + /* "array.pxd":108 + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: # <<<<<<<<<<<<<< + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + */ + } + + /* "array.pxd":110 + * if not info.shape: + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<< + * info.strides = &info.itemsize + * + */ + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(5, 110, __pyx_L1_error) + (__pyx_v_info->shape[0]) = __pyx_t_5; + + /* "array.pxd":111 + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + * info.strides = &info.itemsize # <<<<<<<<<<<<<< + * + * info.format = (info.shape + 1) + */ + __pyx_v_info->strides = (&__pyx_v_info->itemsize); + + /* "array.pxd":113 + * info.strides = &info.itemsize + * + * info.format = (info.shape + 1) # <<<<<<<<<<<<<< + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 + */ + __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1)); + + /* "array.pxd":114 + * + * info.format = (info.shape + 1) + * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<< + * info.format[1] = 0 + * info.obj = self + */ + __pyx_t_7 = __pyx_v_self->ob_descr->typecode; + (__pyx_v_info->format[0]) = __pyx_t_7; + + /* "array.pxd":115 + * info.format = (info.shape + 1) + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 # <<<<<<<<<<<<<< + * info.obj = self + * + */ + (__pyx_v_info->format[1]) = 0; + + /* "array.pxd":116 + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 + * info.obj = self # <<<<<<<<<<<<<< + * + * def __releasebuffer__(self, Py_buffer* info): + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "array.pxd":93 + * __data_union data + * + * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_XDECREF(__pyx_v_item_count); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":118 + * info.obj = self + * + * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< + * PyObject_Free(info.shape) + * + */ + +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__", 0); + + /* "array.pxd":119 + * + * def __releasebuffer__(self, Py_buffer* info): + * PyObject_Free(info.shape) # <<<<<<<<<<<<<< + * + * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) + */ + PyObject_Free(__pyx_v_info->shape); + + /* "array.pxd":118 + * info.obj = self + * + * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< + * PyObject_Free(info.shape) + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "array.pxd":130 + * + * + * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< + * """ fast creation of a new array, given a template array. + * type will be same as template. + */ + +static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) { + arrayobject *__pyx_v_op = NULL; + arrayobject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("clone", 0); + + /* "array.pxd":134 + * type will be same as template. + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<< + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + */ + __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_op = ((arrayobject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "array.pxd":135 + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: # <<<<<<<<<<<<<< + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op + */ + __pyx_t_3 = (__pyx_v_zero != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None); + __pyx_t_4 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "array.pxd":136 + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<< + * return op + * + */ + (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize))); + + /* "array.pxd":135 + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: # <<<<<<<<<<<<<< + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op + */ + } + + /* "array.pxd":137 + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op # <<<<<<<<<<<<<< + * + * cdef inline array copy(array self): + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_op)); + __pyx_r = __pyx_v_op; + goto __pyx_L0; + + /* "array.pxd":130 + * + * + * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< + * """ fast creation of a new array, given a template array. + * type will be same as template. + */ + + /* function exit code */ + __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_op); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":139 + * return op + * + * cdef inline array copy(array self): # <<<<<<<<<<<<<< + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + */ + +static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) { + arrayobject *__pyx_v_op = NULL; + arrayobject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("copy", 0); + + /* "array.pxd":141 + * cdef inline array copy(array self): + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<< + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) + * return op + */ + __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_op = ((arrayobject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "array.pxd":142 + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<< + * return op + * + */ + (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize))); + + /* "array.pxd":143 + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) + * return op # <<<<<<<<<<<<<< + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_op)); + __pyx_r = __pyx_v_op; + goto __pyx_L0; + + /* "array.pxd":139 + * return op + * + * cdef inline array copy(array self): # <<<<<<<<<<<<<< + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + */ + + /* function exit code */ + __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_op); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":145 + * return op + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< + * """ efficient appending of new stuff of same type + * (e.g. of same array type) + */ + +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) { + Py_ssize_t __pyx_v_itemsize; + Py_ssize_t __pyx_v_origsize; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("extend_buffer", 0); + + /* "array.pxd":149 + * (e.g. of same array type) + * n: number of elements (not number of bytes!) """ + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<< + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) + */ + __pyx_t_1 = __pyx_v_self->ob_descr->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "array.pxd":150 + * n: number of elements (not number of bytes!) """ + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize + * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<< + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + */ + __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self)); + + /* "array.pxd":151 + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) # <<<<<<<<<<<<<< + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + * return 0 + */ + __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 151, __pyx_L1_error) + + /* "array.pxd":152 + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<< + * return 0 + * + */ + (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize))); + + /* "array.pxd":153 + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + * return 0 # <<<<<<<<<<<<<< + * + * cdef inline int extend(array self, array other) except -1: + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "array.pxd":145 + * return op + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< + * """ efficient appending of new stuff of same type + * (e.g. of same array type) + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":155 + * return 0 + * + * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + */ + +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("extend", 0); + + /* "array.pxd":157 + * cdef inline int extend(array self, array other) except -1: + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + */ + __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0); + if (__pyx_t_1) { + + /* "array.pxd":158 + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + * PyErr_BadArgument() # <<<<<<<<<<<<<< + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + */ + __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(5, 158, __pyx_L1_error) + + /* "array.pxd":157 + * cdef inline int extend(array self, array other) except -1: + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + */ + } + + /* "array.pxd":159 + * if self.ob_descr.typecode != other.ob_descr.typecode: + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<< + * + * cdef inline void zero(array self): + */ + __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 159, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "array.pxd":155 + * return 0 + * + * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":161 + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + * cdef inline void zero(array self): # <<<<<<<<<<<<<< + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) + */ + +static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("zero", 0); + + /* "array.pxd":163 + * cdef inline void zero(array self): + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<< + */ + (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize))); + + /* "array.pxd":161 + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + * cdef inline void zero(array self): # <<<<<<<<<<<<<< + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_std__in_string") + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + +static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v_o) { + Py_ssize_t __pyx_v_length; + char const *__pyx_v_data; + std::string __pyx_r; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_std__in_string", 0); + + /* "string.from_py":15 + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<< + * return string(data, length) + * + */ + __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(1, 15, __pyx_L1_error) + __pyx_v_data = __pyx_t_1; + + /* "string.from_py":16 + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * return string(data, length) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = std::string(__pyx_v_data, __pyx_v_length); + goto __pyx_L0; + + /* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_std__in_string") + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_std_3a__3a_string") + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + std::string __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_string", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((std::string)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_std_3a__3a_string") + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":31 + * + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0); + + /* "string.to_py":32 + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":31 + * + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":37 + * + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0); + + /* "string.to_py":38 + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":37 + * + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":43 + * + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0); + + /* "string.to_py":44 + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":43 + * + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":49 + * + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0); + + /* "string.to_py":50 + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":49 + * + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":55 + * + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) + * + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0); + + /* "string.to_py":56 + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":55 + * + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_std_3a__3a_string") + * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_std_3a__3a_string") + * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_std_3a__3a_string") + * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_unsigned_int(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_unsigned_int", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_unsigned_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "pair.to_py":158 + * + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): # <<<<<<<<<<<<<< + * return p.first, p.second + * + */ + +static PyObject *__pyx_convert_pair_to_py_float____std_3a__3a_string(std::pair const &__pyx_v_p) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py_float____std_3a__3a_string", 0); + + /* "pair.to_py":159 + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): + * return p.first, p.second # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "pair.to_py":158 + * + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): # <<<<<<<<<<<<<< + * return p.first, p.second + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("pair.to_py.__pyx_convert_pair_to_py_float____std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_float(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_float", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_unsigned_short(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_unsigned_short", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_unsigned_short") + * cdef object __pyx_convert_vector_to_py_unsigned_short(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_unsigned_short") + * cdef object __pyx_convert_vector_to_py_unsigned_short(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_unsigned_short", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_int") + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((int)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_int") + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_int(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_dbr_long_t(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_dbr_long_t", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_dbr_long_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_dbr_long_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_double(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_double", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_char__const___2a_") + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + char const *__pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_char__const___2a_", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_item); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((char const *)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_char__const___2a_") + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_char__const___2a_", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_double(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + double __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((double)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_double") + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + +/* Python wrapper */ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_shape = 0; + Py_ssize_t __pyx_v_itemsize; + PyObject *__pyx_v_format = 0; + PyObject *__pyx_v_mode = 0; + int __pyx_v_allocate_buffer; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[3] = ((PyObject *)__pyx_n_s_c); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 122, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_shape = ((PyObject*)values[0]); + __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error) + __pyx_v_format = values[2]; + __pyx_v_mode = values[3]; + if (values[4]) { + __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error) + } else { + + /* "View.MemoryView":123 + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, + * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< + * + * cdef int idx + */ + __pyx_v_allocate_buffer = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 122, __pyx_L1_error) + if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 122, __pyx_L1_error) + } + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); + + /* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { + int __pyx_v_idx; + Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_dim; + PyObject **__pyx_v_p; + char __pyx_v_order; + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + char *__pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_format); + + /* "View.MemoryView":129 + * cdef PyObject **p + * + * self.ndim = len(shape) # <<<<<<<<<<<<<< + * self.itemsize = itemsize + * + */ + if (unlikely(__pyx_v_shape == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 129, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error) + __pyx_v_self->ndim = ((int)__pyx_t_1); + + /* "View.MemoryView":130 + * + * self.ndim = len(shape) + * self.itemsize = itemsize # <<<<<<<<<<<<<< + * + * if not self.ndim: + */ + __pyx_v_self->itemsize = __pyx_v_itemsize; + + /* "View.MemoryView":132 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError("Empty shape tuple for cython.array") + * + */ + __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":133 + * + * if not self.ndim: + * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< + * + * if itemsize <= 0: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 133, __pyx_L1_error) + + /* "View.MemoryView":132 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError("Empty shape tuple for cython.array") + * + */ + } + + /* "View.MemoryView":135 + * raise ValueError("Empty shape tuple for cython.array") + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError("itemsize <= 0 for cython.array") + * + */ + __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":136 + * + * if itemsize <= 0: + * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 136, __pyx_L1_error) + + /* "View.MemoryView":135 + * raise ValueError("Empty shape tuple for cython.array") + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError("itemsize <= 0 for cython.array") + * + */ + } + + /* "View.MemoryView":138 + * raise ValueError("itemsize <= 0 for cython.array") + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + */ + __pyx_t_2 = PyBytes_Check(__pyx_v_format); + __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":139 + * + * if not isinstance(format, bytes): + * format = format.encode('ASCII') # <<<<<<<<<<<<<< + * self._format = format # keep a reference to the byte string + * self.format = self._format + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":138 + * raise ValueError("itemsize <= 0 for cython.array") + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + */ + } + + /* "View.MemoryView":140 + * if not isinstance(format, bytes): + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< + * self.format = self._format + * + */ + if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 140, __pyx_L1_error) + __pyx_t_3 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(__pyx_v_self->_format); + __pyx_v_self->_format = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":141 + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + * self.format = self._format # <<<<<<<<<<<<<< + * + * + */ + if (unlikely(__pyx_v_self->_format == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(1, 141, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error) + __pyx_v_self->format = __pyx_t_7; + + /* "View.MemoryView":144 + * + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< + * self._strides = self._shape + self.ndim + * + */ + __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); + + /* "View.MemoryView":145 + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) + * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< + * + * if not self._shape: + */ + __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); + + /* "View.MemoryView":147 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate shape and strides.") + * + */ + __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":148 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 148, __pyx_L1_error) + + /* "View.MemoryView":147 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate shape and strides.") + * + */ + } + + /* "View.MemoryView":151 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + __pyx_t_8 = 0; + __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 151, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_9; + __pyx_v_idx = __pyx_t_8; + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":152 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim + */ + __pyx_t_4 = ((__pyx_v_dim <= 0) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":153 + * for idx, dim in enumerate(shape): + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<< + * self._shape[idx] = dim + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 153, __pyx_L1_error) + + /* "View.MemoryView":152 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim + */ + } + + /* "View.MemoryView":154 + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim # <<<<<<<<<<<<<< + * + * cdef char order + */ + (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; + + /* "View.MemoryView":151 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":157 + * + * cdef char order + * if mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error) + if (__pyx_t_4) { + + /* "View.MemoryView":158 + * cdef char order + * if mode == 'fortran': + * order = b'F' # <<<<<<<<<<<<<< + * self.mode = u'fortran' + * elif mode == 'c': + */ + __pyx_v_order = 'F'; + + /* "View.MemoryView":159 + * if mode == 'fortran': + * order = b'F' + * self.mode = u'fortran' # <<<<<<<<<<<<<< + * elif mode == 'c': + * order = b'C' + */ + __Pyx_INCREF(__pyx_n_u_fortran); + __Pyx_GIVEREF(__pyx_n_u_fortran); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_n_u_fortran; + + /* "View.MemoryView":157 + * + * cdef char order + * if mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":160 + * order = b'F' + * self.mode = u'fortran' + * elif mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error) + if (likely(__pyx_t_4)) { + + /* "View.MemoryView":161 + * self.mode = u'fortran' + * elif mode == 'c': + * order = b'C' # <<<<<<<<<<<<<< + * self.mode = u'c' + * else: + */ + __pyx_v_order = 'C'; + + /* "View.MemoryView":162 + * elif mode == 'c': + * order = b'C' + * self.mode = u'c' # <<<<<<<<<<<<<< + * else: + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) + */ + __Pyx_INCREF(__pyx_n_u_c); + __Pyx_GIVEREF(__pyx_n_u_c); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_n_u_c; + + /* "View.MemoryView":160 + * order = b'F' + * self.mode = u'fortran' + * elif mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":164 + * self.mode = u'c' + * else: + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<< + * + * self.len = fill_contig_strides_array(self._shape, self._strides, + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 164, __pyx_L1_error) + } + __pyx_L10:; + + /* "View.MemoryView":166 + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) + * + * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<< + * itemsize, self.ndim, order) + * + */ + __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); + + /* "View.MemoryView":169 + * itemsize, self.ndim, order) + * + * self.free_data = allocate_buffer # <<<<<<<<<<<<<< + * self.dtype_is_object = format == b'O' + * if allocate_buffer: + */ + __pyx_v_self->free_data = __pyx_v_allocate_buffer; + + /* "View.MemoryView":170 + * + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< + * if allocate_buffer: + * + */ + __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_4; + + /* "View.MemoryView":171 + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' + * if allocate_buffer: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = (__pyx_v_allocate_buffer != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":174 + * + * + * self.data = malloc(self.len) # <<<<<<<<<<<<<< + * if not self.data: + * raise MemoryError("unable to allocate array data.") + */ + __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); + + /* "View.MemoryView":175 + * + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate array data.") + * + */ + __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":176 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 176, __pyx_L1_error) + + /* "View.MemoryView":175 + * + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate array data.") + * + */ + } + + /* "View.MemoryView":178 + * raise MemoryError("unable to allocate array data.") + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len / itemsize): + */ + __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":179 + * + * if self.dtype_is_object: + * p = self.data # <<<<<<<<<<<<<< + * for i in range(self.len / itemsize): + * p[i] = Py_None + */ + __pyx_v_p = ((PyObject **)__pyx_v_self->data); + + /* "View.MemoryView":180 + * if self.dtype_is_object: + * p = self.data + * for i in range(self.len / itemsize): # <<<<<<<<<<<<<< + * p[i] = Py_None + * Py_INCREF(Py_None) + */ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 180, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 180, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize); + __pyx_t_9 = __pyx_t_1; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "View.MemoryView":181 + * p = self.data + * for i in range(self.len / itemsize): + * p[i] = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + (__pyx_v_p[__pyx_v_i]) = Py_None; + + /* "View.MemoryView":182 + * for i in range(self.len / itemsize): + * p[i] = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + Py_INCREF(Py_None); + } + + /* "View.MemoryView":178 + * raise MemoryError("unable to allocate array data.") + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len / itemsize): + */ + } + + /* "View.MemoryView":171 + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' + * if allocate_buffer: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_format); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":185 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * cdef int bufmode = -1 + * if self.mode == u"c": + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_bufmode; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t *__pyx_t_7; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":186 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + */ + __pyx_v_bufmode = -1; + + /* "View.MemoryView":187 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + */ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":188 + * cdef int bufmode = -1 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + */ + __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":187 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + */ + goto __pyx_L3; + } + + /* "View.MemoryView":189 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + */ + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":190 + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") + */ + __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":189 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + */ + } + __pyx_L3:; + + /* "View.MemoryView":191 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + */ + __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":192 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__159, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 192, __pyx_L1_error) + + /* "View.MemoryView":191 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + */ + } + + /* "View.MemoryView":193 + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data # <<<<<<<<<<<<<< + * info.len = self.len + * info.ndim = self.ndim + */ + __pyx_t_4 = __pyx_v_self->data; + __pyx_v_info->buf = __pyx_t_4; + + /* "View.MemoryView":194 + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + * info.len = self.len # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape + */ + __pyx_t_5 = __pyx_v_self->len; + __pyx_v_info->len = __pyx_t_5; + + /* "View.MemoryView":195 + * info.buf = self.data + * info.len = self.len + * info.ndim = self.ndim # <<<<<<<<<<<<<< + * info.shape = self._shape + * info.strides = self._strides + */ + __pyx_t_6 = __pyx_v_self->ndim; + __pyx_v_info->ndim = __pyx_t_6; + + /* "View.MemoryView":196 + * info.len = self.len + * info.ndim = self.ndim + * info.shape = self._shape # <<<<<<<<<<<<<< + * info.strides = self._strides + * info.suboffsets = NULL + */ + __pyx_t_7 = __pyx_v_self->_shape; + __pyx_v_info->shape = __pyx_t_7; + + /* "View.MemoryView":197 + * info.ndim = self.ndim + * info.shape = self._shape + * info.strides = self._strides # <<<<<<<<<<<<<< + * info.suboffsets = NULL + * info.itemsize = self.itemsize + */ + __pyx_t_7 = __pyx_v_self->_strides; + __pyx_v_info->strides = __pyx_t_7; + + /* "View.MemoryView":198 + * info.shape = self._shape + * info.strides = self._strides + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = self.itemsize + * info.readonly = 0 + */ + __pyx_v_info->suboffsets = NULL; + + /* "View.MemoryView":199 + * info.strides = self._strides + * info.suboffsets = NULL + * info.itemsize = self.itemsize # <<<<<<<<<<<<<< + * info.readonly = 0 + * + */ + __pyx_t_5 = __pyx_v_self->itemsize; + __pyx_v_info->itemsize = __pyx_t_5; + + /* "View.MemoryView":200 + * info.suboffsets = NULL + * info.itemsize = self.itemsize + * info.readonly = 0 # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":202 + * info.readonly = 0 + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.format + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":203 + * + * if flags & PyBUF_FORMAT: + * info.format = self.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL + */ + __pyx_t_4 = __pyx_v_self->format; + __pyx_v_info->format = __pyx_t_4; + + /* "View.MemoryView":202 + * info.readonly = 0 + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.format + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":205 + * info.format = self.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.obj = self + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L5:; + + /* "View.MemoryView":207 + * info.format = NULL + * + * info.obj = self # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":185 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * cdef int bufmode = -1 + * if self.mode == u"c": + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":211 + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + */ + +/* Python wrapper */ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":212 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data: + */ + __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":213 + * def __dealloc__(array self): + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) # <<<<<<<<<<<<<< + * elif self.free_data: + * if self.dtype_is_object: + */ + __pyx_v_self->callback_free_data(__pyx_v_self->data); + + /* "View.MemoryView":212 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":214 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, + */ + __pyx_t_1 = (__pyx_v_self->free_data != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":215 + * self.callback_free_data(self.data) + * elif self.free_data: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + */ + __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":216 + * elif self.free_data: + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<< + * self._strides, self.ndim, False) + * free(self.data) + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); + + /* "View.MemoryView":215 + * self.callback_free_data(self.data) + * elif self.free_data: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + */ + } + + /* "View.MemoryView":218 + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + * free(self.data) # <<<<<<<<<<<<<< + * PyObject_Free(self._shape) + * + */ + free(__pyx_v_self->data); + + /* "View.MemoryView":214 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, + */ + } + __pyx_L3:; + + /* "View.MemoryView":219 + * self._strides, self.ndim, False) + * free(self.data) + * PyObject_Free(self._shape) # <<<<<<<<<<<<<< + * + * @property + */ + PyObject_Free(__pyx_v_self->_shape); + + /* "View.MemoryView":211 + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":222 + * + * @property + * def memview(self): # <<<<<<<<<<<<<< + * return self.get_memview() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":223 + * @property + * def memview(self): + * return self.get_memview() # <<<<<<<<<<<<<< + * + * @cname('get_memview') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":222 + * + * @property + * def memview(self): # <<<<<<<<<<<<<< + * return self.get_memview() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":226 + * + * @cname('get_memview') + * cdef get_memview(self): # <<<<<<<<<<<<<< + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) + */ + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("get_memview", 0); + + /* "View.MemoryView":227 + * @cname('get_memview') + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< + * return memoryview(self, flags, self.dtype_is_object) + * + */ + __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); + + /* "View.MemoryView":228 + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * def __len__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":226 + * + * @cname('get_memview') + * cdef get_memview(self): # <<<<<<<<<<<<<< + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":230 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * + */ + +/* Python wrapper */ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__", 0); + + /* "View.MemoryView":231 + * + * def __len__(self): + * return self._shape[0] # <<<<<<<<<<<<<< + * + * def __getattr__(self, attr): + */ + __pyx_r = (__pyx_v_self->_shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":230 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":233 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__getattr__", 0); + + /* "View.MemoryView":234 + * + * def __getattr__(self, attr): + * return getattr(self.memview, attr) # <<<<<<<<<<<<<< + * + * def __getitem__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":233 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":236 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * + */ + +/* Python wrapper */ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":237 + * + * def __getitem__(self, item): + * return self.memview[item] # <<<<<<<<<<<<<< + * + * def __setitem__(self, item, value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":236 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":239 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * + */ + +/* Python wrapper */ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setitem__", 0); + + /* "View.MemoryView":240 + * + * def __setitem__(self, item, value): + * self.memview[item] = value # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":239 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":244 + * + * @cname("__pyx_array_new") + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< + * char *mode, char *buf): + * cdef array result + */ + +static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) { + struct __pyx_array_obj *__pyx_v_result = 0; + struct __pyx_array_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("array_cwrapper", 0); + + /* "View.MemoryView":248 + * cdef array result + * + * if buf == NULL: # <<<<<<<<<<<<<< + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + */ + __pyx_t_1 = ((__pyx_v_buf == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":249 + * + * if buf == NULL: + * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<< + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), + */ + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":248 + * cdef array result + * + * if buf == NULL: # <<<<<<<<<<<<<< + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":251 + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< + * allocate_buffer=False) + * result.data = buf + */ + /*else*/ { + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_3 = 0; + + /* "View.MemoryView":252 + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), + * allocate_buffer=False) # <<<<<<<<<<<<<< + * result.data = buf + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error) + + /* "View.MemoryView":251 + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< + * allocate_buffer=False) + * result.data = buf + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":253 + * result = array(shape, itemsize, format, mode.decode('ASCII'), + * allocate_buffer=False) + * result.data = buf # <<<<<<<<<<<<<< + * + * return result + */ + __pyx_v_result->data = __pyx_v_buf; + } + __pyx_L3:; + + /* "View.MemoryView":255 + * result.data = buf + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":244 + * + * @cname("__pyx_array_new") + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< + * char *mode, char *buf): + * cdef array result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":281 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): + */ + +/* Python wrapper */ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_3,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_3)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 281, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_name = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "View.MemoryView":282 + * cdef object name + * def __init__(self, name): + * self.name = name # <<<<<<<<<<<<<< + * def __repr__(self): + * return self.name + */ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "View.MemoryView":281 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":283 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * + */ + +/* Python wrapper */ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":284 + * self.name = name + * def __repr__(self): + * return self.name # <<<<<<<<<<<<<< + * + * cdef generic = Enum("") + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* "View.MemoryView":283 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.name,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.name is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + */ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->name != Py_None); + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + */ + __pyx_t_3 = (__pyx_v_use_setstate != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":13 + * use_setstate = self.name is not None + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_184977713); + __Pyx_GIVEREF(__pyx_int_184977713); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_184977713); + __Pyx_GIVEREF(__pyx_int_184977713); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":298 + * + * @cname('__pyx_align_pointer') + * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory + */ + +static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) { + Py_intptr_t __pyx_v_aligned_p; + size_t __pyx_v_offset; + void *__pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":300 + * cdef void *align_pointer(void *memory, size_t alignment) nogil: + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory # <<<<<<<<<<<<<< + * cdef size_t offset + * + */ + __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory); + + /* "View.MemoryView":304 + * + * with cython.cdivision(True): + * offset = aligned_p % alignment # <<<<<<<<<<<<<< + * + * if offset > 0: + */ + __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment); + + /* "View.MemoryView":306 + * offset = aligned_p % alignment + * + * if offset > 0: # <<<<<<<<<<<<<< + * aligned_p += alignment - offset + * + */ + __pyx_t_1 = ((__pyx_v_offset > 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":307 + * + * if offset > 0: + * aligned_p += alignment - offset # <<<<<<<<<<<<<< + * + * return aligned_p + */ + __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset)); + + /* "View.MemoryView":306 + * offset = aligned_p % alignment + * + * if offset > 0: # <<<<<<<<<<<<<< + * aligned_p += alignment - offset + * + */ + } + + /* "View.MemoryView":309 + * aligned_p += alignment - offset + * + * return aligned_p # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((void *)__pyx_v_aligned_p); + goto __pyx_L0; + + /* "View.MemoryView":298 + * + * @cname('__pyx_align_pointer') + * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":345 + * cdef __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags + */ + +/* Python wrapper */ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_obj = 0; + int __pyx_v_flags; + int __pyx_v_dtype_is_object; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 345, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_obj = values[0]; + __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error) + if (values[2]) { + __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error) + } else { + __pyx_v_dtype_is_object = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "View.MemoryView":346 + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj # <<<<<<<<<<<<<< + * self.flags = flags + * if type(self) is memoryview or obj is not None: + */ + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + __Pyx_GOTREF(__pyx_v_self->obj); + __Pyx_DECREF(__pyx_v_self->obj); + __pyx_v_self->obj = __pyx_v_obj; + + /* "View.MemoryView":347 + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj + * self.flags = flags # <<<<<<<<<<<<<< + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + */ + __pyx_v_self->flags = __pyx_v_flags; + + /* "View.MemoryView":348 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + */ + __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_obj != Py_None); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":349 + * self.flags = flags + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + */ + __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error) + + /* "View.MemoryView":350 + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) + */ + __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":351 + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; + + /* "View.MemoryView":352 + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * global __pyx_memoryview_thread_locks_used + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":350 + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) + */ + } + + /* "View.MemoryView":348 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + */ + } + + /* "View.MemoryView":355 + * + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + */ + __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":356 + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + */ + __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + + /* "View.MemoryView":357 + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + */ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); + + /* "View.MemoryView":355 + * + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + */ + } + + /* "View.MemoryView":358 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + */ + __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":359 + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< + * if self.lock is NULL: + * raise MemoryError + */ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "View.MemoryView":360 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":361 + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error) + + /* "View.MemoryView":360 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + } + + /* "View.MemoryView":358 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + */ + } + + /* "View.MemoryView":363 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":364 + * + * if flags & PyBUF_FORMAT: + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< + * else: + * self.dtype_is_object = dtype_is_object + */ + __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_v_self->dtype_is_object = __pyx_t_1; + + /* "View.MemoryView":363 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + */ + goto __pyx_L10; + } + + /* "View.MemoryView":366 + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< + * + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( + */ + /*else*/ { + __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; + } + __pyx_L10:; + + /* "View.MemoryView":368 + * self.dtype_is_object = dtype_is_object + * + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<< + * &self.acquisition_count[0], sizeof(__pyx_atomic_int)) + * self.typeinfo = NULL + */ + __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int)))); + + /* "View.MemoryView":370 + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( + * &self.acquisition_count[0], sizeof(__pyx_atomic_int)) + * self.typeinfo = NULL # <<<<<<<<<<<<<< + * + * def __dealloc__(memoryview self): + */ + __pyx_v_self->typeinfo = NULL; + + /* "View.MemoryView":345 + * cdef __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":372 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) + */ + +/* Python wrapper */ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { + int __pyx_v_i; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyThread_type_lock __pyx_t_6; + PyThread_type_lock __pyx_t_7; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":373 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * __Pyx_ReleaseBuffer(&self.view) + * + */ + __pyx_t_1 = (__pyx_v_self->obj != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":374 + * def __dealloc__(memoryview self): + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< + * + * cdef int i + */ + __Pyx_ReleaseBuffer((&__pyx_v_self->view)); + + /* "View.MemoryView":373 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * __Pyx_ReleaseBuffer(&self.view) + * + */ + } + + /* "View.MemoryView":378 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + */ + __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":379 + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + */ + __pyx_t_3 = __pyx_memoryview_thread_locks_used; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":380 + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + */ + __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":381 + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + */ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); + + /* "View.MemoryView":382 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + */ + __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":384 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< + * break + * else: + */ + __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]); + + /* "View.MemoryView":383 + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break + */ + (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6; + (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7; + + /* "View.MemoryView":382 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + */ + } + + /* "View.MemoryView":385 + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break # <<<<<<<<<<<<<< + * else: + * PyThread_free_lock(self.lock) + */ + goto __pyx_L6_break; + + /* "View.MemoryView":380 + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + */ + } + } + /*else*/ { + + /* "View.MemoryView":387 + * break + * else: + * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + */ + PyThread_free_lock(__pyx_v_self->lock); + } + __pyx_L6_break:; + + /* "View.MemoryView":378 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + */ + } + + /* "View.MemoryView":372 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":389 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf + */ + +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + Py_ssize_t __pyx_v_dim; + char *__pyx_v_itemp; + PyObject *__pyx_v_idx = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + char *__pyx_t_7; + __Pyx_RefNannySetupContext("get_item_pointer", 0); + + /* "View.MemoryView":391 + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< + * + * for dim, idx in enumerate(index): + */ + __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); + + /* "View.MemoryView":393 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + */ + __pyx_t_1 = 0; + if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { + __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 393, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 393, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_1; + __pyx_t_1 = (__pyx_t_1 + 1); + + /* "View.MemoryView":394 + * + * for dim, idx in enumerate(index): + * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< + * + * return itemp + */ + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 394, __pyx_L1_error) + __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 394, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_7; + + /* "View.MemoryView":393 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":396 + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + * return itemp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_itemp; + goto __pyx_L0; + + /* "View.MemoryView":389 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":399 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_indices = NULL; + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":400 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":401 + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: + * return self # <<<<<<<<<<<<<< + * + * have_slices, indices = _unellipsify(index, self.view.ndim) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "View.MemoryView":400 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * + */ + } + + /* "View.MemoryView":403 + * return self + * + * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * cdef char *itemp + */ + __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(__pyx_t_3 != Py_None)) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 403, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 403, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_indices = __pyx_t_5; + __pyx_t_5 = 0; + + /* "View.MemoryView":406 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 406, __pyx_L1_error) + if (__pyx_t_2) { + + /* "View.MemoryView":407 + * cdef char *itemp + * if have_slices: + * return memview_slice(self, indices) # <<<<<<<<<<<<<< + * else: + * itemp = self.get_item_pointer(indices) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":406 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: + */ + } + + /* "View.MemoryView":409 + * return memview_slice(self, indices) + * else: + * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< + * return self.convert_item_to_object(itemp) + * + */ + /*else*/ { + __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_6; + + /* "View.MemoryView":410 + * else: + * itemp = self.get_item_pointer(indices) + * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< + * + * def __setitem__(memoryview self, object index, object value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":399 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_indices); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":412 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") + */ + +/* Python wrapper */ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_obj = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("__setitem__", 0); + __Pyx_INCREF(__pyx_v_index); + + /* "View.MemoryView":413 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError("Cannot assign to read-only memoryview") + * + */ + __pyx_t_1 = (__pyx_v_self->view.readonly != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":414 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 414, __pyx_L1_error) + + /* "View.MemoryView":413 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError("Cannot assign to read-only memoryview") + * + */ + } + + /* "View.MemoryView":416 + * raise TypeError("Cannot assign to read-only memoryview") + * + * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * if have_slices: + */ + __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 416, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 416, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":418 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 418, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":419 + * + * if have_slices: + * obj = self.is_slice(value) # <<<<<<<<<<<<<< + * if obj: + * self.setitem_slice_assignment(self[index], obj) + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_obj = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":420 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 420, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":421 + * obj = self.is_slice(value) + * if obj: + * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< + * else: + * self.setitem_slice_assign_scalar(self[index], value) + */ + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":420 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":423 + * self.setitem_slice_assignment(self[index], obj) + * else: + * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< + * else: + * self.setitem_indexed(index, value) + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 423, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L5:; + + /* "View.MemoryView":418 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":425 + * self.setitem_slice_assign_scalar(self[index], value) + * else: + * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< + * + * cdef is_slice(self, obj): + */ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "View.MemoryView":412 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":427 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: + */ + +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + __Pyx_RefNannySetupContext("is_slice", 0); + __Pyx_INCREF(__pyx_v_obj); + + /* "View.MemoryView":428 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + */ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "View.MemoryView":430 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":431 + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) # <<<<<<<<<<<<<< + * except TypeError: + * return None + */ + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 431, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "View.MemoryView":430 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7); + __pyx_t_7 = 0; + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "View.MemoryView":432 + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + * except TypeError: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); + if (__pyx_t_9) { + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 432, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":433 + * self.dtype_is_object) + * except TypeError: + * return None # <<<<<<<<<<<<<< + * + * return obj + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_except_return; + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L7_except_return:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L0; + __pyx_L9_try_end:; + } + + /* "View.MemoryView":428 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + */ + } + + /* "View.MemoryView":435 + * return None + * + * return obj # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assignment(self, dst, src): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_obj); + __pyx_r = __pyx_v_obj; + goto __pyx_L0; + + /* "View.MemoryView":427 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":437 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + */ + +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { + __Pyx_memviewslice __pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_src_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); + + /* "View.MemoryView":441 + * cdef __Pyx_memviewslice src_slice + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) + */ + if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 441, __pyx_L1_error) + + /* "View.MemoryView":442 + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], + * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<< + * src.ndim, dst.ndim, self.dtype_is_object) + * + */ + if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 442, __pyx_L1_error) + + /* "View.MemoryView":443 + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":441 + * cdef __Pyx_memviewslice src_slice + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) + */ + __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 441, __pyx_L1_error) + + /* "View.MemoryView":437 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":445 + * src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL + */ + +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { + int __pyx_v_array[0x80]; + void *__pyx_v_tmp; + void *__pyx_v_item; + __Pyx_memviewslice *__pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_tmp_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + char const *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); + + /* "View.MemoryView":447 + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + * cdef int array[128] + * cdef void *tmp = NULL # <<<<<<<<<<<<<< + * cdef void *item + * + */ + __pyx_v_tmp = NULL; + + /* "View.MemoryView":452 + * cdef __Pyx_memviewslice *dst_slice + * cdef __Pyx_memviewslice tmp_slice + * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< + * + * if self.view.itemsize > sizeof(array): + */ + __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); + + /* "View.MemoryView":454 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + */ + __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":455 + * + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< + * if tmp == NULL: + * raise MemoryError + */ + __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); + + /* "View.MemoryView":456 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp + */ + __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":457 + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * item = tmp + * else: + */ + PyErr_NoMemory(); __PYX_ERR(1, 457, __pyx_L1_error) + + /* "View.MemoryView":456 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp + */ + } + + /* "View.MemoryView":458 + * if tmp == NULL: + * raise MemoryError + * item = tmp # <<<<<<<<<<<<<< + * else: + * item = array + */ + __pyx_v_item = __pyx_v_tmp; + + /* "View.MemoryView":454 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":460 + * item = tmp + * else: + * item = array # <<<<<<<<<<<<<< + * + * try: + */ + /*else*/ { + __pyx_v_item = ((void *)__pyx_v_array); + } + __pyx_L3:; + + /* "View.MemoryView":462 + * item = array + * + * try: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * ( item)[0] = value + */ + /*try:*/ { + + /* "View.MemoryView":463 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: + */ + __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":464 + * try: + * if self.dtype_is_object: + * ( item)[0] = value # <<<<<<<<<<<<<< + * else: + * self.assign_item_from_object( item, value) + */ + (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); + + /* "View.MemoryView":463 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":466 + * ( item)[0] = value + * else: + * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L8:; + + /* "View.MemoryView":470 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + */ + __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":471 + * + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + * item, self.dtype_is_object) + */ + __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":470 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + */ + } + + /* "View.MemoryView":472 + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< + * item, self.dtype_is_object) + * finally: + */ + __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); + } + + /* "View.MemoryView":475 + * item, self.dtype_is_object) + * finally: + * PyMem_Free(tmp) # <<<<<<<<<<<<<< + * + * cdef setitem_indexed(self, index, value): + */ + /*finally:*/ { + /*normal exit:*/{ + PyMem_Free(__pyx_v_tmp); + goto __pyx_L7; + } + __pyx_L6_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename; + { + PyMem_Free(__pyx_v_tmp); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + } + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; + __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5; + goto __pyx_L1_error; + } + __pyx_L7:; + } + + /* "View.MemoryView":445 + * src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":477 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) + */ + +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("setitem_indexed", 0); + + /* "View.MemoryView":478 + * + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< + * self.assign_item_from_object(itemp, value) + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 478, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_1; + + /* "View.MemoryView":479 + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":477 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":481 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_v_struct = NULL; + PyObject *__pyx_v_bytesitem = 0; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":484 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef bytes bytesitem + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":487 + * cdef bytes bytesitem + * + * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< + * try: + * result = struct.unpack(self.view.format, bytesitem) + */ + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "View.MemoryView":489 + * bytesitem = itemp[:self.view.itemsize] + * try: + * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< + * except struct.error: + * raise ValueError("Unable to convert item to object") + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6); + __Pyx_INCREF(__pyx_v_bytesitem); + __Pyx_GIVEREF(__pyx_v_bytesitem); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem); + __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + } + + /* "View.MemoryView":493 + * raise ValueError("Unable to convert item to object") + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result + */ + /*else:*/ { + __pyx_t_10 = strlen(__pyx_v_self->view.format); + __pyx_t_11 = ((__pyx_t_10 == 1) != 0); + if (__pyx_t_11) { + + /* "View.MemoryView":494 + * else: + * if len(self.view.format) == 1: + * return result[0] # <<<<<<<<<<<<<< + * return result + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L6_except_return; + + /* "View.MemoryView":493 + * raise ValueError("Unable to convert item to object") + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result + */ + } + + /* "View.MemoryView":495 + * if len(self.view.format) == 1: + * return result[0] + * return result # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L6_except_return; + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":490 + * try: + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: # <<<<<<<<<<<<<< + * raise ValueError("Unable to convert item to object") + * else: + */ + __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 490, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; + if (__pyx_t_8) { + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 490, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_1); + + /* "View.MemoryView":491 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__163, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(1, 491, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } + + /* "View.MemoryView":481 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesitem); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":497 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_v_struct = NULL; + char __pyx_v_c; + PyObject *__pyx_v_bytesvalue = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + char *__pyx_t_11; + char *__pyx_t_12; + char *__pyx_t_13; + char *__pyx_t_14; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":500 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef char c + * cdef bytes bytesvalue + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":505 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: + */ + __pyx_t_2 = PyTuple_Check(__pyx_v_value); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "View.MemoryView":506 + * + * if isinstance(value, tuple): + * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< + * else: + * bytesvalue = struct.pack(self.view.format, value) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 506, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":505 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":508 + * bytesvalue = struct.pack(self.view.format, *value) + * else: + * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< + * + * for i, c in enumerate(bytesvalue): + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":510 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_9 = 0; + if (unlikely(__pyx_v_bytesvalue == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); + __PYX_ERR(1, 510, __pyx_L1_error) + } + __Pyx_INCREF(__pyx_v_bytesvalue); + __pyx_t_10 = __pyx_v_bytesvalue; + __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10); + __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10)); + for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) { + __pyx_t_11 = __pyx_t_14; + __pyx_v_c = (__pyx_t_11[0]); + + /* "View.MemoryView":511 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + __pyx_v_i = __pyx_t_9; + + /* "View.MemoryView":510 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_9 = (__pyx_t_9 + 1); + + /* "View.MemoryView":511 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "View.MemoryView":497 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":514 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t *__pyx_t_4; + char *__pyx_t_5; + void *__pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":515 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + */ + __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->view.readonly != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":516 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 516, __pyx_L1_error) + + /* "View.MemoryView":515 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + */ + } + + /* "View.MemoryView":518 + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":519 + * + * if flags & PyBUF_ND: + * info.shape = self.view.shape # <<<<<<<<<<<<<< + * else: + * info.shape = NULL + */ + __pyx_t_4 = __pyx_v_self->view.shape; + __pyx_v_info->shape = __pyx_t_4; + + /* "View.MemoryView":518 + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":521 + * info.shape = self.view.shape + * else: + * info.shape = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: + */ + /*else*/ { + __pyx_v_info->shape = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":523 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":524 + * + * if flags & PyBUF_STRIDES: + * info.strides = self.view.strides # <<<<<<<<<<<<<< + * else: + * info.strides = NULL + */ + __pyx_t_4 = __pyx_v_self->view.strides; + __pyx_v_info->strides = __pyx_t_4; + + /* "View.MemoryView":523 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: + */ + goto __pyx_L7; + } + + /* "View.MemoryView":526 + * info.strides = self.view.strides + * else: + * info.strides = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_INDIRECT: + */ + /*else*/ { + __pyx_v_info->strides = NULL; + } + __pyx_L7:; + + /* "View.MemoryView":528 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":529 + * + * if flags & PyBUF_INDIRECT: + * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< + * else: + * info.suboffsets = NULL + */ + __pyx_t_4 = __pyx_v_self->view.suboffsets; + __pyx_v_info->suboffsets = __pyx_t_4; + + /* "View.MemoryView":528 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":531 + * info.suboffsets = self.view.suboffsets + * else: + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + /*else*/ { + __pyx_v_info->suboffsets = NULL; + } + __pyx_L8:; + + /* "View.MemoryView":533 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":534 + * + * if flags & PyBUF_FORMAT: + * info.format = self.view.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL + */ + __pyx_t_5 = __pyx_v_self->view.format; + __pyx_v_info->format = __pyx_t_5; + + /* "View.MemoryView":533 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: + */ + goto __pyx_L9; + } + + /* "View.MemoryView":536 + * info.format = self.view.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.buf = self.view.buf + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L9:; + + /* "View.MemoryView":538 + * info.format = NULL + * + * info.buf = self.view.buf # <<<<<<<<<<<<<< + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + */ + __pyx_t_6 = __pyx_v_self->view.buf; + __pyx_v_info->buf = __pyx_t_6; + + /* "View.MemoryView":539 + * + * info.buf = self.view.buf + * info.ndim = self.view.ndim # <<<<<<<<<<<<<< + * info.itemsize = self.view.itemsize + * info.len = self.view.len + */ + __pyx_t_7 = __pyx_v_self->view.ndim; + __pyx_v_info->ndim = __pyx_t_7; + + /* "View.MemoryView":540 + * info.buf = self.view.buf + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< + * info.len = self.view.len + * info.readonly = self.view.readonly + */ + __pyx_t_8 = __pyx_v_self->view.itemsize; + __pyx_v_info->itemsize = __pyx_t_8; + + /* "View.MemoryView":541 + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + * info.len = self.view.len # <<<<<<<<<<<<<< + * info.readonly = self.view.readonly + * info.obj = self + */ + __pyx_t_8 = __pyx_v_self->view.len; + __pyx_v_info->len = __pyx_t_8; + + /* "View.MemoryView":542 + * info.itemsize = self.view.itemsize + * info.len = self.view.len + * info.readonly = self.view.readonly # <<<<<<<<<<<<<< + * info.obj = self + * + */ + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_v_info->readonly = __pyx_t_1; + + /* "View.MemoryView":543 + * info.len = self.view.len + * info.readonly = self.view.readonly + * info.obj = self # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":514 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":549 + * + * @property + * def T(self): # <<<<<<<<<<<<<< + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":550 + * @property + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< + * transpose_memslice(&result.from_slice) + * return result + */ + __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 550, __pyx_L1_error) + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":551 + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 551, __pyx_L1_error) + + /* "View.MemoryView":552 + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + * return result # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":549 + * + * @property + * def T(self): # <<<<<<<<<<<<<< + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":555 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":556 + * @property + * def base(self): + * return self.obj # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->obj); + __pyx_r = __pyx_v_self->obj; + goto __pyx_L0; + + /* "View.MemoryView":555 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":559 + * + * @property + * def shape(self): # <<<<<<<<<<<<<< + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_length; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":560 + * @property + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_v_length = (__pyx_t_2[0]); + __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":559 + * + * @property + * def shape(self): # <<<<<<<<<<<<<< + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":563 + * + * @property + * def strides(self): # <<<<<<<<<<<<<< + * if self.view.strides == NULL: + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_stride; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":564 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError("Buffer view does not expose strides") + */ + __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":566 + * if self.view.strides == NULL: + * + * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 566, __pyx_L1_error) + + /* "View.MemoryView":564 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError("Buffer view does not expose strides") + */ + } + + /* "View.MemoryView":568 + * raise ValueError("Buffer view does not expose strides") + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_v_stride = (__pyx_t_3[0]); + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":563 + * + * @property + * def strides(self): # <<<<<<<<<<<<<< + * if self.view.strides == NULL: + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":571 + * + * @property + * def suboffsets(self): # <<<<<<<<<<<<<< + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + Py_ssize_t *__pyx_t_6; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":572 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * + */ + __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":573 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__166, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":572 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * + */ + } + + /* "View.MemoryView":575 + * return (-1,) * self.view.ndim + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); + for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) { + __pyx_t_4 = __pyx_t_6; + __pyx_v_suboffset = (__pyx_t_4[0]); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":571 + * + * @property + * def suboffsets(self): # <<<<<<<<<<<<<< + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":578 + * + * @property + * def ndim(self): # <<<<<<<<<<<<<< + * return self.view.ndim + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":579 + * @property + * def ndim(self): + * return self.view.ndim # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":578 + * + * @property + * def ndim(self): # <<<<<<<<<<<<<< + * return self.view.ndim + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":582 + * + * @property + * def itemsize(self): # <<<<<<<<<<<<<< + * return self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":583 + * @property + * def itemsize(self): + * return self.view.itemsize # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":582 + * + * @property + * def itemsize(self): # <<<<<<<<<<<<<< + * return self.view.itemsize + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":586 + * + * @property + * def nbytes(self): # <<<<<<<<<<<<<< + * return self.size * self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":587 + * @property + * def nbytes(self): + * return self.size * self.view.itemsize # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":586 + * + * @property + * def nbytes(self): # <<<<<<<<<<<<<< + * return self.size * self.view.itemsize + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":590 + * + * @property + * def size(self): # <<<<<<<<<<<<<< + * if self._size is None: + * result = 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":591 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * + */ + __pyx_t_1 = (__pyx_v_self->_size == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":592 + * def size(self): + * if self._size is None: + * result = 1 # <<<<<<<<<<<<<< + * + * for length in self.view.shape[:self.view.ndim]: + */ + __Pyx_INCREF(__pyx_int_1); + __pyx_v_result = __pyx_int_1; + + /* "View.MemoryView":594 + * result = 1 + * + * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< + * result *= length + * + */ + __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6); + __pyx_t_6 = 0; + + /* "View.MemoryView":595 + * + * for length in self.view.shape[:self.view.ndim]: + * result *= length # <<<<<<<<<<<<<< + * + * self._size = result + */ + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); + __pyx_t_6 = 0; + } + + /* "View.MemoryView":597 + * result *= length + * + * self._size = result # <<<<<<<<<<<<<< + * + * return self._size + */ + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + __Pyx_GOTREF(__pyx_v_self->_size); + __Pyx_DECREF(__pyx_v_self->_size); + __pyx_v_self->_size = __pyx_v_result; + + /* "View.MemoryView":591 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * + */ + } + + /* "View.MemoryView":599 + * self._size = result + * + * return self._size # <<<<<<<<<<<<<< + * + * def __len__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_size); + __pyx_r = __pyx_v_self->_size; + goto __pyx_L0; + + /* "View.MemoryView":590 + * + * @property + * def size(self): # <<<<<<<<<<<<<< + * if self._size is None: + * result = 1 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":601 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] + */ + +/* Python wrapper */ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__len__", 0); + + /* "View.MemoryView":602 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * + */ + __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":603 + * def __len__(self): + * if self.view.ndim >= 1: + * return self.view.shape[0] # <<<<<<<<<<<<<< + * + * return 0 + */ + __pyx_r = (__pyx_v_self->view.shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":602 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * + */ + } + + /* "View.MemoryView":605 + * return self.view.shape[0] + * + * return 0 # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":601 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":607 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":608 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":609 + * def __repr__(self): + * return "" % (self.base.__class__.__name__, + * id(self)) # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "View.MemoryView":608 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":607 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":611 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "View.MemoryView":612 + * + * def __str__(self): + * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":611 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":615 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("is_c_contig", 0); + + /* "View.MemoryView":618 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":619 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< + * + * def is_f_contig(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":615 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":621 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("is_f_contig", 0); + + /* "View.MemoryView":624 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":625 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< + * + * def copy(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":621 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":627 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_mslice; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("copy", 0); + + /* "View.MemoryView":629 + * def copy(self): + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &mslice) + */ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); + + /* "View.MemoryView":631 + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + * + * slice_copy(self, &mslice) # <<<<<<<<<<<<<< + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, + * self.view.itemsize, + */ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); + + /* "View.MemoryView":632 + * + * slice_copy(self, &mslice) + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_C_CONTIGUOUS, + */ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 632, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":637 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< + * + * def copy_fortran(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":627 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":639 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("copy_fortran", 0); + + /* "View.MemoryView":641 + * def copy_fortran(self): + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &src) + */ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); + + /* "View.MemoryView":643 + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + * + * slice_copy(self, &src) # <<<<<<<<<<<<<< + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, + * self.view.itemsize, + */ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); + + /* "View.MemoryView":644 + * + * slice_copy(self, &src) + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_F_CONTIGUOUS, + */ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 644, __pyx_L1_error) + __pyx_v_dst = __pyx_t_1; + + /* "View.MemoryView":649 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":639 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":653 + * + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + */ + +static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) { + struct __pyx_memoryview_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); + + /* "View.MemoryView":654 + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< + * result.typeinfo = typeinfo + * return result + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_o); + __Pyx_GIVEREF(__pyx_v_o); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":655 + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_v_result->typeinfo = __pyx_v_typeinfo; + + /* "View.MemoryView":656 + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_check') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":653 + * + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":659 + * + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< + * return isinstance(o, memoryview) + * + */ + +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("memoryview_check", 0); + + /* "View.MemoryView":660 + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): + * return isinstance(o, memoryview) # <<<<<<<<<<<<<< + * + * cdef tuple _unellipsify(object index, int ndim): + */ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":659 + * + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< + * return isinstance(o, memoryview) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":662 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with + */ + +static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_v_result = NULL; + int __pyx_v_have_slices; + int __pyx_v_seen_ellipsis; + CYTHON_UNUSED PyObject *__pyx_v_idx = NULL; + PyObject *__pyx_v_item = NULL; + Py_ssize_t __pyx_v_nslices; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("_unellipsify", 0); + + /* "View.MemoryView":667 + * full slices. + * """ + * if not isinstance(index, tuple): # <<<<<<<<<<<<<< + * tup = (index,) + * else: + */ + __pyx_t_1 = PyTuple_Check(__pyx_v_index); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":668 + * """ + * if not isinstance(index, tuple): + * tup = (index,) # <<<<<<<<<<<<<< + * else: + * tup = index + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_index); + __Pyx_GIVEREF(__pyx_v_index); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index); + __pyx_v_tup = __pyx_t_3; + __pyx_t_3 = 0; + + /* "View.MemoryView":667 + * full slices. + * """ + * if not isinstance(index, tuple): # <<<<<<<<<<<<<< + * tup = (index,) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":670 + * tup = (index,) + * else: + * tup = index # <<<<<<<<<<<<<< + * + * result = [] + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_index); + __pyx_v_tup = __pyx_v_index; + } + __pyx_L3:; + + /* "View.MemoryView":672 + * tup = index + * + * result = [] # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_result = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":673 + * + * result = [] + * have_slices = False # <<<<<<<<<<<<<< + * seen_ellipsis = False + * for idx, item in enumerate(tup): + */ + __pyx_v_have_slices = 0; + + /* "View.MemoryView":674 + * result = [] + * have_slices = False + * seen_ellipsis = False # <<<<<<<<<<<<<< + * for idx, item in enumerate(tup): + * if item is Ellipsis: + */ + __pyx_v_seen_ellipsis = 0; + + /* "View.MemoryView":675 + * have_slices = False + * seen_ellipsis = False + * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_t_3 = __pyx_int_0; + if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) { + __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 675, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } + } else { + __pyx_t_7 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_7)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 675, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_INCREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); + __pyx_t_3 = __pyx_t_7; + __pyx_t_7 = 0; + + /* "View.MemoryView":676 + * seen_ellipsis = False + * for idx, item in enumerate(tup): + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + */ + __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":677 + * for idx, item in enumerate(tup): + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True + */ + __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":678 + * if item is Ellipsis: + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * else: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 678, __pyx_L1_error) + __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) { + __Pyx_INCREF(__pyx_slice__169); + __Pyx_GIVEREF(__pyx_slice__169); + PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__169); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "View.MemoryView":679 + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True # <<<<<<<<<<<<<< + * else: + * result.append(slice(None)) + */ + __pyx_v_seen_ellipsis = 1; + + /* "View.MemoryView":677 + * for idx, item in enumerate(tup): + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True + */ + goto __pyx_L7; + } + + /* "View.MemoryView":681 + * seen_ellipsis = True + * else: + * result.append(slice(None)) # <<<<<<<<<<<<<< + * have_slices = True + * else: + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__169); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":682 + * else: + * result.append(slice(None)) + * have_slices = True # <<<<<<<<<<<<<< + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): + */ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":676 + * seen_ellipsis = False + * for idx, item in enumerate(tup): + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + */ + goto __pyx_L6; + } + + /* "View.MemoryView":684 + * have_slices = True + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + */ + /*else*/ { + __pyx_t_2 = PySlice_Check(__pyx_v_item); + __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0); + __pyx_t_1 = __pyx_t_10; + __pyx_L9_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":685 + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): + * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<< + * + * have_slices = have_slices or isinstance(item, slice) + */ + __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_11, 0, 0, 0); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __PYX_ERR(1, 685, __pyx_L1_error) + + /* "View.MemoryView":684 + * have_slices = True + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + */ + } + + /* "View.MemoryView":687 + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<< + * result.append(item) + * + */ + __pyx_t_10 = (__pyx_v_have_slices != 0); + if (!__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_10 = PySlice_Check(__pyx_v_item); + __pyx_t_2 = (__pyx_t_10 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_v_have_slices = __pyx_t_1; + + /* "View.MemoryView":688 + * + * have_slices = have_slices or isinstance(item, slice) + * result.append(item) # <<<<<<<<<<<<<< + * + * nslices = ndim - len(result) + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error) + } + __pyx_L6:; + + /* "View.MemoryView":675 + * have_slices = False + * seen_ellipsis = False + * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":690 + * result.append(item) + * + * nslices = ndim - len(result) # <<<<<<<<<<<<<< + * if nslices: + * result.extend([slice(None)] * nslices) + */ + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5); + + /* "View.MemoryView":691 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + __pyx_t_1 = (__pyx_v_nslices != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":692 + * nslices = ndim - len(result) + * if nslices: + * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<< + * + * return have_slices or nslices, tuple(result) + */ + __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) { + __Pyx_INCREF(__pyx_slice__169); + __Pyx_GIVEREF(__pyx_slice__169); + PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__169); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":691 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + } + + /* "View.MemoryView":694 + * result.extend([slice(None)] * nslices) + * + * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + */ + __Pyx_XDECREF(__pyx_r); + if (!__pyx_v_have_slices) { + } else { + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_L14_bool_binop_done:; + __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "View.MemoryView":662 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":696 + * return have_slices or nslices, tuple(result) + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + */ + +static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t *__pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("assert_direct_dimensions", 0); + + /* "View.MemoryView":697 + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") + */ + __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); + for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { + __pyx_t_1 = __pyx_t_3; + __pyx_v_suboffset = (__pyx_t_1[0]); + + /* "View.MemoryView":698 + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError("Indirect dimensions not supported") + * + */ + __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":699 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 699, __pyx_L1_error) + + /* "View.MemoryView":698 + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError("Indirect dimensions not supported") + * + */ + } + } + + /* "View.MemoryView":696 + * return have_slices or nslices, tuple(result) + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":706 + * + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< + * cdef int new_ndim = 0, suboffset_dim = -1, dim + * cdef bint negative_step + */ + +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { + int __pyx_v_new_ndim; + int __pyx_v_suboffset_dim; + int __pyx_v_dim; + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + __Pyx_memviewslice *__pyx_v_p_src; + struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; + __Pyx_memviewslice *__pyx_v_p_dst; + int *__pyx_v_p_suboffset_dim; + Py_ssize_t __pyx_v_start; + Py_ssize_t __pyx_v_stop; + Py_ssize_t __pyx_v_step; + int __pyx_v_have_start; + int __pyx_v_have_stop; + int __pyx_v_have_step; + PyObject *__pyx_v_index = NULL; + struct __pyx_memoryview_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + struct __pyx_memoryview_obj *__pyx_t_4; + char *__pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + __Pyx_RefNannySetupContext("memview_slice", 0); + + /* "View.MemoryView":707 + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< + * cdef bint negative_step + * cdef __Pyx_memviewslice src, dst + */ + __pyx_v_new_ndim = 0; + __pyx_v_suboffset_dim = -1; + + /* "View.MemoryView":714 + * + * + * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< + * + * cdef _memoryviewslice memviewsliceobj + */ + (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); + + /* "View.MemoryView":718 + * cdef _memoryviewslice memviewsliceobj + * + * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): + */ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) { + PyErr_SetNone(PyExc_AssertionError); + __PYX_ERR(1, 718, __pyx_L1_error) + } + } + #endif + + /* "View.MemoryView":720 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":721 + * + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview # <<<<<<<<<<<<<< + * p_src = &memviewsliceobj.from_slice + * else: + */ + if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 721, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":722 + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, &src) + */ + __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); + + /* "View.MemoryView":720 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice + */ + goto __pyx_L3; + } + + /* "View.MemoryView":724 + * p_src = &memviewsliceobj.from_slice + * else: + * slice_copy(memview, &src) # <<<<<<<<<<<<<< + * p_src = &src + * + */ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); + + /* "View.MemoryView":725 + * else: + * slice_copy(memview, &src) + * p_src = &src # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_p_src = (&__pyx_v_src); + } + __pyx_L3:; + + /* "View.MemoryView":731 + * + * + * dst.memview = p_src.memview # <<<<<<<<<<<<<< + * dst.data = p_src.data + * + */ + __pyx_t_4 = __pyx_v_p_src->memview; + __pyx_v_dst.memview = __pyx_t_4; + + /* "View.MemoryView":732 + * + * dst.memview = p_src.memview + * dst.data = p_src.data # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __pyx_v_p_src->data; + __pyx_v_dst.data = __pyx_t_5; + + /* "View.MemoryView":737 + * + * + * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< + * cdef int *p_suboffset_dim = &suboffset_dim + * cdef Py_ssize_t start, stop, step + */ + __pyx_v_p_dst = (&__pyx_v_dst); + + /* "View.MemoryView":738 + * + * cdef __Pyx_memviewslice *p_dst = &dst + * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< + * cdef Py_ssize_t start, stop, step + * cdef bint have_start, have_stop, have_step + */ + __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); + + /* "View.MemoryView":742 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * slice_memviewslice( + */ + __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { + __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 742, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error) + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error) + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + } + } else { + __pyx_t_9 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_9)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 742, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_v_dim = __pyx_t_6; + __pyx_t_6 = (__pyx_t_6 + 1); + + /* "View.MemoryView":743 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + */ + __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":747 + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<< + * 0, 0, 0, # have_{start,stop,step} + * False) + */ + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 747, __pyx_L1_error) + + /* "View.MemoryView":744 + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + */ + __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 744, __pyx_L1_error) + + /* "View.MemoryView":743 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + */ + goto __pyx_L6; + } + + /* "View.MemoryView":750 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + */ + __pyx_t_2 = (__pyx_v_index == Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":751 + * False) + * elif index is None: + * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + */ + (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; + + /* "View.MemoryView":752 + * elif index is None: + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 + */ + (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; + + /* "View.MemoryView":753 + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< + * new_ndim += 1 + * else: + */ + (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; + + /* "View.MemoryView":754 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 # <<<<<<<<<<<<<< + * else: + * start = index.start or 0 + */ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + + /* "View.MemoryView":750 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + */ + goto __pyx_L6; + } + + /* "View.MemoryView":756 + * new_ndim += 1 + * else: + * start = index.start or 0 # <<<<<<<<<<<<<< + * stop = index.stop or 0 + * step = index.step or 0 + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 756, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 756, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L7_bool_binop_done:; + __pyx_v_start = __pyx_t_10; + + /* "View.MemoryView":757 + * else: + * start = index.start or 0 + * stop = index.stop or 0 # <<<<<<<<<<<<<< + * step = index.step or 0 + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 757, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L9_bool_binop_done:; + __pyx_v_stop = __pyx_t_10; + + /* "View.MemoryView":758 + * start = index.start or 0 + * stop = index.stop or 0 + * step = index.step or 0 # <<<<<<<<<<<<<< + * + * have_start = index.start is not None + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 758, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 758, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L11_bool_binop_done:; + __pyx_v_step = __pyx_t_10; + + /* "View.MemoryView":760 + * step = index.step or 0 + * + * have_start = index.start is not None # <<<<<<<<<<<<<< + * have_stop = index.stop is not None + * have_step = index.step is not None + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_start = __pyx_t_1; + + /* "View.MemoryView":761 + * + * have_start = index.start is not None + * have_stop = index.stop is not None # <<<<<<<<<<<<<< + * have_step = index.step is not None + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_stop = __pyx_t_1; + + /* "View.MemoryView":762 + * have_start = index.start is not None + * have_stop = index.stop is not None + * have_step = index.step is not None # <<<<<<<<<<<<<< + * + * slice_memviewslice( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_step = __pyx_t_1; + + /* "View.MemoryView":764 + * have_step = index.step is not None + * + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + */ + __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 764, __pyx_L1_error) + + /* "View.MemoryView":770 + * have_start, have_stop, have_step, + * True) + * new_ndim += 1 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): + */ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + } + __pyx_L6:; + + /* "View.MemoryView":742 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * slice_memviewslice( + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":772 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":773 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "View.MemoryView":774 + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< + * memviewsliceobj.to_dtype_func, + * memview.dtype_is_object) + */ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 774, __pyx_L1_error) } + + /* "View.MemoryView":775 + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * else: + */ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 775, __pyx_L1_error) } + + /* "View.MemoryView":773 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, + */ + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 773, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":772 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + */ + } + + /* "View.MemoryView":778 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * + */ + /*else*/ { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "View.MemoryView":779 + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "View.MemoryView":778 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * + */ + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 778, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":706 + * + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< + * cdef int new_ndim = 0, suboffset_dim = -1, dim + * cdef bint negative_step + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":803 + * + * @cname('__pyx_memoryview_slice_memviewslice') + * cdef int slice_memviewslice( # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, + */ + +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { + Py_ssize_t __pyx_v_new_shape; + int __pyx_v_negative_step; + int __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":823 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: + */ + __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":825 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: + */ + __pyx_t_1 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":826 + * + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if not 0 <= start < shape: + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + */ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":825 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: + */ + } + + /* "View.MemoryView":827 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + * else: + */ + __pyx_t_1 = (0 <= __pyx_v_start); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); + } + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":828 + * start += shape + * if not 0 <= start < shape: + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 828, __pyx_L1_error) + + /* "View.MemoryView":827 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + * else: + */ + } + + /* "View.MemoryView":823 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":831 + * else: + * + * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<< + * + * if have_step and step == 0: + */ + /*else*/ { + __pyx_t_1 = ((__pyx_v_have_step != 0) != 0); + if (__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_1 = ((__pyx_v_step < 0) != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L6_bool_binop_done:; + __pyx_v_negative_step = __pyx_t_2; + + /* "View.MemoryView":833 + * negative_step = have_step != 0 and step < 0 + * + * if have_step and step == 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) + * + */ + __pyx_t_1 = (__pyx_v_have_step != 0); + if (__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_1 = ((__pyx_v_step == 0) != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + if (__pyx_t_2) { + + /* "View.MemoryView":834 + * + * if have_step and step == 0: + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error) + + /* "View.MemoryView":833 + * negative_step = have_step != 0 and step < 0 + * + * if have_step and step == 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) + * + */ + } + + /* "View.MemoryView":837 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + __pyx_t_2 = (__pyx_v_have_start != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":838 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: + */ + __pyx_t_2 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":839 + * if have_start: + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if start < 0: + * start = 0 + */ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":840 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: + */ + __pyx_t_2 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":841 + * start += shape + * if start < 0: + * start = 0 # <<<<<<<<<<<<<< + * elif start >= shape: + * if negative_step: + */ + __pyx_v_start = 0; + + /* "View.MemoryView":840 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: + */ + } + + /* "View.MemoryView":838 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: + */ + goto __pyx_L12; + } + + /* "View.MemoryView":842 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 + */ + __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":843 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":844 + * elif start >= shape: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = shape + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":843 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L14; + } + + /* "View.MemoryView":846 + * start = shape - 1 + * else: + * start = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + /*else*/ { + __pyx_v_start = __pyx_v_shape; + } + __pyx_L14:; + + /* "View.MemoryView":842 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 + */ + } + __pyx_L12:; + + /* "View.MemoryView":837 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + goto __pyx_L11; + } + + /* "View.MemoryView":848 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":849 + * else: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = 0 + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":848 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L15; + } + + /* "View.MemoryView":851 + * start = shape - 1 + * else: + * start = 0 # <<<<<<<<<<<<<< + * + * if have_stop: + */ + /*else*/ { + __pyx_v_start = 0; + } + __pyx_L15:; + } + __pyx_L11:; + + /* "View.MemoryView":853 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + __pyx_t_2 = (__pyx_v_have_stop != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":854 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: + */ + __pyx_t_2 = ((__pyx_v_stop < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":855 + * if have_stop: + * if stop < 0: + * stop += shape # <<<<<<<<<<<<<< + * if stop < 0: + * stop = 0 + */ + __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); + + /* "View.MemoryView":856 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: + */ + __pyx_t_2 = ((__pyx_v_stop < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":857 + * stop += shape + * if stop < 0: + * stop = 0 # <<<<<<<<<<<<<< + * elif stop > shape: + * stop = shape + */ + __pyx_v_stop = 0; + + /* "View.MemoryView":856 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: + */ + } + + /* "View.MemoryView":854 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: + */ + goto __pyx_L17; + } + + /* "View.MemoryView":858 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: + */ + __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":859 + * stop = 0 + * elif stop > shape: + * stop = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + __pyx_v_stop = __pyx_v_shape; + + /* "View.MemoryView":858 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: + */ + } + __pyx_L17:; + + /* "View.MemoryView":853 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + goto __pyx_L16; + } + + /* "View.MemoryView":861 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":862 + * else: + * if negative_step: + * stop = -1 # <<<<<<<<<<<<<< + * else: + * stop = shape + */ + __pyx_v_stop = -1L; + + /* "View.MemoryView":861 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + goto __pyx_L19; + } + + /* "View.MemoryView":864 + * stop = -1 + * else: + * stop = shape # <<<<<<<<<<<<<< + * + * if not have_step: + */ + /*else*/ { + __pyx_v_stop = __pyx_v_shape; + } + __pyx_L19:; + } + __pyx_L16:; + + /* "View.MemoryView":866 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":867 + * + * if not have_step: + * step = 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_step = 1; + + /* "View.MemoryView":866 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + } + + /* "View.MemoryView":871 + * + * with cython.cdivision(True): + * new_shape = (stop - start) // step # <<<<<<<<<<<<<< + * + * if (stop - start) - step * new_shape: + */ + __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); + + /* "View.MemoryView":873 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * + */ + __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":874 + * + * if (stop - start) - step * new_shape: + * new_shape += 1 # <<<<<<<<<<<<<< + * + * if new_shape < 0: + */ + __pyx_v_new_shape = (__pyx_v_new_shape + 1); + + /* "View.MemoryView":873 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * + */ + } + + /* "View.MemoryView":876 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * + */ + __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":877 + * + * if new_shape < 0: + * new_shape = 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_new_shape = 0; + + /* "View.MemoryView":876 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * + */ + } + + /* "View.MemoryView":880 + * + * + * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset + */ + (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); + + /* "View.MemoryView":881 + * + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< + * dst.suboffsets[new_ndim] = suboffset + * + */ + (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; + + /* "View.MemoryView":882 + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; + } + __pyx_L3:; + + /* "View.MemoryView":885 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: + */ + __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":886 + * + * if suboffset_dim[0] < 0: + * dst.data += start * stride # <<<<<<<<<<<<<< + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride + */ + __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); + + /* "View.MemoryView":885 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: + */ + goto __pyx_L23; + } + + /* "View.MemoryView":888 + * dst.data += start * stride + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< + * + * if suboffset >= 0: + */ + /*else*/ { + __pyx_t_3 = (__pyx_v_suboffset_dim[0]); + (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); + } + __pyx_L23:; + + /* "View.MemoryView":890 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: + */ + __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":891 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset + */ + __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":892 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: + */ + __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":893 + * if not is_slice: + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " + */ + __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":892 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: + */ + goto __pyx_L26; + } + + /* "View.MemoryView":895 + * dst.data = ( dst.data)[0] + suboffset + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< + * "must be indexed and not sliced", dim) + * else: + */ + /*else*/ { + + /* "View.MemoryView":896 + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " + * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< + * else: + * suboffset_dim[0] = new_ndim + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 895, __pyx_L1_error) + } + __pyx_L26:; + + /* "View.MemoryView":891 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset + */ + goto __pyx_L25; + } + + /* "View.MemoryView":898 + * "must be indexed and not sliced", dim) + * else: + * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< + * + * return 0 + */ + /*else*/ { + (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; + } + __pyx_L25:; + + /* "View.MemoryView":890 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: + */ + } + + /* "View.MemoryView":900 + * suboffset_dim[0] = new_ndim + * + * return 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":803 + * + * @cname('__pyx_memoryview_slice_memviewslice') + * cdef int slice_memviewslice( # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":906 + * + * @cname('__pyx_pybuffer_index') + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + */ + +static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_suboffset; + Py_ssize_t __pyx_v_itemsize; + char *__pyx_v_resultp; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("pybuffer_index", 0); + + /* "View.MemoryView":908 + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< + * cdef Py_ssize_t itemsize = view.itemsize + * cdef char *resultp + */ + __pyx_v_suboffset = -1L; + + /* "View.MemoryView":909 + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< + * cdef char *resultp + * + */ + __pyx_t_1 = __pyx_v_view->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":912 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len / itemsize + * stride = itemsize + */ + __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":913 + * + * if view.ndim == 0: + * shape = view.len / itemsize # <<<<<<<<<<<<<< + * stride = itemsize + * else: + */ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 913, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 913, __pyx_L1_error) + } + __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); + + /* "View.MemoryView":914 + * if view.ndim == 0: + * shape = view.len / itemsize + * stride = itemsize # <<<<<<<<<<<<<< + * else: + * shape = view.shape[dim] + */ + __pyx_v_stride = __pyx_v_itemsize; + + /* "View.MemoryView":912 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len / itemsize + * stride = itemsize + */ + goto __pyx_L3; + } + + /* "View.MemoryView":916 + * stride = itemsize + * else: + * shape = view.shape[dim] # <<<<<<<<<<<<<< + * stride = view.strides[dim] + * if view.suboffsets != NULL: + */ + /*else*/ { + __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); + + /* "View.MemoryView":917 + * else: + * shape = view.shape[dim] + * stride = view.strides[dim] # <<<<<<<<<<<<<< + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] + */ + __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); + + /* "View.MemoryView":918 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * + */ + __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":919 + * stride = view.strides[dim] + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< + * + * if index < 0: + */ + __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); + + /* "View.MemoryView":918 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * + */ + } + } + __pyx_L3:; + + /* "View.MemoryView":921 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: + */ + __pyx_t_2 = ((__pyx_v_index < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":922 + * + * if index < 0: + * index += view.shape[dim] # <<<<<<<<<<<<<< + * if index < 0: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + */ + __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); + + /* "View.MemoryView":923 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + __pyx_t_2 = ((__pyx_v_index < 0) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":924 + * index += view.shape[dim] + * if index < 0: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< + * + * if index >= shape: + */ + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 924, __pyx_L1_error) + + /* "View.MemoryView":923 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + } + + /* "View.MemoryView":921 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: + */ + } + + /* "View.MemoryView":926 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":927 + * + * if index >= shape: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< + * + * resultp = bufp + index * stride + */ + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 927, __pyx_L1_error) + + /* "View.MemoryView":926 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + } + + /* "View.MemoryView":929 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * resultp = bufp + index * stride # <<<<<<<<<<<<<< + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset + */ + __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); + + /* "View.MemoryView":930 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * + */ + __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":931 + * resultp = bufp + index * stride + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< + * + * return resultp + */ + __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":930 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * + */ + } + + /* "View.MemoryView":933 + * resultp = ( resultp)[0] + suboffset + * + * return resultp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_resultp; + goto __pyx_L0; + + /* "View.MemoryView":906 + * + * @cname('__pyx_pybuffer_index') + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":939 + * + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< + * cdef int ndim = memslice.memview.view.ndim + * + */ + +static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { + int __pyx_v_ndim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + int __pyx_v_i; + int __pyx_v_j; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + long __pyx_t_3; + long __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + + /* "View.MemoryView":940 + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: + * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< + * + * cdef Py_ssize_t *shape = memslice.shape + */ + __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; + __pyx_v_ndim = __pyx_t_1; + + /* "View.MemoryView":942 + * cdef int ndim = memslice.memview.view.ndim + * + * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< + * cdef Py_ssize_t *strides = memslice.strides + * + */ + __pyx_t_2 = __pyx_v_memslice->shape; + __pyx_v_shape = __pyx_t_2; + + /* "View.MemoryView":943 + * + * cdef Py_ssize_t *shape = memslice.shape + * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = __pyx_v_memslice->strides; + __pyx_v_strides = __pyx_t_2; + + /* "View.MemoryView":947 + * + * cdef int i, j + * for i in range(ndim / 2): # <<<<<<<<<<<<<< + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + */ + __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2); + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":948 + * cdef int i, j + * for i in range(ndim / 2): + * j = ndim - 1 - i # <<<<<<<<<<<<<< + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] + */ + __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); + + /* "View.MemoryView":949 + * for i in range(ndim / 2): + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< + * shape[i], shape[j] = shape[j], shape[i] + * + */ + __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); + __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); + (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; + (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; + + /* "View.MemoryView":950 + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + */ + __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); + __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); + (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; + (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; + + /* "View.MemoryView":952 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + */ + __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0); + __pyx_t_7 = __pyx_t_8; + __pyx_L6_bool_binop_done:; + if (__pyx_t_7) { + + /* "View.MemoryView":953 + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< + * + * return 1 + */ + __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 953, __pyx_L1_error) + + /* "View.MemoryView":952 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + */ + } + } + + /* "View.MemoryView":955 + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + * return 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "View.MemoryView":939 + * + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< + * cdef int ndim = memslice.memview.view.ndim + * + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":972 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + */ + +/* Python wrapper */ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":973 + * + * def __dealloc__(self): + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): + */ + __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1); + + /* "View.MemoryView":972 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":975 + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) + */ + +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":976 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: + */ + __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":977 + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) # <<<<<<<<<<<<<< + * else: + * return memoryview.convert_item_to_object(self, itemp) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":976 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: + */ + } + + /* "View.MemoryView":979 + * return self.to_object_func(itemp) + * else: + * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":975 + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":981 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) + */ + +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":982 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: + */ + __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":983 + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< + * else: + * memoryview.assign_item_from_object(self, itemp, value) + */ + __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 983, __pyx_L1_error) + + /* "View.MemoryView":982 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":985 + * self.to_dtype_func(itemp, value) + * else: + * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< + * + * @property + */ + /*else*/ { + __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":981 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":988 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":989 + * @property + * def base(self): + * return self.from_object # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->from_object); + __pyx_r = __pyx_v_self->from_object; + goto __pyx_L0; + + /* "View.MemoryView":988 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":995 + * + * @cname('__pyx_memoryview_fromslice') + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< + * int ndim, + * object (*to_object_func)(char *), + */ + +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_TypeInfo *__pyx_t_4; + Py_buffer __pyx_t_5; + Py_ssize_t *__pyx_t_6; + Py_ssize_t *__pyx_t_7; + Py_ssize_t *__pyx_t_8; + Py_ssize_t __pyx_t_9; + __Pyx_RefNannySetupContext("memoryview_fromslice", 0); + + /* "View.MemoryView":1003 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1004 + * + * if memviewslice.memview == Py_None: + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "View.MemoryView":1003 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "View.MemoryView":1009 + * + * + * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<< + * + * result.from_slice = memviewslice + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1011 + * result = _memoryviewslice(None, 0, dtype_is_object) + * + * result.from_slice = memviewslice # <<<<<<<<<<<<<< + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + */ + __pyx_v_result->from_slice = __pyx_v_memviewslice; + + /* "View.MemoryView":1012 + * + * result.from_slice = memviewslice + * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< + * + * result.from_object = ( memviewslice.memview).base + */ + __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); + + /* "View.MemoryView":1014 + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + * result.from_object = ( memviewslice.memview).base # <<<<<<<<<<<<<< + * result.typeinfo = memviewslice.memview.typeinfo + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_result->from_object); + __Pyx_DECREF(__pyx_v_result->from_object); + __pyx_v_result->from_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":1015 + * + * result.from_object = ( memviewslice.memview).base + * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< + * + * result.view = memviewslice.memview.view + */ + __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; + __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; + + /* "View.MemoryView":1017 + * result.typeinfo = memviewslice.memview.typeinfo + * + * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + */ + __pyx_t_5 = __pyx_v_memviewslice.memview->view; + __pyx_v_result->__pyx_base.view = __pyx_t_5; + + /* "View.MemoryView":1018 + * + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + */ + __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); + + /* "View.MemoryView":1019 + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data + * result.view.ndim = ndim # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) + */ + __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; + + /* "View.MemoryView":1020 + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; + + /* "View.MemoryView":1021 + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":1023 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: + */ + __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1024 + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< + * else: + * result.flags = PyBUF_RECORDS_RO + */ + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; + + /* "View.MemoryView":1023 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":1026 + * result.flags = PyBUF_RECORDS + * else: + * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< + * + * result.view.shape = result.from_slice.shape + */ + /*else*/ { + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; + } + __pyx_L4:; + + /* "View.MemoryView":1028 + * result.flags = PyBUF_RECORDS_RO + * + * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< + * result.view.strides = result.from_slice.strides + * + */ + __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); + + /* "View.MemoryView":1029 + * + * result.view.shape = result.from_slice.shape + * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); + + /* "View.MemoryView":1032 + * + * + * result.view.suboffsets = NULL # <<<<<<<<<<<<<< + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + */ + __pyx_v_result->__pyx_base.view.suboffsets = NULL; + + /* "View.MemoryView":1033 + * + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + */ + __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_v_suboffset = (__pyx_t_6[0]); + + /* "View.MemoryView":1034 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break + */ + __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1035 + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); + + /* "View.MemoryView":1036 + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + * break # <<<<<<<<<<<<<< + * + * result.view.len = result.view.itemsize + */ + goto __pyx_L6_break; + + /* "View.MemoryView":1034 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break + */ + } + } + __pyx_L6_break:; + + /* "View.MemoryView":1038 + * break + * + * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< + * for length in result.view.shape[:ndim]: + * result.view.len *= length + */ + __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + + /* "View.MemoryView":1039 + * + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< + * result.view.len *= length + * + */ + __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1040 + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: + * result.view.len *= length # <<<<<<<<<<<<<< + * + * result.to_object_func = to_object_func + */ + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + } + + /* "View.MemoryView":1042 + * result.view.len *= length + * + * result.to_object_func = to_object_func # <<<<<<<<<<<<<< + * result.to_dtype_func = to_dtype_func + * + */ + __pyx_v_result->to_object_func = __pyx_v_to_object_func; + + /* "View.MemoryView":1043 + * + * result.to_object_func = to_object_func + * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< + * + * return result + */ + __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; + + /* "View.MemoryView":1045 + * result.to_dtype_func = to_dtype_func + * + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":995 + * + * @cname('__pyx_memoryview_fromslice') + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< + * int ndim, + * object (*to_object_func)(char *), + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1048 + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + */ + +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { + struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; + __Pyx_memviewslice *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("get_slice_from_memview", 0); + + /* "View.MemoryView":1051 + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1052 + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): + * obj = memview # <<<<<<<<<<<<<< + * return &obj.from_slice + * else: + */ + if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1052, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":1053 + * if isinstance(memview, _memoryviewslice): + * obj = memview + * return &obj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, mslice) + */ + __pyx_r = (&__pyx_v_obj->from_slice); + goto __pyx_L0; + + /* "View.MemoryView":1051 + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice + */ + } + + /* "View.MemoryView":1055 + * return &obj.from_slice + * else: + * slice_copy(memview, mslice) # <<<<<<<<<<<<<< + * return mslice + * + */ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); + + /* "View.MemoryView":1056 + * else: + * slice_copy(memview, mslice) + * return mslice # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_slice_copy') + */ + __pyx_r = __pyx_v_mslice; + goto __pyx_L0; + } + + /* "View.MemoryView":1048 + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1059 + * + * @cname('__pyx_memoryview_slice_copy') + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< + * cdef int dim + * cdef (Py_ssize_t*) shape, strides, suboffsets + */ + +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { + int __pyx_v_dim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + Py_ssize_t *__pyx_v_suboffsets; + __Pyx_RefNannyDeclarations + Py_ssize_t *__pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + __Pyx_RefNannySetupContext("slice_copy", 0); + + /* "View.MemoryView":1063 + * cdef (Py_ssize_t*) shape, strides, suboffsets + * + * shape = memview.view.shape # <<<<<<<<<<<<<< + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets + */ + __pyx_t_1 = __pyx_v_memview->view.shape; + __pyx_v_shape = __pyx_t_1; + + /* "View.MemoryView":1064 + * + * shape = memview.view.shape + * strides = memview.view.strides # <<<<<<<<<<<<<< + * suboffsets = memview.view.suboffsets + * + */ + __pyx_t_1 = __pyx_v_memview->view.strides; + __pyx_v_strides = __pyx_t_1; + + /* "View.MemoryView":1065 + * shape = memview.view.shape + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< + * + * dst.memview = <__pyx_memoryview *> memview + */ + __pyx_t_1 = __pyx_v_memview->view.suboffsets; + __pyx_v_suboffsets = __pyx_t_1; + + /* "View.MemoryView":1067 + * suboffsets = memview.view.suboffsets + * + * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< + * dst.data = memview.view.buf + * + */ + __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); + + /* "View.MemoryView":1068 + * + * dst.memview = <__pyx_memoryview *> memview + * dst.data = memview.view.buf # <<<<<<<<<<<<<< + * + * for dim in range(memview.view.ndim): + */ + __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); + + /* "View.MemoryView":1070 + * dst.data = memview.view.buf + * + * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + */ + __pyx_t_2 = __pyx_v_memview->view.ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_dim = __pyx_t_4; + + /* "View.MemoryView":1071 + * + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + */ + (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); + + /* "View.MemoryView":1072 + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + */ + (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); + + /* "View.MemoryView":1073 + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object') + */ + if ((__pyx_v_suboffsets != 0)) { + __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); + } else { + __pyx_t_5 = -1L; + } + (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; + } + + /* "View.MemoryView":1059 + * + * @cname('__pyx_memoryview_slice_copy') + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< + * cdef int dim + * cdef (Py_ssize_t*) shape, strides, suboffsets + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":1076 + * + * @cname('__pyx_memoryview_copy_object') + * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + */ + +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { + __Pyx_memviewslice __pyx_v_memviewslice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("memoryview_copy", 0); + + /* "View.MemoryView":1079 + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< + * return memoryview_copy_from_slice(memview, &memviewslice) + * + */ + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); + + /* "View.MemoryView":1080 + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) + * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object_from_slice') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1076 + * + * @cname('__pyx_memoryview_copy_object') + * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1083 + * + * @cname('__pyx_memoryview_copy_object_from_slice') + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< + * """ + * Create a new memoryview object from a given memoryview object and slice. + */ + +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { + PyObject *(*__pyx_v_to_object_func)(char *); + int (*__pyx_v_to_dtype_func)(char *, PyObject *); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *(*__pyx_t_3)(char *); + int (*__pyx_t_4)(char *, PyObject *); + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); + + /* "View.MemoryView":1090 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1091 + * + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + */ + __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; + __pyx_v_to_object_func = __pyx_t_3; + + /* "View.MemoryView":1092 + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< + * else: + * to_object_func = NULL + */ + __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; + __pyx_v_to_dtype_func = __pyx_t_4; + + /* "View.MemoryView":1090 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1094 + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + * to_object_func = NULL # <<<<<<<<<<<<<< + * to_dtype_func = NULL + * + */ + /*else*/ { + __pyx_v_to_object_func = NULL; + + /* "View.MemoryView":1095 + * else: + * to_object_func = NULL + * to_dtype_func = NULL # <<<<<<<<<<<<<< + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + */ + __pyx_v_to_dtype_func = NULL; + } + __pyx_L3:; + + /* "View.MemoryView":1097 + * to_dtype_func = NULL + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< + * to_object_func, to_dtype_func, + * memview.dtype_is_object) + */ + __Pyx_XDECREF(__pyx_r); + + /* "View.MemoryView":1099 + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + * to_object_func, to_dtype_func, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1083 + * + * @cname('__pyx_memoryview_copy_object_from_slice') + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< + * """ + * Create a new memoryview object from a given memoryview object and slice. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1105 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< + * if arg < 0: + * return -arg + */ + +static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { + Py_ssize_t __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":1106 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: # <<<<<<<<<<<<<< + * return -arg + * else: + */ + __pyx_t_1 = ((__pyx_v_arg < 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1107 + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: + * return -arg # <<<<<<<<<<<<<< + * else: + * return arg + */ + __pyx_r = (-__pyx_v_arg); + goto __pyx_L0; + + /* "View.MemoryView":1106 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: # <<<<<<<<<<<<<< + * return -arg + * else: + */ + } + + /* "View.MemoryView":1109 + * return -arg + * else: + * return arg # <<<<<<<<<<<<<< + * + * @cname('__pyx_get_best_slice_order') + */ + /*else*/ { + __pyx_r = __pyx_v_arg; + goto __pyx_L0; + } + + /* "View.MemoryView":1105 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< + * if arg < 0: + * return -arg + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1112 + * + * @cname('__pyx_get_best_slice_order') + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< + * """ + * Figure out the best memory access order for a given slice. + */ + +static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_c_stride; + Py_ssize_t __pyx_v_f_stride; + char __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1117 + * """ + * cdef int i + * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< + * cdef Py_ssize_t f_stride = 0 + * + */ + __pyx_v_c_stride = 0; + + /* "View.MemoryView":1118 + * cdef int i + * cdef Py_ssize_t c_stride = 0 + * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): + */ + __pyx_v_f_stride = 0; + + /* "View.MemoryView":1120 + * cdef Py_ssize_t f_stride = 0 + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + */ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1121 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break + */ + __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1122 + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1123 + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + goto __pyx_L4_break; + + /* "View.MemoryView":1121 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L4_break:; + + /* "View.MemoryView":1125 + * break + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + */ + __pyx_t_1 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_1; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1126 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break + */ + __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1127 + * for i in range(ndim): + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1128 + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + */ + goto __pyx_L7_break; + + /* "View.MemoryView":1126 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L7_break:; + + /* "View.MemoryView":1130 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: + */ + __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1131 + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + * return 'C' # <<<<<<<<<<<<<< + * else: + * return 'F' + */ + __pyx_r = 'C'; + goto __pyx_L0; + + /* "View.MemoryView":1130 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: + */ + } + + /* "View.MemoryView":1133 + * return 'C' + * else: + * return 'F' # <<<<<<<<<<<<<< + * + * @cython.cdivision(True) + */ + /*else*/ { + __pyx_r = 'F'; + goto __pyx_L0; + } + + /* "View.MemoryView":1112 + * + * @cname('__pyx_get_best_slice_order') + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< + * """ + * Figure out the best memory access order for a given slice. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1136 + * + * @cython.cdivision(True) + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< + * char *dst_data, Py_ssize_t *dst_strides, + * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, + */ + +static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; + Py_ssize_t __pyx_v_dst_extent; + Py_ssize_t __pyx_v_src_stride; + Py_ssize_t __pyx_v_dst_stride; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + + /* "View.MemoryView":1143 + * + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + */ + __pyx_v_src_extent = (__pyx_v_src_shape[0]); + + /* "View.MemoryView":1144 + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] + */ + __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); + + /* "View.MemoryView":1145 + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + */ + __pyx_v_src_stride = (__pyx_v_src_strides[0]); + + /* "View.MemoryView":1146 + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: + */ + __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + */ + __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + + /* "View.MemoryView":1150 + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + */ + __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); + if (__pyx_t_2) { + __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); + } + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + if (__pyx_t_1) { + + /* "View.MemoryView":1151 + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): + */ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + goto __pyx_L4; + } + + /* "View.MemoryView":1153 + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + */ + /*else*/ { + __pyx_t_4 = __pyx_v_dst_extent; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1154 + * else: + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< + * src_data += src_stride + * dst_data += dst_stride + */ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); + + /* "View.MemoryView":1155 + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * else: + */ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1156 + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): + */ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L4:; + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1158 + * dst_data += dst_stride + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * _copy_strided_to_strided(src_data, src_strides + 1, + * dst_data, dst_strides + 1, + */ + /*else*/ { + __pyx_t_4 = __pyx_v_dst_extent; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1159 + * else: + * for i in range(dst_extent): + * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< + * dst_data, dst_strides + 1, + * src_shape + 1, dst_shape + 1, + */ + _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); + + /* "View.MemoryView":1163 + * src_shape + 1, dst_shape + 1, + * ndim - 1, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * + */ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1164 + * ndim - 1, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, + */ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1136 + * + * @cython.cdivision(True) + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< + * char *dst_data, Py_ssize_t *dst_strides, + * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, + */ + + /* function exit code */ +} + +/* "View.MemoryView":1166 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + */ + +static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + + /* "View.MemoryView":1169 + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< + * src.shape, dst.shape, ndim, itemsize) + * + */ + _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1166 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1173 + * + * @cname('__pyx_memoryview_slice_get_size') + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + */ + +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_size; + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1176 + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + * cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_size = __pyx_t_1; + + /* "View.MemoryView":1178 + * cdef Py_ssize_t size = src.memview.view.itemsize + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * size *= src.shape[i] + * + */ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1179 + * + * for i in range(ndim): + * size *= src.shape[i] # <<<<<<<<<<<<<< + * + * return size + */ + __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i])); + } + + /* "View.MemoryView":1181 + * size *= src.shape[i] + * + * return size # <<<<<<<<<<<<<< + * + * @cname('__pyx_fill_contig_strides_array') + */ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "View.MemoryView":1173 + * + * @cname('__pyx_memoryview_slice_get_size') + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1184 + * + * @cname('__pyx_fill_contig_strides_array') + * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, + * int ndim, char order) nogil: + */ + +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { + int __pyx_v_idx; + Py_ssize_t __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1193 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride + */ + __pyx_t_1 = ((__pyx_v_order == 'F') != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1194 + * + * if order == 'F': + * for idx in range(ndim): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride = stride * shape[idx] + */ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_idx = __pyx_t_4; + + /* "View.MemoryView":1195 + * if order == 'F': + * for idx in range(ndim): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride = stride * shape[idx] + * else: + */ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1196 + * for idx in range(ndim): + * strides[idx] = stride + * stride = stride * shape[idx] # <<<<<<<<<<<<<< + * else: + * for idx in range(ndim - 1, -1, -1): + */ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + + /* "View.MemoryView":1193 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1198 + * stride = stride * shape[idx] + * else: + * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride = stride * shape[idx] + */ + /*else*/ { + for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { + __pyx_v_idx = __pyx_t_2; + + /* "View.MemoryView":1199 + * else: + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride = stride * shape[idx] + * + */ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1200 + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride + * stride = stride * shape[idx] # <<<<<<<<<<<<<< + * + * return stride + */ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + } + __pyx_L3:; + + /* "View.MemoryView":1202 + * stride = stride * shape[idx] + * + * return stride # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_data_to_temp') + */ + __pyx_r = __pyx_v_stride; + goto __pyx_L0; + + /* "View.MemoryView":1184 + * + * @cname('__pyx_fill_contig_strides_array') + * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, + * int ndim, char order) nogil: + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1205 + * + * @cname('__pyx_memoryview_copy_data_to_temp') + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *tmpslice, + * char order, + */ + +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { + int __pyx_v_i; + void *__pyx_v_result; + size_t __pyx_v_itemsize; + size_t __pyx_v_size; + void *__pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + struct __pyx_memoryview_obj *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + + /* "View.MemoryView":1216 + * cdef void *result + * + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef size_t size = slice_get_size(src, ndim) + * + */ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1217 + * + * cdef size_t itemsize = src.memview.view.itemsize + * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< + * + * result = malloc(size) + */ + __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); + + /* "View.MemoryView":1219 + * cdef size_t size = slice_get_size(src, ndim) + * + * result = malloc(size) # <<<<<<<<<<<<<< + * if not result: + * _err(MemoryError, NULL) + */ + __pyx_v_result = malloc(__pyx_v_size); + + /* "View.MemoryView":1220 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1221 + * result = malloc(size) + * if not result: + * _err(MemoryError, NULL) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error) + + /* "View.MemoryView":1220 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + } + + /* "View.MemoryView":1224 + * + * + * tmpslice.data = result # <<<<<<<<<<<<<< + * tmpslice.memview = src.memview + * for i in range(ndim): + */ + __pyx_v_tmpslice->data = ((char *)__pyx_v_result); + + /* "View.MemoryView":1225 + * + * tmpslice.data = result + * tmpslice.memview = src.memview # <<<<<<<<<<<<<< + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + */ + __pyx_t_4 = __pyx_v_src->memview; + __pyx_v_tmpslice->memview = __pyx_t_4; + + /* "View.MemoryView":1226 + * tmpslice.data = result + * tmpslice.memview = src.memview + * for i in range(ndim): # <<<<<<<<<<<<<< + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 + */ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1227 + * tmpslice.memview = src.memview + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< + * tmpslice.suboffsets[i] = -1 + * + */ + (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); + + /* "View.MemoryView":1228 + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, + */ + (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1230 + * tmpslice.suboffsets[i] = -1 + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<< + * ndim, order) + * + */ + (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); + + /* "View.MemoryView":1234 + * + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 + */ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * + */ + __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1236 + * for i in range(ndim): + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< + * + * if slice_is_contig(src[0], order, ndim): + */ + (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * + */ + } + } + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1239 + * + * if slice_is_contig(src[0], order, ndim): + * memcpy(result, src.data, size) # <<<<<<<<<<<<<< + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + */ + (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + goto __pyx_L9; + } + + /* "View.MemoryView":1241 + * memcpy(result, src.data, size) + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< + * + * return result + */ + /*else*/ { + copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); + } + __pyx_L9:; + + /* "View.MemoryView":1243 + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":1205 + * + * @cname('__pyx_memoryview_copy_data_to_temp') + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *tmpslice, + * char order, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = NULL; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1248 + * + * @cname('__pyx_memoryview_err_extents') + * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + */ + +static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_extents", 0); + + /* "View.MemoryView":1251 + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + * (i, extent1, extent2)) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_dim') + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + + /* "View.MemoryView":1250 + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<< + * (i, extent1, extent2)) + * + */ + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 1250, __pyx_L1_error) + + /* "View.MemoryView":1248 + * + * @cname('__pyx_memoryview_err_extents') + * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1254 + * + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii') % dim) + * + */ + +static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_dim", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1255 + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: + * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err') + */ + __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_v_error); + __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 1255, __pyx_L1_error) + + /* "View.MemoryView":1254 + * + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii') % dim) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_error); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1258 + * + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< + * if msg != NULL: + * raise error(msg.decode('ascii')) + */ + +static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1259 + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii')) + * else: + */ + __pyx_t_1 = ((__pyx_v_msg != NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":1260 + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: + * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<< + * else: + * raise error + */ + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_error); + __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 1260, __pyx_L1_error) + + /* "View.MemoryView":1259 + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii')) + * else: + */ + } + + /* "View.MemoryView":1262 + * raise error(msg.decode('ascii')) + * else: + * raise error # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_contents') + */ + /*else*/ { + __Pyx_Raise(__pyx_v_error, 0, 0, 0); + __PYX_ERR(1, 1262, __pyx_L1_error) + } + + /* "View.MemoryView":1258 + * + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< + * if msg != NULL: + * raise error(msg.decode('ascii')) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_error); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1265 + * + * @cname('__pyx_memoryview_copy_contents') + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice dst, + * int src_ndim, int dst_ndim, + */ + +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { + void *__pyx_v_tmpdata; + size_t __pyx_v_itemsize; + int __pyx_v_i; + char __pyx_v_order; + int __pyx_v_broadcasting; + int __pyx_v_direct_copy; + __Pyx_memviewslice __pyx_v_tmp; + int __pyx_v_ndim; + int __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + void *__pyx_t_7; + int __pyx_t_8; + + /* "View.MemoryView":1273 + * Check for overlapping memory and verify the shapes. + * """ + * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + */ + __pyx_v_tmpdata = NULL; + + /* "View.MemoryView":1274 + * """ + * cdef void *tmpdata = NULL + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + */ + __pyx_t_1 = __pyx_v_src.memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1276 + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< + * cdef bint broadcasting = False + * cdef bint direct_copy = False + */ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); + + /* "View.MemoryView":1277 + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False # <<<<<<<<<<<<<< + * cdef bint direct_copy = False + * cdef __Pyx_memviewslice tmp + */ + __pyx_v_broadcasting = 0; + + /* "View.MemoryView":1278 + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False + * cdef bint direct_copy = False # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice tmp + * + */ + __pyx_v_direct_copy = 0; + + /* "View.MemoryView":1281 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + */ + __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1282 + * + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) + */ + __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); + + /* "View.MemoryView":1281 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1283 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + */ + __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1284 + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< + * + * cdef int ndim = max(src_ndim, dst_ndim) + */ + __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); + + /* "View.MemoryView":1283 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + */ + } + __pyx_L3:; + + /* "View.MemoryView":1286 + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + __pyx_t_3 = __pyx_v_dst_ndim; + __pyx_t_4 = __pyx_v_src_ndim; + if (((__pyx_t_3 > __pyx_t_4) != 0)) { + __pyx_t_5 = __pyx_t_3; + } else { + __pyx_t_5 = __pyx_t_4; + } + __pyx_v_ndim = __pyx_t_5; + + /* "View.MemoryView":1288 + * cdef int ndim = max(src_ndim, dst_ndim) + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + */ + __pyx_t_5 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_5; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1289 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True + */ + __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1290 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 + */ + __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1291 + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + * broadcasting = True # <<<<<<<<<<<<<< + * src.strides[i] = 0 + * else: + */ + __pyx_v_broadcasting = 1; + + /* "View.MemoryView":1292 + * if src.shape[i] == 1: + * broadcasting = True + * src.strides[i] = 0 # <<<<<<<<<<<<<< + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) + */ + (__pyx_v_src.strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1290 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 + */ + goto __pyx_L7; + } + + /* "View.MemoryView":1294 + * src.strides[i] = 0 + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< + * + * if src.suboffsets[i] >= 0: + */ + /*else*/ { + __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":1289 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True + */ + } + + /* "View.MemoryView":1296 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + */ + __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1297 + * + * if src.suboffsets[i] >= 0: + * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< + * + * if slices_overlap(&src, &dst, ndim, itemsize): + */ + __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error) + + /* "View.MemoryView":1296 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + */ + } + } + + /* "View.MemoryView":1299 + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): + */ + __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1301 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * + */ + __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1302 + * + * if not slice_is_contig(src, order, ndim): + * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + */ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); + + /* "View.MemoryView":1301 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * + */ + } + + /* "View.MemoryView":1304 + * order = get_best_order(&dst, ndim) + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< + * src = tmp + * + */ + __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error) + __pyx_v_tmpdata = __pyx_t_7; + + /* "View.MemoryView":1305 + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + * src = tmp # <<<<<<<<<<<<<< + * + * if not broadcasting: + */ + __pyx_v_src = __pyx_v_tmp; + + /* "View.MemoryView":1299 + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): + */ + } + + /* "View.MemoryView":1307 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1310 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1311 + * + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) + */ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); + + /* "View.MemoryView":1310 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + */ + goto __pyx_L12; + } + + /* "View.MemoryView":1312 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1313 + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< + * + * if direct_copy: + */ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); + + /* "View.MemoryView":1312 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + */ + } + __pyx_L12:; + + /* "View.MemoryView":1315 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + __pyx_t_2 = (__pyx_v_direct_copy != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1317 + * if direct_copy: + * + * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1318 + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) + */ + (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); + + /* "View.MemoryView":1319 + * refcount_copying(&dst, dtype_is_object, ndim, False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * free(tmpdata) + * return 0 + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1320 + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * + */ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1321 + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * if order == 'F' == get_best_order(&dst, ndim): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1315 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + } + + /* "View.MemoryView":1307 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1323 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = (__pyx_v_order == 'F'); + if (__pyx_t_2) { + __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); + } + __pyx_t_8 = (__pyx_t_2 != 0); + if (__pyx_t_8) { + + /* "View.MemoryView":1326 + * + * + * transpose_memslice(&src) # <<<<<<<<<<<<<< + * transpose_memslice(&dst) + * + */ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1326, __pyx_L1_error) + + /* "View.MemoryView":1327 + * + * transpose_memslice(&src) + * transpose_memslice(&dst) # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1327, __pyx_L1_error) + + /* "View.MemoryView":1323 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1329 + * transpose_memslice(&dst) + * + * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1330 + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, True) + * + */ + copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1331 + * refcount_copying(&dst, dtype_is_object, ndim, False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * + * free(tmpdata) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1333 + * refcount_copying(&dst, dtype_is_object, ndim, True) + * + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * + */ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1334 + * + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_broadcast_leading') + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1265 + * + * @cname('__pyx_memoryview_copy_contents') + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice dst, + * int src_ndim, int dst_ndim, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1337 + * + * @cname('__pyx_memoryview_broadcast_leading') + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< + * int ndim, + * int ndim_other) nogil: + */ + +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { + int __pyx_v_i; + int __pyx_v_offset; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":1341 + * int ndim_other) nogil: + * cdef int i + * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): + */ + __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); + + /* "View.MemoryView":1343 + * cdef int offset = ndim_other - ndim + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + */ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1344 + * + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + */ + (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); + + /* "View.MemoryView":1345 + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + */ + (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1346 + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< + * + * for i in range(offset): + */ + (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); + } + + /* "View.MemoryView":1348 + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + * for i in range(offset): # <<<<<<<<<<<<<< + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + */ + __pyx_t_1 = __pyx_v_offset; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1349 + * + * for i in range(offset): + * mslice.shape[i] = 1 # <<<<<<<<<<<<<< + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 + */ + (__pyx_v_mslice->shape[__pyx_v_i]) = 1; + + /* "View.MemoryView":1350 + * for i in range(offset): + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< + * mslice.suboffsets[i] = -1 + * + */ + (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); + + /* "View.MemoryView":1351 + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1337 + * + * @cname('__pyx_memoryview_broadcast_leading') + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< + * int ndim, + * int ndim_other) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1359 + * + * @cname('__pyx_memoryview_refcount_copying') + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< + * int ndim, bint inc) nogil: + * + */ + +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { + int __pyx_t_1; + + /* "View.MemoryView":1363 + * + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, + * dst.strides, ndim, inc) + */ + __pyx_t_1 = (__pyx_v_dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1364 + * + * if dtype_is_object: + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<< + * dst.strides, ndim, inc) + * + */ + __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1363 + * + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, + * dst.strides, ndim, inc) + */ + } + + /* "View.MemoryView":1359 + * + * @cname('__pyx_memoryview_refcount_copying') + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< + * int ndim, bint inc) nogil: + * + */ + + /* function exit code */ +} + +/* "View.MemoryView":1368 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + */ + +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + __Pyx_RefNannyDeclarations + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0); + + /* "View.MemoryView":1371 + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1368 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "View.MemoryView":1374 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, bint inc): + * cdef Py_ssize_t i + */ + +static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0); + + /* "View.MemoryView":1378 + * cdef Py_ssize_t i + * + * for i in range(shape[0]): # <<<<<<<<<<<<<< + * if ndim == 1: + * if inc: + */ + __pyx_t_1 = (__pyx_v_shape[0]); + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1379 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + __pyx_t_4 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":1380 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + __pyx_t_4 = (__pyx_v_inc != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":1381 + * if ndim == 1: + * if inc: + * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * Py_DECREF(( data)[0]) + */ + Py_INCREF((((PyObject **)__pyx_v_data)[0])); + + /* "View.MemoryView":1380 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":1383 + * Py_INCREF(( data)[0]) + * else: + * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, + */ + /*else*/ { + Py_DECREF((((PyObject **)__pyx_v_data)[0])); + } + __pyx_L6:; + + /* "View.MemoryView":1379 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + goto __pyx_L5; + } + + /* "View.MemoryView":1385 + * Py_DECREF(( data)[0]) + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< + * ndim - 1, inc) + * + */ + /*else*/ { + + /* "View.MemoryView":1386 + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, + * ndim - 1, inc) # <<<<<<<<<<<<<< + * + * data += strides[0] + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); + } + __pyx_L5:; + + /* "View.MemoryView":1388 + * ndim - 1, inc) + * + * data += strides[0] # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0])); + } + + /* "View.MemoryView":1374 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, bint inc): + * cdef Py_ssize_t i + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":1394 + * + * @cname('__pyx_memoryview_slice_assign_scalar') + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + */ + +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { + + /* "View.MemoryView":1397 + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, + * itemsize, item) + */ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1398 + * bint dtype_is_object) nogil: + * refcount_copying(dst, dtype_is_object, ndim, False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<< + * itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1400 + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, + * itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * + * + */ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1394 + * + * @cname('__pyx_memoryview_slice_assign_scalar') + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1404 + * + * @cname('__pyx_memoryview__slice_assign_scalar') + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * size_t itemsize, void *item) nogil: + */ + +static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_extent; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + + /* "View.MemoryView":1408 + * size_t itemsize, void *item) nogil: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t extent = shape[0] + * + */ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1409 + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] + * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: + */ + __pyx_v_extent = (__pyx_v_shape[0]); + + /* "View.MemoryView":1411 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) + */ + __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1412 + * + * if ndim == 1: + * for i in range(extent): # <<<<<<<<<<<<<< + * memcpy(data, item, itemsize) + * data += stride + */ + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1413 + * if ndim == 1: + * for i in range(extent): + * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< + * data += stride + * else: + */ + (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); + + /* "View.MemoryView":1414 + * for i in range(extent): + * memcpy(data, item, itemsize) + * data += stride # <<<<<<<<<<<<<< + * else: + * for i in range(extent): + */ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1411 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1416 + * data += stride + * else: + * for i in range(extent): # <<<<<<<<<<<<<< + * _slice_assign_scalar(data, shape + 1, strides + 1, + * ndim - 1, itemsize, item) + */ + /*else*/ { + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1417 + * else: + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< + * ndim - 1, itemsize, item) + * data += stride + */ + __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1419 + * _slice_assign_scalar(data, shape + 1, strides + 1, + * ndim - 1, itemsize, item) + * data += stride # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1404 + * + * @cname('__pyx_memoryview__slice_assign_scalar') + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * size_t itemsize, void *item) nogil: + */ + + /* function exit code */ +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + */ + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0); + if (__pyx_t_1) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v___pyx_PickleError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum != 0xb068931: + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v___pyx_PickleError); + __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v___pyx_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_1 = (__pyx_v___pyx_state != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "(tree fragment)":9 + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_3 > 1) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_tp_new_6PyCafe_CyCa(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_CyCa *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CyCa *)o); + new((void*)&(p->INVALID_ENUM_RETURN_STRING)) std::string(); + if (unlikely(__pyx_pw_6PyCafe_4CyCa_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCa(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCa *p = (struct __pyx_obj_6PyCafe_CyCa *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + __Pyx_call_destructor(p->INVALID_ENUM_RETURN_STRING); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_LOG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_ARCHIVE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_PROPERTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PRIMITIVE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PLAIN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STSACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CLASS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_NONE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORMAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_TOLARGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADTYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_INTERNAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_GETFAIL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTFAIL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_DISCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_DBLCHNL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_EVDISALLOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMONID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMASK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_IODONE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_IOINPROGRESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSYNCGRP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTCBINPROG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORDACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOWTACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ANACHRONISM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOSEARCHADDR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOCONVERT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCHID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADFUNCPTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ISATTACHED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNAVAILINSERV(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_CHANDESTROY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADPRIORITY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOTTHREADED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_16KARRAYCLIENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_CONNSEQTMO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNRESPTMO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_NEVER_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_PREV_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CLOSED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_DISCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_UNKNOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_TYPENOTCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_RULE_FALSE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CALLBACK_NOT_YET_INVOKED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_WAITING_FOR_PREV_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CACHE_EMPTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_MONITOR_DELAYED_AS_CONN_DOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_SET_AND_GET_MISMATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_GET(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_PUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CREATE_CHANNEL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_ADD_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CLEAR_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_OTHER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_DOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_UP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_RUN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_PAUSED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_STOPPED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_NORMAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_SUCCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NODATA(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_TYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADSTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADTYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NO_CONVERT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCONTEXT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCHID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLEVID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_INVALID_MEMBER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_RULE_FALSE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_GROUP_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_HANDLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_GROUP_HANDLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NORDACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NOWTACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_CANNOT_OPEN_FILE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_SWITCH_CASE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVNAME_PREV_DEF_AS_PVALIAS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_DEVICE_ATTRIB_NOT_FOUND(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_HASH_UNIQUEID_EXISTS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_WRONG_CA_CONTEXT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_CAFENUM_POLICY_TYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_ENUM_INDEX(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVGROUP_GROUPHANDLE_MISMATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT_SET_AND_MATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_HANDLE_MISMATCH_SET_AND_MATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INCONSISTENT_CONTAINER_CORRECTED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BPM_DATA_IS_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_DECOMPRESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_ALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_REALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_MULTIPART_MESS_NODATA(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_MAINHEADER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_DATAHEADER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_ZMQSTREAM_NULL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EINTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EAGAIN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EFAULT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EINVAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_ENOTSOCK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EPROTONOSUPPORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_NO_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_MINOR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_MAJOR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_NO_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_READ(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_WRITE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HIHI(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HIGH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LOLO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_STATE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_COS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_COMM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HWLIMIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_CALC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SCAN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LINK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SOFT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_BAD_SUB(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_UDF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_DISABLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SIMM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_READ_ACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_WRITE_ACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITHOUT_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_DEFAULT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_USER_SUPPLIED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_FLUSH_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_PEND_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_PEND_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_POLL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AUTOMATIC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_NOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_CREATION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_GROUP_CREATION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_DESIGNATED_TO_CLIENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_CHECK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_FROM_CACHE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_FROM_IOC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NATIVE_DATATYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_LOWEST_DATATYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BLOCKING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NON_BLOCKING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NO_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NO_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_PRE_REQUEST(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_REQUEST(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_PEND(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NOT_INITIATED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_PENDING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_COMPLETE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_HIGH_WATER_MARK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_TIMEOUT_MS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCa[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCa[] = { + {(char *)"CY_DBE_VALUE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_VALUE, 0, (char *)0, 0}, + {(char *)"CY_DBE_LOG", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_LOG, 0, (char *)0, 0}, + {(char *)"CY_DBE_ARCHIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ARCHIVE, 0, (char *)0, 0}, + {(char *)"CY_DBE_ALARM", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ALARM, 0, (char *)0, 0}, + {(char *)"CY_DBE_PROPERTY", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_PROPERTY, 0, (char *)0, 0}, + {(char *)"CY_DBR_PRIMITIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PRIMITIVE, 0, (char *)0, 0}, + {(char *)"CY_DBR_PLAIN", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PLAIN, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL, 0, (char *)0, 0}, + {(char *)"CY_DBR_PUT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PUT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STSACK", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STSACK, 0, (char *)0, 0}, + {(char *)"CY_DBR_CLASS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CLASS, 0, (char *)0, 0}, + {(char *)"CY_DBR_NONE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_NONE, 0, (char *)0, 0}, + {(char *)"CY_DBR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_ECA_NORMAL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORMAL, 0, (char *)0, 0}, + {(char *)"CY_ECA_ALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ALLOCMEM, 0, (char *)0, 0}, + {(char *)"CY_ECA_TOLARGE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_TOLARGE, 0, (char *)0, 0}, + {(char *)"CY_ECA_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_TIMEOUT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADTYPE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADTYPE, 0, (char *)0, 0}, + {(char *)"CY_ECA_INTERNAL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_INTERNAL, 0, (char *)0, 0}, + {(char *)"CY_ECA_GETFAIL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_GETFAIL, 0, (char *)0, 0}, + {(char *)"CY_ECA_PUTFAIL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTFAIL, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCOUNT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADSTR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSTR, 0, (char *)0, 0}, + {(char *)"CY_ECA_DISCONN", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_DISCONN, 0, (char *)0, 0}, + {(char *)"CY_ECA_DBLCHNL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_DBLCHNL, 0, (char *)0, 0}, + {(char *)"CY_ECA_EVDISALLOW", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_EVDISALLOW, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADMONID", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMONID, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADMASK", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMASK, 0, (char *)0, 0}, + {(char *)"CY_ECA_IODONE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_IODONE, 0, (char *)0, 0}, + {(char *)"CY_ECA_IOINPROGRESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_IOINPROGRESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADSYNCGRP", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSYNCGRP, 0, (char *)0, 0}, + {(char *)"CY_ECA_PUTCBINPROG", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTCBINPROG, 0, (char *)0, 0}, + {(char *)"CY_ECA_NORDACCESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORDACCESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOWTACCESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOWTACCESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_ANACHRONISM", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ANACHRONISM, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOSEARCHADDR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOSEARCHADDR, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOCONVERT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOCONVERT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADCHID", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCHID, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADFUNCPTR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADFUNCPTR, 0, (char *)0, 0}, + {(char *)"CY_ECA_ISATTACHED", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ISATTACHED, 0, (char *)0, 0}, + {(char *)"CY_ECA_UNAVAILINSERV", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNAVAILINSERV, 0, (char *)0, 0}, + {(char *)"CY_ECA_CHANDESTROY", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_CHANDESTROY, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADPRIORITY", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADPRIORITY, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOTTHREADED", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOTTHREADED, 0, (char *)0, 0}, + {(char *)"CY_ECA_16KARRAYCLIENT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_16KARRAYCLIENT, 0, (char *)0, 0}, + {(char *)"CY_ECA_CONNSEQTMO", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_CONNSEQTMO, 0, (char *)0, 0}, + {(char *)"CY_ECA_UNRESPTMO", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNRESPTMO, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_NEVER_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_NEVER_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_PREV_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_PREV_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_CLOSED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CLOSED, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_DISCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_DISCONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_UNKNOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_UNKNOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_TYPENOTCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_TYPENOTCONN, 0, (char *)0, 0}, + {(char *)"ICAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_RULE_FALSE, 0, (char *)0, 0}, + {(char *)"ICAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ICAFE_CALLBACK_NOT_YET_INVOKED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CALLBACK_NOT_YET_INVOKED, 0, (char *)0, 0}, + {(char *)"ICAFE_WAITING_FOR_PREV_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_ICAFE_WAITING_FOR_PREV_CALLBACK, 0, (char *)0, 0}, + {(char *)"ICAFE_CACHE_EMPTY", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CACHE_EMPTY, 0, (char *)0, 0}, + {(char *)"ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, 0, (char *)0, 0}, + {(char *)"ICAFE_MONITOR_DELAYED_AS_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, 0, (char *)0, 0}, + {(char *)"ICAFE_SET_AND_GET_MISMATCH", __pyx_getprop_6PyCafe_4CyCa_ICAFE_SET_AND_GET_MISMATCH, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_GET", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_GET, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_PUT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_PUT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CREATE_CHANNEL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CREATE_CHANNEL, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_ADD_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_ADD_EVENT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CLEAR_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CLEAR_EVENT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_OTHER", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_OTHER, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_DOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CONN_UP", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_UP, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_RUN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_RUN, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_PAUSED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_PAUSED, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_STOPPED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_STOPPED, 0, (char *)0, 0}, + {(char *)"ECAFE_LOAD_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_LOAD_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_GROUP, 0, (char *)0, 0}, + {(char *)"ICAFE_NORMAL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_NORMAL, 0, (char *)0, 0}, + {(char *)"ICAFE_SUCCESS", __pyx_getprop_6PyCafe_4CyCa_ICAFE_SUCCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_NODATA", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NODATA, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_TYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ECAFE_BADSTR", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADSTR, 0, (char *)0, 0}, + {(char *)"ECAFE_BADTYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADTYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_NO_CONVERT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NO_CONVERT, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLCONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCONTEXT, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLCHID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCHID, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLEVID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLEVID, 0, (char *)0, 0}, + {(char *)"ECAFE_UNKNOWN_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_EMPTY_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_COLLECTION_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_COLLECTION_INVALID_MEMBER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_INVALID_MEMBER, 0, (char *)0, 0}, + {(char *)"ECAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_RULE_FALSE, 0, (char *)0, 0}, + {(char *)"ECAFE_UNKNOWN_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_GROUP, 0, (char *)0, 0}, + {(char *)"ECAFE_EMPTY_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_GROUP, 0, (char *)0, 0}, + {(char *)"ECAFE_GROUP_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_GROUP_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_HANDLE, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_GROUP_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_GROUP_HANDLE, 0, (char *)0, 0}, + {(char *)"ECAFE_NORDACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NORDACCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_NOWTACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NOWTACCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT, 0, (char *)0, 0}, + {(char *)"ECAFE_CANNOT_OPEN_FILE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_CANNOT_OPEN_FILE, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_SWITCH_CASE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_SWITCH_CASE, 0, (char *)0, 0}, + {(char *)"ECAFE_PVALIAS_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_PVALIAS_INVALID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_INVALID, 0, (char *)0, 0}, + {(char *)"ECAFE_PVNAME_PREV_DEF_AS_PVALIAS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVNAME_PREV_DEF_AS_PVALIAS, 0, (char *)0, 0}, + {(char *)"ECAFE_DEVICE_ATTRIB_NOT_FOUND", __pyx_getprop_6PyCafe_4CyCa_ECAFE_DEVICE_ATTRIB_NOT_FOUND, 0, (char *)0, 0}, + {(char *)"ECAFE_HASH_UNIQUEID_EXISTS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HASH_UNIQUEID_EXISTS, 0, (char *)0, 0}, + {(char *)"ECAFE_WRONG_CA_CONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_WRONG_CA_CONTEXT, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_CAFENUM_POLICY_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_CAFENUM_POLICY_TYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED", __pyx_getprop_6PyCafe_4CyCa_ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_ENUM_INDEX", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_ENUM_INDEX, 0, (char *)0, 0}, + {(char *)"ECAFE_PVGROUP_GROUPHANDLE_MISMATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_TIMEOUT_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT_SET_AND_MATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_HANDLE_MISMATCH_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_INCONSISTENT_CONTAINER_CORRECTED", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INCONSISTENT_CONTAINER_CORRECTED, 0, (char *)0, 0}, + {(char *)"ECAFE_BPM_DATA_IS_INVALID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BPM_DATA_IS_INVALID, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_DECOMPRESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_DECOMPRESS, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_ALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_ALLOCMEM, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_REALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_REALLOCMEM, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_MULTIPART_MESS_NODATA", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_MULTIPART_MESS_NODATA, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_PARSEFAIL_MAINHEADER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_MAINHEADER, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_PARSEFAIL_DATAHEADER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_DATAHEADER, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_ZMQSTREAM_NULL", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_ZMQSTREAM_NULL, 0, (char *)0, 0}, + {(char *)"ERRNO_EINTR", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EINTR, 0, (char *)0, 0}, + {(char *)"ERRNO_EAGAIN", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EAGAIN, 0, (char *)0, 0}, + {(char *)"ERRNO_EFAULT", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EFAULT, 0, (char *)0, 0}, + {(char *)"ERRNO_EINVAL", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EINVAL, 0, (char *)0, 0}, + {(char *)"ERRNO_ENOTSOCK", __pyx_getprop_6PyCafe_4CyCa_ERRNO_ENOTSOCK, 0, (char *)0, 0}, + {(char *)"ERRNO_EPROTONOSUPPORT", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EPROTONOSUPPORT, 0, (char *)0, 0}, + {(char *)"SEV_NO_ALARM", __pyx_getprop_6PyCafe_4CyCa_SEV_NO_ALARM, 0, (char *)0, 0}, + {(char *)"SEV_MINOR", __pyx_getprop_6PyCafe_4CyCa_SEV_MINOR, 0, (char *)0, 0}, + {(char *)"SEV_MAJOR", __pyx_getprop_6PyCafe_4CyCa_SEV_MAJOR, 0, (char *)0, 0}, + {(char *)"SEV_INVALID", __pyx_getprop_6PyCafe_4CyCa_SEV_INVALID, 0, (char *)0, 0}, + {(char *)"STAT_NO_ALARM", __pyx_getprop_6PyCafe_4CyCa_STAT_NO_ALARM, 0, (char *)0, 0}, + {(char *)"STAT_READ", __pyx_getprop_6PyCafe_4CyCa_STAT_READ, 0, (char *)0, 0}, + {(char *)"STAT_WRITE", __pyx_getprop_6PyCafe_4CyCa_STAT_WRITE, 0, (char *)0, 0}, + {(char *)"STAT_HIHI", __pyx_getprop_6PyCafe_4CyCa_STAT_HIHI, 0, (char *)0, 0}, + {(char *)"STAT_HIGH", __pyx_getprop_6PyCafe_4CyCa_STAT_HIGH, 0, (char *)0, 0}, + {(char *)"STAT_LOLO", __pyx_getprop_6PyCafe_4CyCa_STAT_LOLO, 0, (char *)0, 0}, + {(char *)"STAT_LOW", __pyx_getprop_6PyCafe_4CyCa_STAT_LOW, 0, (char *)0, 0}, + {(char *)"STAT_STATE", __pyx_getprop_6PyCafe_4CyCa_STAT_STATE, 0, (char *)0, 0}, + {(char *)"STAT_COS", __pyx_getprop_6PyCafe_4CyCa_STAT_COS, 0, (char *)0, 0}, + {(char *)"STAT_COMM", __pyx_getprop_6PyCafe_4CyCa_STAT_COMM, 0, (char *)0, 0}, + {(char *)"STAT_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_STAT_TIMEOUT, 0, (char *)0, 0}, + {(char *)"STAT_HWLIMIT", __pyx_getprop_6PyCafe_4CyCa_STAT_HWLIMIT, 0, (char *)0, 0}, + {(char *)"STAT_CALC", __pyx_getprop_6PyCafe_4CyCa_STAT_CALC, 0, (char *)0, 0}, + {(char *)"STAT_SCAN", __pyx_getprop_6PyCafe_4CyCa_STAT_SCAN, 0, (char *)0, 0}, + {(char *)"STAT_LINK", __pyx_getprop_6PyCafe_4CyCa_STAT_LINK, 0, (char *)0, 0}, + {(char *)"STAT_SOFT", __pyx_getprop_6PyCafe_4CyCa_STAT_SOFT, 0, (char *)0, 0}, + {(char *)"STAT_BAD_SUB", __pyx_getprop_6PyCafe_4CyCa_STAT_BAD_SUB, 0, (char *)0, 0}, + {(char *)"STAT_UDF", __pyx_getprop_6PyCafe_4CyCa_STAT_UDF, 0, (char *)0, 0}, + {(char *)"STAT_DISABLE", __pyx_getprop_6PyCafe_4CyCa_STAT_DISABLE, 0, (char *)0, 0}, + {(char *)"STAT_SIMM", __pyx_getprop_6PyCafe_4CyCa_STAT_SIMM, 0, (char *)0, 0}, + {(char *)"STAT_READ_ACCESS", __pyx_getprop_6PyCafe_4CyCa_STAT_READ_ACCESS, 0, (char *)0, 0}, + {(char *)"STAT_WRITE_ACCESS", __pyx_getprop_6PyCafe_4CyCa_STAT_WRITE_ACCESS, 0, (char *)0, 0}, + {(char *)"WITHOUT_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_WITHOUT_CALLBACK, 0, (char *)0, 0}, + {(char *)"WITH_CALLBACK_DEFAULT", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_DEFAULT, 0, (char *)0, 0}, + {(char *)"WITH_CALLBACK_USER_SUPPLIED", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_USER_SUPPLIED, 0, (char *)0, 0}, + {(char *)"WITH_FLUSH_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_FLUSH_IO, 0, (char *)0, 0}, + {(char *)"WITH_PEND_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_IO, 0, (char *)0, 0}, + {(char *)"WITH_PEND_EVENT", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_EVENT, 0, (char *)0, 0}, + {(char *)"WITH_POLL", __pyx_getprop_6PyCafe_4CyCa_WITH_POLL, 0, (char *)0, 0}, + {(char *)"FLUSH_AUTOMATIC", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AUTOMATIC, 0, (char *)0, 0}, + {(char *)"FLUSH_NOW", __pyx_getprop_6PyCafe_4CyCa_FLUSH_NOW, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_CREATION, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_MESSAGE, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_GROUP_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_GROUP_CREATION, 0, (char *)0, 0}, + {(char *)"FLUSH_DESIGNATED_TO_CLIENT", __pyx_getprop_6PyCafe_4CyCa_FLUSH_DESIGNATED_TO_CLIENT, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NO_CHECK", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_CHECK, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_WAIT, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NOW", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NOW, 0, (char *)0, 0}, + {(char *)"GET_CACHE_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_WAIT, 0, (char *)0, 0}, + {(char *)"GET_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_CACHE, 0, (char *)0, 0}, + {(char *)"GET_FROM_IOC", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_IOC, 0, (char *)0, 0}, + {(char *)"NATIVE_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_NATIVE_DATATYPE, 0, (char *)0, 0}, + {(char *)"LOWEST_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_LOWEST_DATATYPE, 0, (char *)0, 0}, + {(char *)"BLOCKING", __pyx_getprop_6PyCafe_4CyCa_BLOCKING, 0, (char *)0, 0}, + {(char *)"WAIT", __pyx_getprop_6PyCafe_4CyCa_WAIT, 0, (char *)0, 0}, + {(char *)"NON_BLOCKING", __pyx_getprop_6PyCafe_4CyCa_NON_BLOCKING, 0, (char *)0, 0}, + {(char *)"NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_NO_WAIT, 0, (char *)0, 0}, + {(char *)"NO_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_NO_MESSAGE, 0, (char *)0, 0}, + {(char *)"PRE_REQUEST", __pyx_getprop_6PyCafe_4CyCa_PRE_REQUEST, 0, (char *)0, 0}, + {(char *)"FROM_REQUEST", __pyx_getprop_6PyCafe_4CyCa_FROM_REQUEST, 0, (char *)0, 0}, + {(char *)"FROM_PEND", __pyx_getprop_6PyCafe_4CyCa_FROM_PEND, 0, (char *)0, 0}, + {(char *)"FROM_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_FROM_CALLBACK, 0, (char *)0, 0}, + {(char *)"FROM_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FROM_MESSAGE, 0, (char *)0, 0}, + {(char *)"NOT_INITIATED", __pyx_getprop_6PyCafe_4CyCa_NOT_INITIATED, 0, (char *)0, 0}, + {(char *)"PENDING", __pyx_getprop_6PyCafe_4CyCa_PENDING, 0, (char *)0, 0}, + {(char *)"COMPLETE", __pyx_getprop_6PyCafe_4CyCa_COMPLETE, 0, (char *)0, 0}, + {(char *)"DEFAULT_TIMEOUT_PEND_EVENT", __pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_EVENT, 0, (char *)0, 0}, + {(char *)"DEFAULT_TIMEOUT_PEND_IO", __pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_IO, 0, (char *)0, 0}, + {(char *)"INVALID_ENUM_RETURN_STRING", __pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_STRING, 0, (char *)0, 0}, + {(char *)"INVALID_ENUM_RETURN_VALUE", __pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_VALUE, 0, (char *)0, 0}, + {(char *)"BSREAD_ZEROMQ_HIGH_WATER_MARK", __pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_HIGH_WATER_MARK, 0, (char *)0, 0}, + {(char *)"BSREAD_ZEROMQ_TIMEOUT_MS", __pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_TIMEOUT_MS, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CyCa = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CyCa", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CyCa), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CyCa, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CyCa, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CyCa, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CyCa, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_channelInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_channelInfo *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_channelInfo *)o); + new((void*)&(p->hostName)) std::string(); + new((void*)&(p->dataTypeAsString)) std::string(); + new((void*)&(p->className)) std::string(); + new((void*)&(p->connectionStateAsString)) std::string(); + new((void*)&(p->cafeConnectionStateAsString)) std::string(); + new((void*)&(p->cdt)) CAFEDataTypeCode(); + new((void*)&(p->csc)) CAFEStatusCode(); + new((void*)&(p->caop)) CAOPCodes(); + if (unlikely(__pyx_pw_6PyCafe_11channelInfo_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_channelInfo(PyObject *o) { + struct __pyx_obj_6PyCafe_channelInfo *p = (struct __pyx_obj_6PyCafe_channelInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + __Pyx_call_destructor(p->hostName); + __Pyx_call_destructor(p->dataTypeAsString); + __Pyx_call_destructor(p->className); + __Pyx_call_destructor(p->connectionStateAsString); + __Pyx_call_destructor(p->cafeConnectionStateAsString); + __Pyx_call_destructor(p->cdt); + __Pyx_call_destructor(p->csc); + __Pyx_call_destructor(p->caop); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_channelID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectFlag(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_hostName(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_dataTypeAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_accessRead(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_accessWrite(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_className(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_9className_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectionState(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_cafeConnectionState(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectionStateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_cafeConnectionStateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_channelInfo[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_3show, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_channelInfo[] = { + {(char *)"channelID", __pyx_getprop_6PyCafe_11channelInfo_channelID, 0, (char *)0, 0}, + {(char *)"connectFlag", __pyx_getprop_6PyCafe_11channelInfo_connectFlag, 0, (char *)0, 0}, + {(char *)"hostName", __pyx_getprop_6PyCafe_11channelInfo_hostName, 0, (char *)0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_11channelInfo_nelem, 0, (char *)0, 0}, + {(char *)"dataType", __pyx_getprop_6PyCafe_11channelInfo_dataType, 0, (char *)0, 0}, + {(char *)"dataTypeAsString", __pyx_getprop_6PyCafe_11channelInfo_dataTypeAsString, 0, (char *)0, 0}, + {(char *)"accessRead", __pyx_getprop_6PyCafe_11channelInfo_accessRead, 0, (char *)0, 0}, + {(char *)"accessWrite", __pyx_getprop_6PyCafe_11channelInfo_accessWrite, 0, (char *)0, 0}, + {(char *)"className", __pyx_getprop_6PyCafe_11channelInfo_className, 0, (char *)0, 0}, + {(char *)"connectionState", __pyx_getprop_6PyCafe_11channelInfo_connectionState, 0, (char *)0, 0}, + {(char *)"cafeConnectionState", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionState, 0, (char *)0, 0}, + {(char *)"connectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_connectionStateAsString, 0, (char *)0, 0}, + {(char *)"cafeConnectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionStateAsString, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_channelInfo = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.channelInfo", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_channelInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_channelInfo, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_channelInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_channelInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_channelInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvctrl __pyx_vtable_6PyCafe_pvctrl; + +static PyObject *__pyx_tp_new_6PyCafe_pvctrl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvctrl *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvctrl *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvctrl; + p->units = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->enumStrings = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->upperDisplayLimit = Py_None; Py_INCREF(Py_None); + p->lowerDisplayLimit = Py_None; Py_INCREF(Py_None); + p->upperAlarmLimit = Py_None; Py_INCREF(Py_None); + p->upperWarningLimit = Py_None; Py_INCREF(Py_None); + p->lowerWarningLimit = Py_None; Py_INCREF(Py_None); + p->lowerAlarmLimit = Py_None; Py_INCREF(Py_None); + p->upperControlLimit = Py_None; Py_INCREF(Py_None); + p->lowerControlLimit = Py_None; Py_INCREF(Py_None); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvctrl_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvctrl(PyObject *o) { + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->units); + Py_CLEAR(p->enumStrings); + Py_CLEAR(p->upperDisplayLimit); + Py_CLEAR(p->lowerDisplayLimit); + Py_CLEAR(p->upperAlarmLimit); + Py_CLEAR(p->upperWarningLimit); + Py_CLEAR(p->lowerWarningLimit); + Py_CLEAR(p->lowerAlarmLimit); + Py_CLEAR(p->upperControlLimit); + Py_CLEAR(p->lowerControlLimit); + Py_CLEAR(p->value); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvctrl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + if (p->enumStrings) { + e = (*v)(p->enumStrings, a); if (e) return e; + } + if (p->upperDisplayLimit) { + e = (*v)(p->upperDisplayLimit, a); if (e) return e; + } + if (p->lowerDisplayLimit) { + e = (*v)(p->lowerDisplayLimit, a); if (e) return e; + } + if (p->upperAlarmLimit) { + e = (*v)(p->upperAlarmLimit, a); if (e) return e; + } + if (p->upperWarningLimit) { + e = (*v)(p->upperWarningLimit, a); if (e) return e; + } + if (p->lowerWarningLimit) { + e = (*v)(p->lowerWarningLimit, a); if (e) return e; + } + if (p->lowerAlarmLimit) { + e = (*v)(p->lowerAlarmLimit, a); if (e) return e; + } + if (p->upperControlLimit) { + e = (*v)(p->upperControlLimit, a); if (e) return e; + } + if (p->lowerControlLimit) { + e = (*v)(p->lowerControlLimit, a); if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvctrl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + tmp = ((PyObject*)p->enumStrings); + p->enumStrings = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperDisplayLimit); + p->upperDisplayLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerDisplayLimit); + p->lowerDisplayLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperAlarmLimit); + p->upperAlarmLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperWarningLimit); + p->upperWarningLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerWarningLimit); + p->lowerWarningLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerAlarmLimit); + p->lowerAlarmLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperControlLimit); + p->upperControlLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerControlLimit); + p->lowerControlLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->value); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_alarmStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_alarmSeverity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_precision(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_units(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5units_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_noEnumStrings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_enumStrings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperDisplayLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerDisplayLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperAlarmLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperWarningLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerWarningLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerAlarmLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperControlLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerControlLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5value_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_6status_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_pvctrl[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_3show, METH_NOARGS, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_5showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvctrl[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvctrl_nelem, 0, (char *)0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvctrl_alarmStatus, 0, (char *)0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvctrl_alarmSeverity, 0, (char *)0, 0}, + {(char *)"precision", __pyx_getprop_6PyCafe_6pvctrl_precision, 0, (char *)0, 0}, + {(char *)"units", __pyx_getprop_6PyCafe_6pvctrl_units, 0, (char *)0, 0}, + {(char *)"noEnumStrings", __pyx_getprop_6PyCafe_6pvctrl_noEnumStrings, 0, (char *)0, 0}, + {(char *)"enumStrings", __pyx_getprop_6PyCafe_6pvctrl_enumStrings, 0, (char *)0, 0}, + {(char *)"upperDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_upperDisplayLimit, 0, (char *)0, 0}, + {(char *)"lowerDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerDisplayLimit, 0, (char *)0, 0}, + {(char *)"upperAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_upperAlarmLimit, 0, (char *)0, 0}, + {(char *)"upperWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_upperWarningLimit, 0, (char *)0, 0}, + {(char *)"lowerWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerWarningLimit, 0, (char *)0, 0}, + {(char *)"lowerAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerAlarmLimit, 0, (char *)0, 0}, + {(char *)"upperControlLimit", __pyx_getprop_6PyCafe_6pvctrl_upperControlLimit, 0, (char *)0, 0}, + {(char *)"lowerControlLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerControlLimit, 0, (char *)0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvctrl_value, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvctrl_status, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvctrl = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvctrl", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvctrl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvctrl, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvctrl, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvctrl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvctrl, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvctrl, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvctrl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_CafeException(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6PyCafe_CafeException *p; + PyObject *o = (&((PyTypeObject*)PyExc_Exception)[0])->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CafeException *)o); + p->type = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->source = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->error_text = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->error_info = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_CafeException(PyObject *o) { + struct __pyx_obj_6PyCafe_CafeException *p = (struct __pyx_obj_6PyCafe_CafeException *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->type); + Py_CLEAR(p->source); + Py_CLEAR(p->name); + Py_CLEAR(p->error_text); + Py_CLEAR(p->error_info); + PyObject_GC_Track(o); + (&((PyTypeObject*)PyExc_Exception)[0])->tp_dealloc(o); +} + +static int __pyx_tp_traverse_6PyCafe_CafeException(PyObject *o, visitproc v, void *a) { + int e; + if (!(&((PyTypeObject*)PyExc_Exception)[0])->tp_traverse); else { e = (&((PyTypeObject*)PyExc_Exception)[0])->tp_traverse(o,v,a); if (e) return e; } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_CafeException(PyObject *o) { + if (!(&((PyTypeObject*)PyExc_Exception)[0])->tp_clear); else (&((PyTypeObject*)PyExc_Exception)[0])->tp_clear(o); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_4type_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_source(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_6source_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_6handle_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_4name_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_code(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_text(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_CafeException[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_3show, METH_NOARGS, 0}, + {"reveal", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_5reveal, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CafeException[] = { + {(char *)"type", __pyx_getprop_6PyCafe_13CafeException_type, 0, (char *)0, 0}, + {(char *)"source", __pyx_getprop_6PyCafe_13CafeException_source, 0, (char *)0, 0}, + {(char *)"handle", __pyx_getprop_6PyCafe_13CafeException_handle, 0, (char *)0, 0}, + {(char *)"name", __pyx_getprop_6PyCafe_13CafeException_name, 0, (char *)0, 0}, + {(char *)"error_code", __pyx_getprop_6PyCafe_13CafeException_error_code, 0, (char *)0, 0}, + {(char *)"error_text", __pyx_getprop_6PyCafe_13CafeException_error_text, 0, (char *)0, 0}, + {(char *)"error_info", __pyx_getprop_6PyCafe_13CafeException_error_info, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CafeException = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CafeException", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CafeException), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CafeException, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_CafeException, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_CafeException, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CafeException, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CafeException, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_6PyCafe_13CafeException_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CafeException, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_monitorpolicy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_monitorpolicy(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_dbrDataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_cafeDbrType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_mask(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_userArgs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_monid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_PROPERTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_LOG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_monitorpolicy[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_3show, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_monitorpolicy[] = { + {(char *)"dataType", __pyx_getprop_6PyCafe_13monitorpolicy_dataType, 0, (char *)0, 0}, + {(char *)"dbrDataType", __pyx_getprop_6PyCafe_13monitorpolicy_dbrDataType, 0, (char *)0, 0}, + {(char *)"cafeDbrType", __pyx_getprop_6PyCafe_13monitorpolicy_cafeDbrType, 0, (char *)0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_13monitorpolicy_nelem, 0, (char *)0, 0}, + {(char *)"mask", __pyx_getprop_6PyCafe_13monitorpolicy_mask, 0, (char *)0, 0}, + {(char *)"userArgs", __pyx_getprop_6PyCafe_13monitorpolicy_userArgs, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_13monitorpolicy_status, 0, (char *)0, 0}, + {(char *)"monid", __pyx_getprop_6PyCafe_13monitorpolicy_monid, 0, (char *)0, 0}, + {(char *)"maskHasDBE_PROPERTY", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_PROPERTY, 0, (char *)0, 0}, + {(char *)"maskHasDBE_VALUE", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_VALUE, 0, (char *)0, 0}, + {(char *)"maskHasDBE_LOG", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_LOG, 0, (char *)0, 0}, + {(char *)"maskHasDBE_ALARM", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_ALARM, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_monitorpolicy = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.monitorpolicy", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_monitorpolicy), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_monitorpolicy, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_monitorpolicy, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_monitorpolicy, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_monitorpolicy, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvdata __pyx_vtable_6PyCafe_pvdata; + +static PyObject *__pyx_tp_new_6PyCafe_pvdata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvdata *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvdata *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvdata; + p->alarmStatusAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->alarmSeverityAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->ts = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->tsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->tsDateAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->bsDateAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->statusAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->dataTypeAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvdata_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvdata(PyObject *o) { + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->alarmStatusAsString); + Py_CLEAR(p->alarmSeverityAsString); + Py_CLEAR(p->ts); + Py_CLEAR(p->tsDate); + Py_CLEAR(p->tsDateAsString); + Py_CLEAR(p->bsDateAsString); + Py_CLEAR(p->value); + Py_CLEAR(p->statusAsString); + Py_CLEAR(p->dataTypeAsString); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvdata(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + if (p->ts) { + e = (*v)(p->ts, a); if (e) return e; + } + if (p->tsDate) { + e = (*v)(p->tsDate, a); if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvdata(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + tmp = ((PyObject*)p->ts); + p->ts = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->tsDate); + p->tsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->value); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmSeverity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmStatusAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmSeverityAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_ts(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_2ts_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_tsDate(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_tsDateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_bsDateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_5value_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_6status_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6pvdata_status(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6pvdata_6status_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_statusAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6pvdata_statusAsString(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(o, v); + } + else { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(o); + } +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_pulseID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_dataTypeAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_pvdata[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_3show, METH_NOARGS, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_5showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvdata[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvdata_nelem, 0, (char *)0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvdata_alarmStatus, 0, (char *)0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvdata_alarmSeverity, 0, (char *)0, 0}, + {(char *)"alarmStatusAsString", __pyx_getprop_6PyCafe_6pvdata_alarmStatusAsString, 0, (char *)0, 0}, + {(char *)"alarmSeverityAsString", __pyx_getprop_6PyCafe_6pvdata_alarmSeverityAsString, 0, (char *)0, 0}, + {(char *)"ts", __pyx_getprop_6PyCafe_6pvdata_ts, 0, (char *)0, 0}, + {(char *)"tsDate", __pyx_getprop_6PyCafe_6pvdata_tsDate, 0, (char *)0, 0}, + {(char *)"tsDateAsString", __pyx_getprop_6PyCafe_6pvdata_tsDateAsString, 0, (char *)0, 0}, + {(char *)"bsDateAsString", __pyx_getprop_6PyCafe_6pvdata_bsDateAsString, 0, (char *)0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvdata_value, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvdata_status, __pyx_setprop_6PyCafe_6pvdata_status, (char *)0, 0}, + {(char *)"statusAsString", __pyx_getprop_6PyCafe_6pvdata_statusAsString, __pyx_setprop_6PyCafe_6pvdata_statusAsString, (char *)0, 0}, + {(char *)"pulseID", __pyx_getprop_6PyCafe_6pvdata_pulseID, 0, (char *)0, 0}, + {(char *)"dataType", __pyx_getprop_6PyCafe_6pvdata_dataType, 0, (char *)0, 0}, + {(char *)"dataTypeAsString", __pyx_getprop_6PyCafe_6pvdata_dataTypeAsString, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvdata = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvdata", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvdata), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvdata, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvdata, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvdata, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvdata, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvdata, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvdata, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvgroup __pyx_vtable_6PyCafe_pvgroup; + +static PyObject *__pyx_tp_new_6PyCafe_pvgroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvgroup *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvgroup *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvgroup; + new((void*)&(p->name)) std::string(); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_7pvgroup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvgroup(PyObject *o) { + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + __Pyx_call_destructor(p->name); + Py_CLEAR(p->pvdata); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvgroup(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + if (p->pvdata) { + e = (*v)(p->pvdata, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvgroup(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + tmp = ((PyObject*)p->pvdata); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_pvdata(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_pvdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(o, v); + } + else { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(o); + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_npv(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_npv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_4name_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_groupStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_groupHandle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_groupHandle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_rule(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_rule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_hasAlarm(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_hasAlarm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_hasTS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_hasTS(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_6PyCafe_pvgroup[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_3show, METH_NOARGS, 0}, + {"showWithPV", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_5showWithPV, METH_O, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_7showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvgroup[] = { + {(char *)"pvdata", __pyx_getprop_6PyCafe_7pvgroup_pvdata, __pyx_setprop_6PyCafe_7pvgroup_pvdata, (char *)0, 0}, + {(char *)"npv", __pyx_getprop_6PyCafe_7pvgroup_npv, __pyx_setprop_6PyCafe_7pvgroup_npv, (char *)0, 0}, + {(char *)"name", __pyx_getprop_6PyCafe_7pvgroup_name, __pyx_setprop_6PyCafe_7pvgroup_name, (char *)0, 0}, + {(char *)"groupStatus", __pyx_getprop_6PyCafe_7pvgroup_groupStatus, 0, (char *)0, 0}, + {(char *)"groupHandle", __pyx_getprop_6PyCafe_7pvgroup_groupHandle, __pyx_setprop_6PyCafe_7pvgroup_groupHandle, (char *)0, 0}, + {(char *)"rule", __pyx_getprop_6PyCafe_7pvgroup_rule, __pyx_setprop_6PyCafe_7pvgroup_rule, (char *)0, 0}, + {(char *)"hasAlarm", __pyx_getprop_6PyCafe_7pvgroup_hasAlarm, __pyx_setprop_6PyCafe_7pvgroup_hasAlarm, (char *)0, 0}, + {(char *)"hasTS", __pyx_getprop_6PyCafe_7pvgroup_hasTS, __pyx_setprop_6PyCafe_7pvgroup_hasTS, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvgroup = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvgroup", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvgroup), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvgroup, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvgroup, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvgroup, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvgroup, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvgroup, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvgroup, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_bschannel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_bschannel *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_bschannel *)o); + new((void*)&(p->name)) std::string(); + new((void*)&(p->type)) std::string(); + if (unlikely(__pyx_pw_6PyCafe_9bschannel_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_bschannel(PyObject *o) { + struct __pyx_obj_6PyCafe_bschannel *p = (struct __pyx_obj_6PyCafe_bschannel *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + __Pyx_call_destructor(p->name); + __Pyx_call_destructor(p->type); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_4name_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_4type_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_modulo(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_6modulo_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_6offset_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_9bschannel_BSEnabled(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_9bschannel_9BSEnabled_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_bschannel[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_9bschannel_3__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_9bschannel_5__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_bschannel[] = { + {(char *)"name", __pyx_getprop_6PyCafe_9bschannel_name, 0, (char *)0, 0}, + {(char *)"type", __pyx_getprop_6PyCafe_9bschannel_type, 0, (char *)0, 0}, + {(char *)"modulo", __pyx_getprop_6PyCafe_9bschannel_modulo, 0, (char *)0, 0}, + {(char *)"offset", __pyx_getprop_6PyCafe_9bschannel_offset, 0, (char *)0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_9bschannel_nelem, 0, (char *)0, 0}, + {(char *)"BSEnabled", __pyx_getprop_6PyCafe_9bschannel_BSEnabled, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_bschannel = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.bschannel", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_bschannel), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_bschannel, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_bschannel, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_bschannel, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_bschannel, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_BSData(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_BSData *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_BSData *)o); + new((void*)&(p->htype)) std::string(); + p->BSChannel = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pv = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pvIdx = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->handle = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->global_timestamp = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->gtsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->statusAsString = Py_None; Py_INCREF(Py_None); + p->hasNewData = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6BSData_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_BSData(PyObject *o) { + struct __pyx_obj_6PyCafe_BSData *p = (struct __pyx_obj_6PyCafe_BSData *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + __Pyx_call_destructor(p->htype); + Py_CLEAR(p->BSChannel); + Py_CLEAR(p->pv); + Py_CLEAR(p->pvIdx); + Py_CLEAR(p->handle); + Py_CLEAR(p->global_timestamp); + Py_CLEAR(p->gtsDate); + Py_CLEAR(p->statusAsString); + Py_CLEAR(p->hasNewData); + Py_CLEAR(p->pvdata); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_BSData(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_BSData *p = (struct __pyx_obj_6PyCafe_BSData *)o; + if (p->BSChannel) { + e = (*v)(p->BSChannel, a); if (e) return e; + } + if (p->pv) { + e = (*v)(p->pv, a); if (e) return e; + } + if (p->pvIdx) { + e = (*v)(p->pvIdx, a); if (e) return e; + } + if (p->handle) { + e = (*v)(p->handle, a); if (e) return e; + } + if (p->global_timestamp) { + e = (*v)(p->global_timestamp, a); if (e) return e; + } + if (p->gtsDate) { + e = (*v)(p->gtsDate, a); if (e) return e; + } + if (p->statusAsString) { + e = (*v)(p->statusAsString, a); if (e) return e; + } + if (p->hasNewData) { + e = (*v)(p->hasNewData, a); if (e) return e; + } + if (p->pvdata) { + e = (*v)(p->pvdata, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_BSData(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_BSData *p = (struct __pyx_obj_6PyCafe_BSData *)o; + tmp = ((PyObject*)p->BSChannel); + p->BSChannel = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pv); + p->pv = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pvIdx); + p->pvIdx = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->handle); + p->handle = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->global_timestamp); + p->global_timestamp = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->gtsDate); + p->gtsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->statusAsString); + p->statusAsString = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->hasNewData); + p->hasNewData = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->pvdata); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_htype(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_5htype_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_pulse_id(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_8pulse_id_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_BSChannel(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_9BSChannel_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_pv(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_2pv_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_pvIdx(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_5pvIdx_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_6handle_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_global_timestamp(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_16global_timestamp_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_gtsDate(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_7gtsDate_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_isBS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_4isBS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_nPV(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_3nPV_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_nBSEnabled(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_10nBSEnabled_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_nhwm(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_4nhwm_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_timeoutMS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_9timeoutMS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_nChannels(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_9nChannels_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_nNullData(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_9nNullData_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_pGoodData(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_9pGoodData_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_6status_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_statusAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_14statusAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_daqStop(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_7daqStop_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6BSData_daqStop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6BSData_7daqStop_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_hasNewData(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_10hasNewData_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6BSData_pvdata(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6BSData_6pvdata_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_BSData[] = { + {"__copy__", (PyCFunction)__pyx_pw_6PyCafe_6BSData_3__copy__, METH_NOARGS, 0}, + {"__deepcopy__", (PyCFunction)__pyx_pw_6PyCafe_6BSData_5__deepcopy__, METH_O, 0}, + {"compare", (PyCFunction)__pyx_pw_6PyCafe_6BSData_7compare, METH_O, 0}, + {"getIdxFromPVName", (PyCFunction)__pyx_pw_6PyCafe_6BSData_9getIdxFromPVName, METH_O, 0}, + {"getDaqStop", (PyCFunction)__pyx_pw_6PyCafe_6BSData_11getDaqStop, METH_NOARGS, 0}, + {"setDaqStop", (PyCFunction)__pyx_pw_6PyCafe_6BSData_13setDaqStop, METH_O, 0}, + {"getVal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6BSData_15getVal, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6BSData_17getPV, METH_VARARGS|METH_KEYWORDS, 0}, + {"show", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6BSData_19show, METH_VARARGS|METH_KEYWORDS, 0}, + {"showAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6BSData_21showAll, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6BSData_23__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6BSData_25__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_BSData[] = { + {(char *)"htype", __pyx_getprop_6PyCafe_6BSData_htype, 0, (char *)0, 0}, + {(char *)"pulse_id", __pyx_getprop_6PyCafe_6BSData_pulse_id, 0, (char *)0, 0}, + {(char *)"BSChannel", __pyx_getprop_6PyCafe_6BSData_BSChannel, 0, (char *)0, 0}, + {(char *)"pv", __pyx_getprop_6PyCafe_6BSData_pv, 0, (char *)0, 0}, + {(char *)"pvIdx", __pyx_getprop_6PyCafe_6BSData_pvIdx, 0, (char *)0, 0}, + {(char *)"handle", __pyx_getprop_6PyCafe_6BSData_handle, 0, (char *)0, 0}, + {(char *)"global_timestamp", __pyx_getprop_6PyCafe_6BSData_global_timestamp, 0, (char *)0, 0}, + {(char *)"gtsDate", __pyx_getprop_6PyCafe_6BSData_gtsDate, 0, (char *)0, 0}, + {(char *)"isBS", __pyx_getprop_6PyCafe_6BSData_isBS, 0, (char *)0, 0}, + {(char *)"nPV", __pyx_getprop_6PyCafe_6BSData_nPV, 0, (char *)0, 0}, + {(char *)"nBSEnabled", __pyx_getprop_6PyCafe_6BSData_nBSEnabled, 0, (char *)0, 0}, + {(char *)"nhwm", __pyx_getprop_6PyCafe_6BSData_nhwm, 0, (char *)0, 0}, + {(char *)"timeoutMS", __pyx_getprop_6PyCafe_6BSData_timeoutMS, 0, (char *)0, 0}, + {(char *)"nChannels", __pyx_getprop_6PyCafe_6BSData_nChannels, 0, (char *)0, 0}, + {(char *)"nNullData", __pyx_getprop_6PyCafe_6BSData_nNullData, 0, (char *)0, 0}, + {(char *)"pGoodData", __pyx_getprop_6PyCafe_6BSData_pGoodData, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6BSData_status, 0, (char *)0, 0}, + {(char *)"statusAsString", __pyx_getprop_6PyCafe_6BSData_statusAsString, 0, (char *)0, 0}, + {(char *)"daqStop", __pyx_getprop_6PyCafe_6BSData_daqStop, __pyx_setprop_6PyCafe_6BSData_daqStop, (char *)0, 0}, + {(char *)"hasNewData", __pyx_getprop_6PyCafe_6BSData_hasNewData, 0, (char *)0, 0}, + {(char *)"pvdata", __pyx_getprop_6PyCafe_6BSData_pvdata, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_BSData = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.BSData", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_BSData), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_BSData, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_BSData, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_BSData, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_BSData, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_BSData, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_BSData, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_SFDBPMData(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_SFDBPMData *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_SFDBPMData *)o); + p->x = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->y = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->q = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->Energy = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->xStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->yStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->qStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->EnergyStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->device = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_10SFDBPMData_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_SFDBPMData(PyObject *o) { + struct __pyx_obj_6PyCafe_SFDBPMData *p = (struct __pyx_obj_6PyCafe_SFDBPMData *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->x); + Py_CLEAR(p->y); + Py_CLEAR(p->q); + Py_CLEAR(p->Energy); + Py_CLEAR(p->xStatus); + Py_CLEAR(p->yStatus); + Py_CLEAR(p->qStatus); + Py_CLEAR(p->EnergyStatus); + Py_CLEAR(p->device); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_SFDBPMData(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_SFDBPMData *p = (struct __pyx_obj_6PyCafe_SFDBPMData *)o; + if (p->x) { + e = (*v)(p->x, a); if (e) return e; + } + if (p->y) { + e = (*v)(p->y, a); if (e) return e; + } + if (p->q) { + e = (*v)(p->q, a); if (e) return e; + } + if (p->Energy) { + e = (*v)(p->Energy, a); if (e) return e; + } + if (p->xStatus) { + e = (*v)(p->xStatus, a); if (e) return e; + } + if (p->yStatus) { + e = (*v)(p->yStatus, a); if (e) return e; + } + if (p->qStatus) { + e = (*v)(p->qStatus, a); if (e) return e; + } + if (p->EnergyStatus) { + e = (*v)(p->EnergyStatus, a); if (e) return e; + } + if (p->device) { + e = (*v)(p->device, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_SFDBPMData(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_SFDBPMData *p = (struct __pyx_obj_6PyCafe_SFDBPMData *)o; + tmp = ((PyObject*)p->x); + p->x = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->y); + p->y = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->q); + p->q = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->Energy); + p->Energy = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->xStatus); + p->xStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->yStatus); + p->yStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->qStatus); + p->qStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->EnergyStatus); + p->EnergyStatus = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->device); + p->device = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_x(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_1x_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_y(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_1y_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_q(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_1q_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_Energy(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_6Energy_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_xStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_7xStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_yStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_7yStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_qStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_7qStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_EnergyStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_12EnergyStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_isAllXOK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_8isAllXOK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_isAllYOK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_8isAllYOK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_isAllQOK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_8isAllQOK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_isAllOK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_7isAllOK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_device(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_6device_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_10SFDBPMData_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_10SFDBPMData_6status_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_SFDBPMData[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_10SFDBPMData_3__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_10SFDBPMData_5__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_SFDBPMData[] = { + {(char *)"x", __pyx_getprop_6PyCafe_10SFDBPMData_x, 0, (char *)0, 0}, + {(char *)"y", __pyx_getprop_6PyCafe_10SFDBPMData_y, 0, (char *)0, 0}, + {(char *)"q", __pyx_getprop_6PyCafe_10SFDBPMData_q, 0, (char *)0, 0}, + {(char *)"Energy", __pyx_getprop_6PyCafe_10SFDBPMData_Energy, 0, (char *)0, 0}, + {(char *)"xStatus", __pyx_getprop_6PyCafe_10SFDBPMData_xStatus, 0, (char *)0, 0}, + {(char *)"yStatus", __pyx_getprop_6PyCafe_10SFDBPMData_yStatus, 0, (char *)0, 0}, + {(char *)"qStatus", __pyx_getprop_6PyCafe_10SFDBPMData_qStatus, 0, (char *)0, 0}, + {(char *)"EnergyStatus", __pyx_getprop_6PyCafe_10SFDBPMData_EnergyStatus, 0, (char *)0, 0}, + {(char *)"isAllXOK", __pyx_getprop_6PyCafe_10SFDBPMData_isAllXOK, 0, (char *)0, 0}, + {(char *)"isAllYOK", __pyx_getprop_6PyCafe_10SFDBPMData_isAllYOK, 0, (char *)0, 0}, + {(char *)"isAllQOK", __pyx_getprop_6PyCafe_10SFDBPMData_isAllQOK, 0, (char *)0, 0}, + {(char *)"isAllOK", __pyx_getprop_6PyCafe_10SFDBPMData_isAllOK, 0, (char *)0, 0}, + {(char *)"device", __pyx_getprop_6PyCafe_10SFDBPMData_device, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_10SFDBPMData_status, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_SFDBPMData = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.SFDBPMData", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_SFDBPMData), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_SFDBPMData, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_SFDBPMData, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_SFDBPMData, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_SFDBPMData, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_SFDBPMData, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_SFDBPMData, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_CyCafe __pyx_vtable_6PyCafe_CyCafe; + +static PyObject *__pyx_tp_new_6PyCafe_CyCafe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_CyCafe *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CyCafe *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_CyCafe; + new((void*)&(p->valStr)) std::string(); + new((void*)&(p->vFloat)) std::vector (); + new((void*)&(p->vInt)) std::vector (); + new((void*)&(p->vStr)) std::vector (); + new((void*)&(p->cs)) CAFEStatus(); + new((void*)&(p->css)) CAFEStatusSeverity(); + new((void*)&(p->hh)) HandleHelper(); + new((void*)&(p->ph)) PolicyHelper(); + new((void*)&(p->channelInfo)) ChannelRegalia(); + new((void*)&(p->dbpm)) DBPMKeeper(); + new((void*)&(p->bsd)) BSDataHolder(); + p->_exception_text = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6CyCafe_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCafe(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCafe *p = (struct __pyx_obj_6PyCafe_CyCafe *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + __Pyx_call_destructor(p->valStr); + __Pyx_call_destructor(p->vFloat); + __Pyx_call_destructor(p->vInt); + __Pyx_call_destructor(p->vStr); + __Pyx_call_destructor(p->cs); + __Pyx_call_destructor(p->css); + __Pyx_call_destructor(p->hh); + __Pyx_call_destructor(p->ph); + __Pyx_call_destructor(p->channelInfo); + __Pyx_call_destructor(p->dbpm); + __Pyx_call_destructor(p->bsd); + Py_CLEAR(p->_exception_text); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6CyCafe_enableExceptions(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6CyCafe_enableExceptions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCafe[] = { + {"setPyConnectCallbackFn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_5setPyConnectCallbackFn, METH_VARARGS|METH_KEYWORDS, 0}, + {"setPyCallbackConnect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_7setPyCallbackConnect, METH_VARARGS|METH_KEYWORDS, 0}, + {"init", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_9init, METH_NOARGS, __pyx_doc_6PyCafe_6CyCafe_8init}, + {"withExceptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_11withExceptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6PyCafe_6CyCafe_10withExceptions}, + {"isValid", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_13isValid, METH_O, 0}, + {"removeWidget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_15removeWidget, METH_VARARGS|METH_KEYWORDS, 0}, + {"addWidget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_17addWidget, METH_VARARGS|METH_KEYWORDS, 0}, + {"getWidgets", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_19getWidgets, METH_O, 0}, + {"open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_21open, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6PyCafe_6CyCafe_20open}, + {"openNoWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_23openNoWait, METH_NOARGS, 0}, + {"openPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_25openPrepare, METH_NOARGS, 0}, + {"openGroupPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_27openGroupPrepare, METH_NOARGS, 0}, + {"setOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_29setOpenDefaultPendTime, METH_O, 0}, + {"getOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_31getOpenDefaultPendTime, METH_NOARGS, 0}, + {"openNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_33openNow, METH_NOARGS, 0}, + {"openNowAndWait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_35openNowAndWait, METH_VARARGS|METH_KEYWORDS, 0}, + {"openGroupNowAndWait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_37openGroupNowAndWait, METH_VARARGS|METH_KEYWORDS, 0}, + {"openGroupNowAndWaitForInputGroups", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_39openGroupNowAndWaitForInputGroups, METH_VARARGS|METH_KEYWORDS, 0}, + {"openMonitorPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_41openMonitorPrepare, METH_NOARGS, 0}, + {"openMonitorNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_43openMonitorNow, METH_NOARGS, 0}, + {"openMonitorNowAndWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_45openMonitorNowAndWait, METH_O, 0}, + {"ca_pend_event", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_47ca_pend_event, METH_O, 0}, + {"ca_pend_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_49ca_pend_io, METH_O, 0}, + {"ca_poll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_51ca_poll, METH_NOARGS, 0}, + {"ca_flush_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_53ca_flush_io, METH_NOARGS, 0}, + {"setChannelRequestPolicyGet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_55setChannelRequestPolicyGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"initCallbackComplete", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_57initCallbackComplete, METH_O, 0}, + {"setCallbackGet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_59setCallbackGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCallbackPut", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_61setCallbackPut, METH_VARARGS|METH_KEYWORDS, 0}, + {"setTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_63setTimeout, METH_O, 0}, + {"getTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_65getTimeoutGet, METH_NOARGS, 0}, + {"getTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_67getTimeoutPut, METH_NOARGS, 0}, + {"setSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_69setSelfGoverningTimeout, METH_O, 0}, + {"setSGTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_71setSGTimeout, METH_O, 0}, + {"getSGTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_73getSGTimeoutGet, METH_NOARGS, 0}, + {"getSGTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_75getSGTimeoutPut, METH_NOARGS, 0}, + {"setSGSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_77setSGSelfGoverningTimeout, METH_O, 0}, + {"getContext", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_79getContext, METH_O, 0}, + {"attachContext", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_81attachContext, METH_O, 0}, + {"collectionDefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_83collectionDefine, METH_VARARGS|METH_KEYWORDS, 0}, + {"defineCollection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_85defineCollection, METH_VARARGS|METH_KEYWORDS, 0}, + {"collectionList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_87collectionList, METH_NOARGS, 0}, + {"collectionMemberList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_89collectionMemberList, METH_O, 0}, + {"loadCollectionsFromXML", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_91loadCollectionsFromXML, METH_O, 0}, + {"loadGroupsFromXML", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_93loadGroupsFromXML, METH_O, 0}, + {"devicePositionMap", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_95devicePositionMap, METH_O, 0}, + {"devicePositionV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_97devicePositionV, METH_O, 0}, + {"groupList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_99groupList, METH_NOARGS, 0}, + {"getDataTypeNative", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_101getDataTypeNative, METH_O, 0}, + {"getDataTypeRequest", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_103getDataTypeRequest, METH_O, 0}, + {"getMonitorIDInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_105getMonitorIDInCallback, METH_O, 0}, + {"getDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_107getDataTypeInCallback, METH_O, 0}, + {"getDbrDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_109getDbrDataTypeInCallback, METH_O, 0}, + {"getDbrBaseInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_111getDbrBaseInCallback, METH_O, 0}, + {"getHandlesFromWithinGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_113getHandlesFromWithinGroup, METH_O, 0}, + {"close", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_115close, METH_O, 0}, + {"closeChannels", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_117closeChannels, METH_NOARGS, 0}, + {"closeHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_119closeHandles, METH_O, 0}, + {"closeDisconnectedChannelsWithinGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_121closeDisconnectedChannelsWithinGroup, METH_O, 0}, + {"closeChannelKeepHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_123closeChannelKeepHandle, METH_O, 0}, + {"reconnect", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_125reconnect, METH_O, 0}, + {"allConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_127allConnected, METH_NOARGS, 0}, + {"isConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_129isConnected, METH_O, 0}, + {"supplementHandles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_131supplementHandles, METH_VARARGS|METH_KEYWORDS, 0}, + {"supplementHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_133supplementHandle, METH_O, 0}, + {"supplementHandlesV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_135supplementHandlesV, METH_O, 0}, + {"printDisconnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_137printDisconnected, METH_NOARGS, 0}, + {"printDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_139printDisconnectedHandles, METH_NOARGS, 0}, + {"printHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_141printHandles, METH_NOARGS, 0}, + {"printHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_143printHandle, METH_O, 0}, + {"printHandlesV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_145printHandlesV, METH_O, 0}, + {"getDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_147getDisconnectedHandles, METH_NOARGS, 0}, + {"getHandles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_149getHandles, METH_VARARGS|METH_KEYWORDS, 0}, + {"getHandleStates", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_151getHandleStates, METH_NOARGS, 0}, + {"getStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_153getStatusSeverity, METH_O, 0}, + {"getStatusCodeAsText", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_155getStatusCodeAsText, METH_O, 0}, + {"getStatusCodeAsString", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_157getStatusCodeAsString, METH_O, 0}, + {"getStatusInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_159getStatusInfo, METH_O, 0}, + {"getStatusMsg", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_161getStatusMsg, METH_O, 0}, + {"getStatus", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_163getStatus, METH_O, 0}, + {"getChannelDevice", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_165getChannelDevice, METH_O, 0}, + {"getChannelAttribute", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_167getChannelAttribute, METH_O, 0}, + {"getDescription", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_169getDescription, METH_O, 0}, + {"hasDescription", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_171hasDescription, METH_O, 0}, + {"getUnits", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_173getUnits, METH_O, 0}, + {"getPrecision", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_175getPrecision, METH_O, 0}, + {"hasAlarmStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_177hasAlarmStatusSeverity, METH_O, 0}, + {"getAlarmStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_179getAlarmStatusSeverity, METH_O, 0}, + {"getTimeStamp", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_181getTimeStamp, METH_O, 0}, + {"getTimeStampAsDate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_183getTimeStampAsDate, METH_O, 0}, + {"checkForHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_185checkForHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForHandleList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_187checkForHandleList, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForGroupHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_189checkForGroupHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVNameFromHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_191getPVNameFromHandle, METH_O, 0}, + {"getHandleFromPVName", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_193getHandleFromPVName, METH_O, 0}, + {"getPVFromHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_195getPVFromHandle, METH_O, 0}, + {"getHandleFromPV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPV, METH_O, 0}, + {"getChannelDataStore", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_199getChannelDataStore, METH_O, 0}, + {"getChannelInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_201getChannelInfo, METH_O, 0}, + {"getChannelList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_203getChannelList, METH_O, 0}, + {"getWFAsString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_205getWFAsString, METH_VARARGS|METH_KEYWORDS, 0}, + {"getWFAsStringCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_207getWFAsStringCache, METH_O, 0}, + {"isEnum", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_209isEnum, METH_O, 0}, + {"getEnumStrings", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_211getEnumStrings, METH_O, 0}, + {"getEnumFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_213getEnumFromString, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStringFromEnum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_215getStringFromEnum, METH_VARARGS|METH_KEYWORDS, 0}, + {"loadSFGroups", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_217loadSFGroups, METH_NOARGS, 0}, + {"loadSFGroupsWithBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_219loadSFGroupsWithBase, METH_O, 0}, + {"setDbrBase", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_221setDbrBase, METH_VARARGS|METH_KEYWORDS, 0}, + {"getDbrBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_223getDbrBase, METH_O, 0}, + {"setGetCacheWaitPolicy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetCacheWaitPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles, METH_O, 0}, + {"setGetActionWhenMonitorPolicy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetActionWhenMonitorPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles, METH_O, 0}, + {"getNonBlocking", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking, METH_O, __pyx_doc_6PyCafe_6CyCafe_232getNonBlocking}, + {"getStr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_235getStr, METH_VARARGS|METH_KEYWORDS, 0}, + {"getInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_237getInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_239getFloat, METH_VARARGS|METH_KEYWORDS, 0}, + {"caget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_241caget, METH_VARARGS|METH_KEYWORDS, 0}, + {"caput", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_243caput, METH_VARARGS|METH_KEYWORDS, 0}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_245get, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_247getIntList, METH_O, 0}, + {"getFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_249getFloatList, METH_O, 0}, + {"getStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_251getStrList, METH_O, 0}, + {"getList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_253getList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_255getStrArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_257getIntArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_259getFloatArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_261getArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_263getPVInt, METH_O, 0}, + {"getPVFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_265getPVFloat, METH_O, 0}, + {"getPVStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_267getPVStr, METH_O, 0}, + {"getPV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_269getPV, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_271getPVStrList, METH_O, 0}, + {"getPVIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_273getPVIntList, METH_O, 0}, + {"getPVFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList, METH_O, 0}, + {"getPVList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_277getPVList, METH_VARARGS|METH_KEYWORDS, 0}, + {"printStatusIfError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError, METH_VARARGS|METH_KEYWORDS, 0}, + {"getAsyn", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_281getAsyn, METH_O, 0}, + {"waitForGetEvent", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent, METH_O, 0}, + {"waitForBundledEvents", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents, METH_O, 0}, + {"getScalarArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_287getScalarArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList, METH_O, 0}, + {"getIntScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList, METH_O, 0}, + {"getFloatScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList, METH_O, 0}, + {"getScalarList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_295getScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getDictionary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_297getDictionary, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_299getCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundPVGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_303getStrCache, METH_O, 0}, + {"getIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_305getIntCache, METH_O, 0}, + {"getFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_307getFloatCache, METH_O, 0}, + {"getCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_309getCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_317getArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache, METH_O, 0}, + {"getPVIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache, METH_O, 0}, + {"getPVFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache, METH_O, 0}, + {"getPVCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_325getPVCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_327getCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrlCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStop", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop, METH_O, 0}, + {"getMonitorPolicyVector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_335groupMonitor, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStartWithCBList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getHandleFromPVWithinGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_343getGroupStr, METH_O, 0}, + {"getGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_345getGroupInt, METH_O, 0}, + {"getGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat, METH_O, 0}, + {"getGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_349getGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_351getGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr, METH_O, 0}, + {"getPVGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt, METH_O, 0}, + {"getPVGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat, METH_O, 0}, + {"getPVGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_359getPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"PVGroupValuesToList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList, METH_O, 0}, + {"groupMemberList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_365groupMemberList, METH_O, 0}, + {"grouping", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_367grouping, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupDefineFromCollection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupDefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_371groupDefine, METH_VARARGS|METH_KEYWORDS, 0}, + {"defineGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_373defineGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupOpen", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_375groupOpen, METH_O, 0}, + {"groupClose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_377groupClose, METH_VARARGS|METH_KEYWORDS, 0}, + {"isGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_379isGroup, METH_O, 0}, + {"isCollection", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_381isCollection, METH_O, 0}, + {"getNoMonitors", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors, METH_O, 0}, + {"getMonitorIDs", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDs, METH_O, 0}, + {"monitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_387monitor, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_389monitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_391monitorStop, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStopAll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_393monitorStopAll, METH_NOARGS, 0}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_395set, METH_VARARGS|METH_KEYWORDS, 0}, + {"setScalarList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_397setScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCompoundList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_399setCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_401setGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"gameSetAndMatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_403gameSetAndMatch, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatchMany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_405setAndMatchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_407setAndMatch, METH_VARARGS|METH_KEYWORDS, 0}, + {"matchMany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_409matchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"match", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_411match, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemCtrl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_413setNelemCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_415setNelem, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemToNative", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_417setNelemToNative, METH_O, 0}, + {"setNelemToRetrieveFromCacheToOne", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_419setNelemToRetrieveFromCacheToOne, METH_O, 0}, + {"setNelemToRetrieveFromCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_421setNelemToRetrieveFromCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"terminate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_423terminate, METH_NOARGS, 0}, + {"prepareSFdbpm", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_425prepareSFdbpm, METH_NOARGS, 0}, + {"setSFdbpmBS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_427setSFdbpmBS, METH_VARARGS|METH_KEYWORDS, 0}, + {"resetSFdbpmBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_429resetSFdbpmBS, METH_NOARGS, 0}, + {"closeSFdbpmBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_431closeSFdbpmBS, METH_NOARGS, 0}, + {"readSFdbpmOffsets", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_433readSFdbpmOffsets, METH_NOARGS, 0}, + {"getSFdbpm", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_435getSFdbpm, METH_NOARGS, 0}, + {"getSFdbpmOffs_x", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_437getSFdbpmOffs_x, METH_NOARGS, 0}, + {"getSFdbpmOffs_y", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_439getSFdbpmOffs_y, METH_NOARGS, 0}, + {"setBS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_441setBS, METH_VARARGS|METH_KEYWORDS, 0}, + {"initBSwithCA", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_443initBSwithCA, METH_NOARGS, 0}, + {"setBS2CA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_445setBS2CA, METH_VARARGS|METH_KEYWORDS, 0}, + {"getBSSlim", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_447getBSSlim, METH_NOARGS, 0}, + {"getBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_449getBS, METH_NOARGS, 0}, + {"closeBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_451closeBS, METH_NOARGS, 0}, + {"getTimeoutMSBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_453getTimeoutMSBS, METH_NOARGS, 0}, + {"setTimeoutMSBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_455setTimeoutMSBS, METH_O, 0}, + {"reconnectBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_457reconnectBS, METH_NOARGS, 0}, + {"flushBS", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_459flushBS, METH_NOARGS, 0}, + {"monitorPulseID", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_461monitorPulseID, METH_NOARGS, 0}, + {"monitorStopPulseID", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_463monitorStopPulseID, METH_NOARGS, 0}, + {"setPulseIDBufferSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_465setPulseIDBufferSize, METH_VARARGS|METH_KEYWORDS, 0}, + {"setPulseIDBufferSizeAll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_467setPulseIDBufferSizeAll, METH_VARARGS|METH_KEYWORDS, 0}, + {"setBSInit", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_469setBSInit, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_471__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_473__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCafe[] = { + {(char *)"enableExceptions", __pyx_getprop_6PyCafe_6CyCafe_enableExceptions, __pyx_setprop_6PyCafe_6CyCafe_enableExceptions, (char *)"Activate/deactivate CAFE exceptions for single channel operations.\n\n The default value is True. \n If set to False, the user is obliged to examine the return code of any \n set/get method that instigates a CAFE transaction on a single channel.\n\n Returns:\n bool: The current value\n ::\n\n cafe.enableExceptions = True | False\n res = cafe.enableExceptions\n\n ", 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CyCafe = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CyCafe", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CyCafe), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CyCafe, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + "\n Class with associated process variable meta data.\n\n Attributes:\n _c_cafe (PyCafe.CAFE): The CAFE class. \n _enable_exceptions (bool): Activates exceptions for single pv operations \n _exception_text (str): Default text for CyCafe exceptions that do not\n originate from the C++ CAFE exception\n\n ", /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CyCafe, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CyCafe, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CyCafe, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[8]; +static int __pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv = 0; + +static PyObject *__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)))) { + o = (PyObject*)__pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[--__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv]; + memset(o, 0, sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_func); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)))) { + __pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv++] = ((struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + if (p->__pyx_v_func) { + e = (*v)(p->__pyx_v_func, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + tmp = ((PyObject*)p->__pyx_v_func); + p->__pyx_v_func = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.__pyx_scope_struct__verify_handlepv", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_array __pyx_vtable_array; + +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_array_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_array_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_array; + p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_array(PyObject *o) { + struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_array___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->mode); + Py_CLEAR(p->_format); + (*Py_TYPE(o)->tp_free)(o); +} +static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_array___setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { + PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_array___getattr__(o, n); + } + return v; +} + +static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); +} + +static PyMethodDef __pyx_methods_array[] = { + {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_array[] = { + {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_array = { + __pyx_array___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_array, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_array = { + __pyx_array___len__, /*mp_length*/ + __pyx_array___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_array = { + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getreadbuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getwritebuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getsegcount*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getcharbuffer*/ + #endif + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_array = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.array", /*tp_name*/ + sizeof(struct __pyx_array_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_array, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + __pyx_tp_getattro_array, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_array, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_array, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_array, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_MemviewEnum_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_MemviewEnum_obj *)o); + p->name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_Enum(PyObject *o) { + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_Enum(PyObject *o) { + PyObject* tmp; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_Enum[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type___pyx_MemviewEnum = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.Enum", /*tp_name*/ + sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_Enum, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + __pyx_MemviewEnum___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_Enum, /*tp_traverse*/ + __pyx_tp_clear_Enum, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_Enum, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_MemviewEnum___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_Enum, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; + +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryview_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryview_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_memoryview; + p->obj = Py_None; Py_INCREF(Py_None); + p->_size = Py_None; Py_INCREF(Py_None); + p->_array_interface = Py_None; Py_INCREF(Py_None); + p->view.obj = NULL; + if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_memoryview(PyObject *o) { + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_memoryview___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->obj); + Py_CLEAR(p->_size); + Py_CLEAR(p->_array_interface); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + if (p->obj) { + e = (*v)(p->obj, a); if (e) return e; + } + if (p->_size) { + e = (*v)(p->_size, a); if (e) return e; + } + if (p->_array_interface) { + e = (*v)(p->_array_interface, a); if (e) return e; + } + if (p->view.obj) { + e = (*v)(p->view.obj, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_memoryview(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + tmp = ((PyObject*)p->obj); + p->obj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_size); + p->_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_array_interface); + p->_array_interface = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + Py_CLEAR(p->view.obj); + return 0; +} +static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_memoryview___setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); +} + +static PyMethodDef __pyx_methods_memoryview[] = { + {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0}, + {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0}, + {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0}, + {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_memoryview[] = { + {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0}, + {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0}, + {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0}, + {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0}, + {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0}, + {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0}, + {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0}, + {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0}, + {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_memoryview = { + __pyx_memoryview___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_memoryview, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_memoryview = { + __pyx_memoryview___len__, /*mp_length*/ + __pyx_memoryview___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getreadbuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getwritebuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getsegcount*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getcharbuffer*/ + #endif + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_memoryview = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.memoryview", /*tp_name*/ + sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + __pyx_memoryview___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_memoryview___str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_memoryview, /*tp_traverse*/ + __pyx_tp_clear_memoryview, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_memoryview, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_memoryview, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_memoryview, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; + +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryviewslice_obj *p; + PyObject *o = __pyx_tp_new_memoryview(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryviewslice_obj *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; + p->from_object = Py_None; Py_INCREF(Py_None); + p->from_slice.memview = NULL; + return o; +} + +static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_memoryviewslice___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->from_object); + PyObject_GC_Track(o); + __pyx_tp_dealloc_memoryview(o); +} + +static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; + if (p->from_object) { + e = (*v)(p->from_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear__memoryviewslice(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + __pyx_tp_clear_memoryview(o); + tmp = ((PyObject*)p->from_object); + p->from_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + __PYX_XDEC_MEMVIEW(&p->from_slice, 1); + return 0; +} + +static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o); +} + +static PyMethodDef __pyx_methods__memoryviewslice[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = { + {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type___pyx_memoryviewslice = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe._memoryviewslice", /*tp_name*/ + sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + #if CYTHON_COMPILING_IN_PYPY + __pyx_memoryview___repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_memoryview___str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + "Internal class for passing memoryview slices to Python", /*tp_doc*/ + __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ + __pyx_tp_clear__memoryviewslice, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods__memoryviewslice, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets__memoryviewslice, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new__memoryviewslice, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_PyCafe(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_PyCafe}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "PyCafe", + __pyx_k_Cython_interface_to_the_C_CAFE_l, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0}, + {&__pyx_kp_u_0_1_2_3_4_5, __pyx_k_0_1_2_3_4_5, sizeof(__pyx_k_0_1_2_3_4_5), 0, 1, 0, 0}, + {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0}, + {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, + {&__pyx_kp_u_A_handle_can_never_hold_a_negati, __pyx_k_A_handle_can_never_hold_a_negati, sizeof(__pyx_k_A_handle_can_never_hold_a_negati), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_ChannelGetActionWhenMoni, __pyx_k_Allowed_ChannelGetActionWhenMoni, sizeof(__pyx_k_Allowed_ChannelGetActionWhenMoni), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_ChannelGetCacheWaitPolic, __pyx_k_Allowed_ChannelGetCacheWaitPolic, sizeof(__pyx_k_Allowed_ChannelGetCacheWaitPolic), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_DBR_TYPEs_are, __pyx_k_Allowed_DBR_TYPEs_are, sizeof(__pyx_k_Allowed_DBR_TYPEs_are), 0, 1, 0, 0}, + {&__pyx_kp_u_Analysing_statusList, __pyx_k_Analysing_statusList, sizeof(__pyx_k_Analysing_statusList), 0, 1, 0, 0}, + {&__pyx_kp_u_Anomoly_in_BSData_deepcopy_Unequ, __pyx_k_Anomoly_in_BSData_deepcopy_Unequ, sizeof(__pyx_k_Anomoly_in_BSData_deepcopy_Unequ), 0, 1, 0, 0}, + {&__pyx_n_s_Array, __pyx_k_Array, sizeof(__pyx_k_Array), 0, 0, 1, 1}, + {&__pyx_kp_u_Assuming_DBR_TIME, __pyx_k_Assuming_DBR_TIME, sizeof(__pyx_k_Assuming_DBR_TIME), 0, 1, 0, 0}, + {&__pyx_n_u_BS, __pyx_k_BS, sizeof(__pyx_k_BS), 0, 1, 0, 1}, + {&__pyx_n_s_BSCA, __pyx_k_BSCA, sizeof(__pyx_k_BSCA), 0, 0, 1, 1}, + {&__pyx_n_s_BSData, __pyx_k_BSData, sizeof(__pyx_k_BSData), 0, 0, 1, 1}, + {&__pyx_n_s_BSEnabled, __pyx_k_BSEnabled, sizeof(__pyx_k_BSEnabled), 0, 0, 1, 1}, + {&__pyx_kp_u_BS_2, __pyx_k_BS_2, sizeof(__pyx_k_BS_2), 0, 1, 0, 0}, + {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, + {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1}, + {&__pyx_n_u_CA, __pyx_k_CA, sizeof(__pyx_k_CA), 0, 1, 0, 1}, + {&__pyx_n_u_CAFEException, __pyx_k_CAFEException, sizeof(__pyx_k_CAFEException), 0, 1, 0, 1}, + {&__pyx_kp_u_CALLBACK_NOT_FOUND_FOR_handle_mo, __pyx_k_CALLBACK_NOT_FOUND_FOR_handle_mo, sizeof(__pyx_k_CALLBACK_NOT_FOUND_FOR_handle_mo), 0, 1, 0, 0}, + {&__pyx_kp_u_CA_2, __pyx_k_CA_2, sizeof(__pyx_k_CA_2), 0, 1, 0, 0}, + {&__pyx_n_u_CafeError, __pyx_k_CafeError, sizeof(__pyx_k_CafeError), 0, 1, 0, 1}, + {&__pyx_kp_u_CafeException, __pyx_k_CafeException, sizeof(__pyx_k_CafeException), 0, 1, 0, 0}, + {&__pyx_n_s_CafeException_2, __pyx_k_CafeException_2, sizeof(__pyx_k_CafeException_2), 0, 0, 1, 1}, + {&__pyx_n_u_CafePVError, __pyx_k_CafePVError, sizeof(__pyx_k_CafePVError), 0, 1, 0, 1}, + {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0}, + {&__pyx_n_u_Channel, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 1, 0, 1}, + {&__pyx_n_s_CyCa, __pyx_k_CyCa, sizeof(__pyx_k_CyCa), 0, 0, 1, 1}, + {&__pyx_n_s_CyCafe, __pyx_k_CyCafe, sizeof(__pyx_k_CyCafe), 0, 0, 1, 1}, + {&__pyx_n_s_Cython, __pyx_k_Cython, sizeof(__pyx_k_Cython), 0, 0, 1, 1}, + {&__pyx_n_s_Cython_Compiler_Options, __pyx_k_Cython_Compiler_Options, sizeof(__pyx_k_Cython_Compiler_Options), 0, 0, 1, 1}, + {&__pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2, __pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2, sizeof(__pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Data_to_be_presented_in_native_d, __pyx_k_Data_to_be_presented_in_native_d, sizeof(__pyx_k_Data_to_be_presented_in_native_d), 0, 1, 0, 0}, + {&__pyx_kp_u_Datatype_unknown_returning_value, __pyx_k_Datatype_unknown_returning_value, sizeof(__pyx_k_Datatype_unknown_returning_value), 0, 1, 0, 0}, + {&__pyx_kp_u_ENUM_string_value, __pyx_k_ENUM_string_value, sizeof(__pyx_k_ENUM_string_value), 0, 1, 0, 0}, + {&__pyx_kp_u_ENUM_value, __pyx_k_ENUM_value, sizeof(__pyx_k_ENUM_value), 0, 1, 0, 0}, + {&__pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH, __pyx_k_ERROR_GROUP_MEMBER_MISMATCH, sizeof(__pyx_k_ERROR_GROUP_MEMBER_MISMATCH), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3), 0, 1, 0, 0}, + {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1}, + {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0}, + {&__pyx_kp_u_Entering_0_for_element, __pyx_k_Entering_0_for_element, sizeof(__pyx_k_Entering_0_for_element), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_Warning_from_def_getAsyn, __pyx_k_Error_Warning_from_def_getAsyn, sizeof(__pyx_k_Error_Warning_from_def_getAsyn), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_Element, __pyx_k_Error_in_Element, sizeof(__pyx_k_Error_in_Element), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa, __pyx_k_Error_in_PyCafe_def_getPVGroupCa, sizeof(__pyx_k_Error_in_PyCafe_def_getPVGroupCa), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S, __pyx_k_Error_in_PyCafe_def_getPVGroup_S, sizeof(__pyx_k_Error_in_PyCafe_def_getPVGroup_S), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getCompoundList, __pyx_k_Error_in_def_getCompoundList, sizeof(__pyx_k_Error_in_def_getCompoundList), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getScalarArray, __pyx_k_Error_in_def_getScalarArray, sizeof(__pyx_k_Error_in_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getScalarList, __pyx_k_Error_in_def_getScalarList, sizeof(__pyx_k_Error_in_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_grouping_for_group, __pyx_k_Error_in_def_grouping_for_group, sizeof(__pyx_k_Error_in_def_grouping_for_group), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_waitForBundledEvent, __pyx_k_Error_in_def_waitForBundledEvent, sizeof(__pyx_k_Error_in_def_waitForBundledEvent), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_from_CyCafe_met, __pyx_k_Exception_raised_from_CyCafe_met, sizeof(__pyx_k_Exception_raised_from_CyCafe_met), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_in, __pyx_k_Exception_raised_in, sizeof(__pyx_k_Exception_raised_in), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_in_PyCafe_pyx, __pyx_k_Exception_raised_in_PyCafe_pyx, sizeof(__pyx_k_Exception_raised_in_PyCafe_pyx), 0, 1, 0, 0}, + {&__pyx_kp_u_Execute_getEnumStrings_handlePV, __pyx_k_Execute_getEnumStrings_handlePV, sizeof(__pyx_k_Execute_getEnumStrings_handlePV), 0, 1, 0, 0}, + {&__pyx_kp_u_Failed_to_instantiate_CAFE, __pyx_k_Failed_to_instantiate_CAFE, sizeof(__pyx_k_Failed_to_instantiate_CAFE), 0, 1, 0, 0}, + {&__pyx_kp_u_First_Input_argument_should_be_o, __pyx_k_First_Input_argument_should_be_o, sizeof(__pyx_k_First_Input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_First_Input_argument_should_be_o_2, __pyx_k_First_Input_argument_should_be_o_2, sizeof(__pyx_k_First_Input_argument_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_if_not_list, __pyx_k_First_input_argument_if_not_list, sizeof(__pyx_k_First_input_argument_if_not_list), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_if_not_list_2, __pyx_k_First_input_argument_if_not_list_2, sizeof(__pyx_k_First_input_argument_if_not_list_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a, __pyx_k_First_input_argument_should_be_a, sizeof(__pyx_k_First_input_argument_should_be_a), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_2, __pyx_k_First_input_argument_should_be_a_2, sizeof(__pyx_k_First_input_argument_should_be_a_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_3, __pyx_k_First_input_argument_should_be_a_3, sizeof(__pyx_k_First_input_argument_should_be_a_3), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_4, __pyx_k_First_input_argument_should_be_a_4, sizeof(__pyx_k_First_input_argument_should_be_a_4), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_c, __pyx_k_First_input_argument_should_be_c, sizeof(__pyx_k_First_input_argument_should_be_c), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o, __pyx_k_First_input_argument_should_be_o, sizeof(__pyx_k_First_input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_10, __pyx_k_First_input_argument_should_be_o_10, sizeof(__pyx_k_First_input_argument_should_be_o_10), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_11, __pyx_k_First_input_argument_should_be_o_11, sizeof(__pyx_k_First_input_argument_should_be_o_11), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_2, __pyx_k_First_input_argument_should_be_o_2, sizeof(__pyx_k_First_input_argument_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_3, __pyx_k_First_input_argument_should_be_o_3, sizeof(__pyx_k_First_input_argument_should_be_o_3), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_4, __pyx_k_First_input_argument_should_be_o_4, sizeof(__pyx_k_First_input_argument_should_be_o_4), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_5, __pyx_k_First_input_argument_should_be_o_5, sizeof(__pyx_k_First_input_argument_should_be_o_5), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_6, __pyx_k_First_input_argument_should_be_o_6, sizeof(__pyx_k_First_input_argument_should_be_o_6), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_7, __pyx_k_First_input_argument_should_be_o_7, sizeof(__pyx_k_First_input_argument_should_be_o_7), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_8, __pyx_k_First_input_argument_should_be_o_8, sizeof(__pyx_k_First_input_argument_should_be_o_8), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_9, __pyx_k_First_input_argument_should_be_o_9, sizeof(__pyx_k_First_input_argument_should_be_o_9), 0, 1, 0, 0}, + {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, + {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N, __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N, sizeof(__pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2, __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2, sizeof(__pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_CALLBACK_NOT_FOUND_FOR_handl, __pyx_k_GET_CALLBACK_NOT_FOUND_FOR_handl, sizeof(__pyx_k_GET_CALLBACK_NOT_FOUND_FOR_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1, __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1, sizeof(__pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2, __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2, sizeof(__pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_HANDLE, __pyx_k_GROUP_HANDLE, sizeof(__pyx_k_GROUP_HANDLE), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_NAME, __pyx_k_GROUP_NAME, sizeof(__pyx_k_GROUP_NAME), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_STATUS, __pyx_k_GROUP_STATUS, sizeof(__pyx_k_GROUP_STATUS), 0, 1, 0, 0}, + {&__pyx_kp_u_Handle, __pyx_k_Handle, sizeof(__pyx_k_Handle), 0, 1, 0, 0}, + {&__pyx_kp_u_Handle_2, __pyx_k_Handle_2, sizeof(__pyx_k_Handle_2), 0, 1, 0, 0}, + {&__pyx_n_u_ICAFE_CA_OP_CONN_DOWN, __pyx_k_ICAFE_CA_OP_CONN_DOWN, sizeof(__pyx_k_ICAFE_CA_OP_CONN_DOWN), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_CS_NEVER_CONN, __pyx_k_ICAFE_CS_NEVER_CONN, sizeof(__pyx_k_ICAFE_CS_NEVER_CONN), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_NORMAL, __pyx_k_ICAFE_NORMAL, sizeof(__pyx_k_ICAFE_NORMAL), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_TYPENOTCONN, __pyx_k_ICAFE_TYPENOTCONN, sizeof(__pyx_k_ICAFE_TYPENOTCONN), 0, 1, 0, 1}, + {&__pyx_kp_u_Idx_must_be_non_negative, __pyx_k_Idx_must_be_non_negative, sizeof(__pyx_k_Idx_must_be_non_negative), 0, 1, 0, 0}, + {&__pyx_kp_u_Idx_must_be_non_negative_2, __pyx_k_Idx_must_be_non_negative_2, sizeof(__pyx_k_Idx_must_be_non_negative_2), 0, 1, 0, 0}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x8a, __pyx_k_Incompatible_checksums_s_vs_0x8a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x8a), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0}, + {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, + {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0}, + {&__pyx_kp_u_Input_argument_if_given_should_b, __pyx_k_Input_argument_if_given_should_b, sizeof(__pyx_k_Input_argument_if_given_should_b), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_pv_should_be_of_t, __pyx_k_Input_argument_pv_should_be_of_t, sizeof(__pyx_k_Input_argument_pv_should_be_of_t), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_should_be_of_type, __pyx_k_Input_argument_should_be_of_type, sizeof(__pyx_k_Input_argument_should_be_of_type), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_should_be_of_type_2, __pyx_k_Input_argument_should_be_of_type_2, sizeof(__pyx_k_Input_argument_should_be_of_type_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_data_whether_within_a_list, __pyx_k_Input_data_whether_within_a_list, sizeof(__pyx_k_Input_data_whether_within_a_list), 0, 1, 0, 0}, + {&__pyx_kp_u_Invalid_handle_of_type_class_int, __pyx_k_Invalid_handle_of_type_class_int, sizeof(__pyx_k_Invalid_handle_of_type_class_int), 0, 1, 0, 0}, + {&__pyx_kp_u_Invalid_input, __pyx_k_Invalid_input, sizeof(__pyx_k_Invalid_input), 0, 1, 0, 0}, + {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0}, + {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0}, + {&__pyx_kp_u_List_does_not_contain_handle_0, __pyx_k_List_does_not_contain_handle_0, sizeof(__pyx_k_List_does_not_contain_handle_0), 0, 1, 0, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_o, __pyx_k_List_input_arguments_should_be_o, sizeof(__pyx_k_List_input_arguments_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_o_2, __pyx_k_List_input_arguments_should_be_o_2, sizeof(__pyx_k_List_input_arguments_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_t, __pyx_k_List_input_arguments_should_be_t, sizeof(__pyx_k_List_input_arguments_should_be_t), 0, 1, 0, 0}, + {&__pyx_kp_u_Member, __pyx_k_Member, sizeof(__pyx_k_Member), 0, 1, 0, 0}, + {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, + {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0}, + {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0}, + {&__pyx_kp_u_Message_from_getBS_BS_stream_not, __pyx_k_Message_from_getBS_BS_stream_not, sizeof(__pyx_k_Message_from_getBS_BS_stream_not), 0, 1, 0, 0}, + {&__pyx_kp_u_Message_from_setBS_ONLY_A_SINGLE, __pyx_k_Message_from_setBS_ONLY_A_SINGLE, sizeof(__pyx_k_Message_from_setBS_ONLY_A_SINGLE), 0, 1, 0, 0}, + {&__pyx_kp_u_No_Members, __pyx_k_No_Members, sizeof(__pyx_k_No_Members), 0, 1, 0, 0}, + {&__pyx_kp_u_No_of_group_members_is, __pyx_k_No_of_group_members_is, sizeof(__pyx_k_No_of_group_members_is), 0, 1, 0, 0}, + {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, + {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0}, + {&__pyx_n_s_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 0, 1, 1}, + {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, + {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1}, + {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0}, + {&__pyx_kp_u_PUT_CALLBACK_NOT_FOUND_FOR_handl, __pyx_k_PUT_CALLBACK_NOT_FOUND_FOR_handl, sizeof(__pyx_k_PUT_CALLBACK_NOT_FOUND_FOR_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_PV, __pyx_k_PV, sizeof(__pyx_k_PV), 0, 1, 0, 0}, + {&__pyx_kp_u_PV_2, __pyx_k_PV_2, sizeof(__pyx_k_PV_2), 0, 1, 0, 0}, + {&__pyx_kp_u_PV_3, __pyx_k_PV_3, sizeof(__pyx_k_PV_3), 0, 1, 0, 0}, + {&__pyx_n_u_PV_4, __pyx_k_PV_4, sizeof(__pyx_k_PV_4), 0, 1, 0, 1}, + {&__pyx_kp_u_PY_VERSION_HEX_is, __pyx_k_PY_VERSION_HEX_is, sizeof(__pyx_k_PY_VERSION_HEX_is), 0, 1, 0, 0}, + {&__pyx_kp_u_Parameter, __pyx_k_Parameter, sizeof(__pyx_k_Parameter), 0, 1, 0, 0}, + {&__pyx_kp_u_Percentage_with_data, __pyx_k_Percentage_with_data, sizeof(__pyx_k_Percentage_with_data), 0, 1, 0, 0}, + {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, + {&__pyx_kp_u_Possible_types_are, __pyx_k_Possible_types_are, sizeof(__pyx_k_Possible_types_are), 0, 1, 0, 0}, + {&__pyx_n_s_PyCafe, __pyx_k_PyCafe, sizeof(__pyx_k_PyCafe), 0, 0, 1, 1}, + {&__pyx_kp_u_PyCafe_def_setGroup_Unusual_data, __pyx_k_PyCafe_def_setGroup_Unusual_data, sizeof(__pyx_k_PyCafe_def_setGroup_Unusual_data), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE, __pyx_k_PyCafe_def_set_WARNING_DATA_TYPE, sizeof(__pyx_k_PyCafe_def_set_WARNING_DATA_TYPE), 0, 1, 0, 0}, + {&__pyx_kp_s_PyCafe_pyx, __pyx_k_PyCafe_pyx, sizeof(__pyx_k_PyCafe_pyx), 0, 0, 1, 0}, + {&__pyx_kp_u_PyCafe_pyx, __pyx_k_PyCafe_pyx, sizeof(__pyx_k_PyCafe_pyx), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t, __pyx_k_PyCafe_pyx_We_do_not_cater_for_t, sizeof(__pyx_k_PyCafe_pyx_We_do_not_cater_for_t), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_pyx_getArray_array_type_d, __pyx_k_PyCafe_pyx_getArray_array_type_d, sizeof(__pyx_k_PyCafe_pyx_getArray_array_type_d), 0, 1, 0, 0}, + {&__pyx_kp_u_Returning_memoryview, __pyx_k_Returning_memoryview, sizeof(__pyx_k_Returning_memoryview), 0, 1, 0, 0}, + {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s_SFDBPMData, __pyx_k_SFDBPMData, sizeof(__pyx_k_SFDBPMData), 0, 0, 1, 1}, + {&__pyx_kp_u_SIGNATURE, __pyx_k_SIGNATURE, sizeof(__pyx_k_SIGNATURE), 0, 1, 0, 0}, + {&__pyx_kp_u_SIGNATURE_2, __pyx_k_SIGNATURE_2, sizeof(__pyx_k_SIGNATURE_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Second_input_argument_if_not_a_l, __pyx_k_Second_input_argument_if_not_a_l, sizeof(__pyx_k_Second_input_argument_if_not_a_l), 0, 1, 0, 0}, + {&__pyx_kp_u_Second_input_argument_should_be, __pyx_k_Second_input_argument_should_be, sizeof(__pyx_k_Second_input_argument_should_be), 0, 1, 0, 0}, + {&__pyx_kp_u_Second_input_argument_should_be_2, __pyx_k_Second_input_argument_should_be_2, sizeof(__pyx_k_Second_input_argument_should_be_2), 0, 1, 0, 0}, + {&__pyx_kp_u_TIMEOUT_in_getGroup_switching_to, __pyx_k_TIMEOUT_in_getGroup_switching_to, sizeof(__pyx_k_TIMEOUT_in_getGroup_switching_to), 0, 1, 0, 0}, + {&__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to, __pyx_k_TIMEOUT_in_getGroup_swithing_to, sizeof(__pyx_k_TIMEOUT_in_getGroup_swithing_to), 0, 1, 0, 0}, + {&__pyx_kp_u_ThandlePVSet_list_member_should, __pyx_k_ThandlePVSet_list_member_should, sizeof(__pyx_k_ThandlePVSet_list_member_should), 0, 1, 0, 0}, + {&__pyx_kp_u_The_pv_name_entered_within_list, __pyx_k_The_pv_name_entered_within_list, sizeof(__pyx_k_The_pv_name_entered_within_list), 0, 1, 0, 0}, + {&__pyx_kp_u_The_signature_of_the_monitor_cal, __pyx_k_The_signature_of_the_monitor_cal, sizeof(__pyx_k_The_signature_of_the_monitor_cal), 0, 1, 0, 0}, + {&__pyx_kp_u_The_signature_of_the_monitor_cal_2, __pyx_k_The_signature_of_the_monitor_cal_2, sizeof(__pyx_k_The_signature_of_the_monitor_cal_2), 0, 1, 0, 0}, + {&__pyx_kp_u_The_value_entered_was, __pyx_k_The_value_entered_was, sizeof(__pyx_k_The_value_entered_was), 0, 1, 0, 0}, + {&__pyx_kp_u_Third_input_argument_should_be_o, __pyx_k_Third_input_argument_should_be_o, sizeof(__pyx_k_Third_input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_Third_input_argument_should_be_o_2, __pyx_k_Third_input_argument_should_be_o_2, sizeof(__pyx_k_Third_input_argument_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_getAsLis, __pyx_k_This_line_in_PyCafe_def_getAsLis, sizeof(__pyx_k_This_line_in_PyCafe_def_getAsLis), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_getCache, __pyx_k_This_line_in_PyCafe_def_getCache, sizeof(__pyx_k_This_line_in_PyCafe_def_getCache), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_get_shou, __pyx_k_This_line_in_PyCafe_def_get_shou, sizeof(__pyx_k_This_line_in_PyCafe_def_get_shou), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_setCompo, __pyx_k_This_line_in_PyCafe_def_setCompo, sizeof(__pyx_k_This_line_in_PyCafe_def_setCompo), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_setScala, __pyx_k_This_line_in_PyCafe_def_setScala, sizeof(__pyx_k_This_line_in_PyCafe_def_setScala), 0, 1, 0, 0}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_n_u_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 0, 1}, + {&__pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE, __pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE, sizeof(__pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE), 0, 1, 0, 0}, + {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0}, + {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, + {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1}, + {&__pyx_kp_u_Unknow_array_type_in_user_reques, __pyx_k_Unknow_array_type_in_user_reques, sizeof(__pyx_k_Unknow_array_type_in_user_reques), 0, 1, 0, 0}, + {&__pyx_kp_u_Unknown_array_type_in_user_reque, __pyx_k_Unknown_array_type_in_user_reque, sizeof(__pyx_k_Unknown_array_type_in_user_reque), 0, 1, 0, 0}, + {&__pyx_n_s_UserWarning, __pyx_k_UserWarning, sizeof(__pyx_k_UserWarning), 0, 0, 1, 1}, + {&__pyx_n_u_VA, __pyx_k_VA, sizeof(__pyx_k_VA), 0, 1, 0, 1}, + {&__pyx_kp_u_Valid_input_parameters_for_data, __pyx_k_Valid_input_parameters_for_data, sizeof(__pyx_k_Valid_input_parameters_for_data), 0, 1, 0, 0}, + {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1}, + {&__pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha, __pyx_k_WARNING_PyCafe_def_setDbrBase_ha, sizeof(__pyx_k_WARNING_PyCafe_def_setDbrBase_ha), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetActionW, __pyx_k_WARNING_PyCafe_def_setGetActionW, sizeof(__pyx_k_WARNING_PyCafe_def_setGetActionW), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2, __pyx_k_WARNING_PyCafe_def_setGetActionW_2, sizeof(__pyx_k_WARNING_PyCafe_def_setGetActionW_2), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa, __pyx_k_WARNING_PyCafe_def_setGetCacheWa, sizeof(__pyx_k_WARNING_PyCafe_def_setGetCacheWa), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2, __pyx_k_WARNING_PyCafe_def_setGetCacheWa_2, sizeof(__pyx_k_WARNING_PyCafe_def_setGetCacheWa_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_groupMonitorStart, __pyx_k_Warning_from_groupMonitorStart, sizeof(__pyx_k_Warning_from_groupMonitorStart), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_groupMonitorStartW, __pyx_k_Warning_from_groupMonitorStartW, sizeof(__pyx_k_Warning_from_groupMonitorStartW), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_monitorStart_for_h, __pyx_k_Warning_from_monitorStart_for_h, sizeof(__pyx_k_Warning_from_monitorStart_for_h), 0, 1, 0, 0}, + {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0}, + {&__pyx_kp_u__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 1, 0, 0}, + {&__pyx_kp_u__114, __pyx_k__114, sizeof(__pyx_k__114), 0, 1, 0, 0}, + {&__pyx_kp_u__118, __pyx_k__118, sizeof(__pyx_k__118), 0, 1, 0, 0}, + {&__pyx_kp_u__121, __pyx_k__121, sizeof(__pyx_k__121), 0, 1, 0, 0}, + {&__pyx_kp_u__122, __pyx_k__122, sizeof(__pyx_k__122), 0, 1, 0, 0}, + {&__pyx_kp_u__138, __pyx_k__138, sizeof(__pyx_k__138), 0, 1, 0, 0}, + {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0}, + {&__pyx_kp_u__173, __pyx_k__173, sizeof(__pyx_k__173), 0, 1, 0, 0}, + {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, + {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, + {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, + {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, + {&__pyx_kp_u__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 1, 0, 0}, + {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, + {&__pyx_kp_u__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 1, 0, 0}, + {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0}, + {&__pyx_kp_u__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 1, 0, 0}, + {&__pyx_kp_u__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 1, 0, 0}, + {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, + {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0}, + {&__pyx_kp_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 0}, + {&__pyx_kp_u__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 1, 0, 0}, + {&__pyx_kp_u_accessRead_d, __pyx_k_accessRead_d, sizeof(__pyx_k_accessRead_d), 0, 1, 0, 0}, + {&__pyx_kp_u_accessWrite_d, __pyx_k_accessWrite_d, sizeof(__pyx_k_accessWrite_d), 0, 1, 0, 0}, + {&__pyx_kp_u_alarmSeverity, __pyx_k_alarmSeverity, sizeof(__pyx_k_alarmSeverity), 0, 1, 0, 0}, + {&__pyx_n_s_alarmSeverityAsString, __pyx_k_alarmSeverityAsString, sizeof(__pyx_k_alarmSeverityAsString), 0, 0, 1, 1}, + {&__pyx_n_s_alarmSeverity_2, __pyx_k_alarmSeverity_2, sizeof(__pyx_k_alarmSeverity_2), 0, 0, 1, 1}, + {&__pyx_kp_u_alarmSeverity_d, __pyx_k_alarmSeverity_d, sizeof(__pyx_k_alarmSeverity_d), 0, 1, 0, 0}, + {&__pyx_kp_u_alarmStatus, __pyx_k_alarmStatus, sizeof(__pyx_k_alarmStatus), 0, 1, 0, 0}, + {&__pyx_n_s_alarmStatusAsString, __pyx_k_alarmStatusAsString, sizeof(__pyx_k_alarmStatusAsString), 0, 0, 1, 1}, + {&__pyx_n_s_alarmStatus_2, __pyx_k_alarmStatus_2, sizeof(__pyx_k_alarmStatus_2), 0, 0, 1, 1}, + {&__pyx_kp_u_alarmStatus_d, __pyx_k_alarmStatus_d, sizeof(__pyx_k_alarmStatus_d), 0, 1, 0, 0}, + {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, + {&__pyx_kp_u_and_thus_assume_a_string, __pyx_k_and_thus_assume_a_string, sizeof(__pyx_k_and_thus_assume_a_string), 0, 1, 0, 0}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_appname, __pyx_k_appname, sizeof(__pyx_k_appname), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, + {&__pyx_n_u_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 1, 0, 1}, + {&__pyx_kp_u_array_array, __pyx_k_array_array, sizeof(__pyx_k_array_array), 0, 1, 0, 0}, + {&__pyx_n_s_art, __pyx_k_art, sizeof(__pyx_k_art), 0, 0, 1, 1}, + {&__pyx_n_s_asDict, __pyx_k_asDict, sizeof(__pyx_k_asDict), 0, 0, 1, 1}, + {&__pyx_kp_u_as_channel_is_not_connected, __pyx_k_as_channel_is_not_connected, sizeof(__pyx_k_as_channel_is_not_connected), 0, 1, 0, 0}, + {&__pyx_n_u_attachContext, __pyx_k_attachContext, sizeof(__pyx_k_attachContext), 0, 1, 0, 1}, + {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1}, + {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, + {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 1, 0, 1}, + {&__pyx_n_s_bool8, __pyx_k_bool8, sizeof(__pyx_k_bool8), 0, 0, 1, 1}, + {&__pyx_n_s_bool_2, __pyx_k_bool_2, sizeof(__pyx_k_bool_2), 0, 0, 1, 1}, + {&__pyx_n_s_bsDateAsString, __pyx_k_bsDateAsString, sizeof(__pyx_k_bsDateAsString), 0, 0, 1, 1}, + {&__pyx_n_s_bsFlag, __pyx_k_bsFlag, sizeof(__pyx_k_bsFlag), 0, 0, 1, 1}, + {&__pyx_n_s_bschannel, __pyx_k_bschannel, sizeof(__pyx_k_bschannel), 0, 0, 1, 1}, + {&__pyx_n_s_bufferSize, __pyx_k_bufferSize, sizeof(__pyx_k_bufferSize), 0, 0, 1, 1}, + {&__pyx_n_s_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 0, 1, 1}, + {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 1, 0, 1}, + {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, + {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, + {&__pyx_n_s_cMembers, __pyx_k_cMembers, sizeof(__pyx_k_cMembers), 0, 0, 1, 1}, + {&__pyx_n_s_cName, __pyx_k_cName, sizeof(__pyx_k_cName), 0, 0, 1, 1}, + {&__pyx_n_s_c_bool, __pyx_k_c_bool, sizeof(__pyx_k_c_bool), 0, 0, 1, 1}, + {&__pyx_n_s_c_byte, __pyx_k_c_byte, sizeof(__pyx_k_c_byte), 0, 0, 1, 1}, + {&__pyx_n_s_c_char, __pyx_k_c_char, sizeof(__pyx_k_c_char), 0, 0, 1, 1}, + {&__pyx_n_s_c_char_p, __pyx_k_c_char_p, sizeof(__pyx_k_c_char_p), 0, 0, 1, 1}, + {&__pyx_n_s_c_double, __pyx_k_c_double, sizeof(__pyx_k_c_double), 0, 0, 1, 1}, + {&__pyx_n_s_c_float, __pyx_k_c_float, sizeof(__pyx_k_c_float), 0, 0, 1, 1}, + {&__pyx_n_s_c_int, __pyx_k_c_int, sizeof(__pyx_k_c_int), 0, 0, 1, 1}, + {&__pyx_n_s_c_int16, __pyx_k_c_int16, sizeof(__pyx_k_c_int16), 0, 0, 1, 1}, + {&__pyx_n_s_c_int32, __pyx_k_c_int32, sizeof(__pyx_k_c_int32), 0, 0, 1, 1}, + {&__pyx_n_s_c_int64, __pyx_k_c_int64, sizeof(__pyx_k_c_int64), 0, 0, 1, 1}, + {&__pyx_n_s_c_int8, __pyx_k_c_int8, sizeof(__pyx_k_c_int8), 0, 0, 1, 1}, + {&__pyx_n_s_c_long, __pyx_k_c_long, sizeof(__pyx_k_c_long), 0, 0, 1, 1}, + {&__pyx_n_s_c_longdouble, __pyx_k_c_longdouble, sizeof(__pyx_k_c_longdouble), 0, 0, 1, 1}, + {&__pyx_n_s_c_longlong, __pyx_k_c_longlong, sizeof(__pyx_k_c_longlong), 0, 0, 1, 1}, + {&__pyx_n_s_c_short, __pyx_k_c_short, sizeof(__pyx_k_c_short), 0, 0, 1, 1}, + {&__pyx_n_s_c_size_t, __pyx_k_c_size_t, sizeof(__pyx_k_c_size_t), 0, 0, 1, 1}, + {&__pyx_n_s_c_ssize_t, __pyx_k_c_ssize_t, sizeof(__pyx_k_c_ssize_t), 0, 0, 1, 1}, + {&__pyx_n_s_c_ubyte, __pyx_k_c_ubyte, sizeof(__pyx_k_c_ubyte), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint, __pyx_k_c_uint, sizeof(__pyx_k_c_uint), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint16, __pyx_k_c_uint16, sizeof(__pyx_k_c_uint16), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint32, __pyx_k_c_uint32, sizeof(__pyx_k_c_uint32), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint64, __pyx_k_c_uint64, sizeof(__pyx_k_c_uint64), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint8, __pyx_k_c_uint8, sizeof(__pyx_k_c_uint8), 0, 0, 1, 1}, + {&__pyx_n_s_c_ulong, __pyx_k_c_ulong, sizeof(__pyx_k_c_ulong), 0, 0, 1, 1}, + {&__pyx_n_s_c_ulonglong, __pyx_k_c_ulonglong, sizeof(__pyx_k_c_ulonglong), 0, 0, 1, 1}, + {&__pyx_n_s_c_ushort, __pyx_k_c_ushort, sizeof(__pyx_k_c_ushort), 0, 0, 1, 1}, + {&__pyx_n_s_c_void_p, __pyx_k_c_void_p, sizeof(__pyx_k_c_void_p), 0, 0, 1, 1}, + {&__pyx_n_s_c_voidp, __pyx_k_c_voidp, sizeof(__pyx_k_c_voidp), 0, 0, 1, 1}, + {&__pyx_n_s_c_wchar, __pyx_k_c_wchar, sizeof(__pyx_k_c_wchar), 0, 0, 1, 1}, + {&__pyx_n_s_c_wchar_p, __pyx_k_c_wchar_p, sizeof(__pyx_k_c_wchar_p), 0, 0, 1, 1}, + {&__pyx_kp_u_ca_pend_event_timeout, __pyx_k_ca_pend_event_timeout, sizeof(__pyx_k_ca_pend_event_timeout), 0, 1, 0, 0}, + {&__pyx_kp_u_ca_pend_io_timeout, __pyx_k_ca_pend_io_timeout, sizeof(__pyx_k_ca_pend_io_timeout), 0, 1, 0, 0}, + {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1}, + {&__pyx_n_s_cacheFlag, __pyx_k_cacheFlag, sizeof(__pyx_k_cacheFlag), 0, 0, 1, 1}, + {&__pyx_n_u_cafe, __pyx_k_cafe, sizeof(__pyx_k_cafe), 0, 1, 0, 1}, + {&__pyx_kp_u_cafeConnectionState, __pyx_k_cafeConnectionState, sizeof(__pyx_k_cafeConnectionState), 0, 1, 0, 0}, + {&__pyx_kp_u_cafeDbrType, __pyx_k_cafeDbrType, sizeof(__pyx_k_cafeDbrType), 0, 1, 0, 0}, + {&__pyx_n_s_cb, __pyx_k_cb, sizeof(__pyx_k_cb), 0, 0, 1, 1}, + {&__pyx_kp_u_channelID_s, __pyx_k_channelID_s, sizeof(__pyx_k_channelID_s), 0, 1, 0, 0}, + {&__pyx_n_s_channelInfo, __pyx_k_channelInfo, sizeof(__pyx_k_channelInfo), 0, 0, 1, 1}, + {&__pyx_n_s_checkForGroupHandle, __pyx_k_checkForGroupHandle, sizeof(__pyx_k_checkForGroupHandle), 0, 0, 1, 1}, + {&__pyx_n_s_checkForHandle, __pyx_k_checkForHandle, sizeof(__pyx_k_checkForHandle), 0, 0, 1, 1}, + {&__pyx_n_s_checkForHandleList, __pyx_k_checkForHandleList, sizeof(__pyx_k_checkForHandleList), 0, 0, 1, 1}, + {&__pyx_n_u_cinit, __pyx_k_cinit, sizeof(__pyx_k_cinit), 0, 1, 0, 1}, + {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, + {&__pyx_kp_u_className_s, __pyx_k_className_s, sizeof(__pyx_k_className_s), 0, 1, 0, 0}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_u_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 1, 0, 1}, + {&__pyx_n_u_closeChannelKeepHandle, __pyx_k_closeChannelKeepHandle, sizeof(__pyx_k_closeChannelKeepHandle), 0, 1, 0, 1}, + {&__pyx_n_u_closeDisconnectedChannelsWithinG, __pyx_k_closeDisconnectedChannelsWithinG, sizeof(__pyx_k_closeDisconnectedChannelsWithinG), 0, 1, 0, 1}, + {&__pyx_n_u_closeHandles, __pyx_k_closeHandles, sizeof(__pyx_k_closeHandles), 0, 1, 0, 1}, + {&__pyx_n_s_cname, __pyx_k_cname, sizeof(__pyx_k_cname), 0, 0, 1, 1}, + {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, + {&__pyx_kp_u_connectFlag_d, __pyx_k_connectFlag_d, sizeof(__pyx_k_connectFlag_d), 0, 1, 0, 0}, + {&__pyx_kp_u_connectionState, __pyx_k_connectionState, sizeof(__pyx_k_connectionState), 0, 1, 0, 0}, + {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0}, + {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0}, + {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, + {&__pyx_n_u_ctype, __pyx_k_ctype, sizeof(__pyx_k_ctype), 0, 1, 0, 1}, + {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1}, + {&__pyx_n_u_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 1, 0, 1}, + {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1}, + {&__pyx_kp_u_d_2, __pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 1, 0, 0}, + {&__pyx_kp_u_dataType, __pyx_k_dataType, sizeof(__pyx_k_dataType), 0, 1, 0, 0}, + {&__pyx_n_s_dataTypeAsString, __pyx_k_dataTypeAsString, sizeof(__pyx_k_dataTypeAsString), 0, 0, 1, 1}, + {&__pyx_n_s_dataType_2, __pyx_k_dataType_2, sizeof(__pyx_k_dataType_2), 0, 0, 1, 1}, + {&__pyx_kp_u_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 1, 0, 0}, + {&__pyx_n_s_dbr, __pyx_k_dbr, sizeof(__pyx_k_dbr), 0, 0, 1, 1}, + {&__pyx_n_s_dbrBase, __pyx_k_dbrBase, sizeof(__pyx_k_dbrBase), 0, 0, 1, 1}, + {&__pyx_kp_u_dbrDataType, __pyx_k_dbrDataType, sizeof(__pyx_k_dbrDataType), 0, 1, 0, 0}, + {&__pyx_kp_u_dbr_base_type_should_be_one_of_D, __pyx_k_dbr_base_type_should_be_one_of_D, sizeof(__pyx_k_dbr_base_type_should_be_one_of_D), 0, 1, 0, 0}, + {&__pyx_kp_u_dbr_base_type_should_be_one_of_D_2, __pyx_k_dbr_base_type_should_be_one_of_D_2, sizeof(__pyx_k_dbr_base_type_should_be_one_of_D_2), 0, 1, 0, 0}, + {&__pyx_kp_u_dbr_mask_notify_milliseconds, __pyx_k_dbr_mask_notify_milliseconds, sizeof(__pyx_k_dbr_mask_notify_milliseconds), 0, 1, 0, 0}, + {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, + {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1}, + {&__pyx_kp_u_def_getScalarArray, __pyx_k_def_getScalarArray, sizeof(__pyx_k_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_def_getScalarList, __pyx_k_def_getScalarList, sizeof(__pyx_k_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_n_u_devicePositionV, __pyx_k_devicePositionV, sizeof(__pyx_k_devicePositionV), 0, 1, 0, 1}, + {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_n_s_dictFlag, __pyx_k_dictFlag, sizeof(__pyx_k_dictFlag), 0, 0, 1, 1}, + {&__pyx_kp_u_diff_in_reading_BSDataHolderToSt, __pyx_k_diff_in_reading_BSDataHolderToSt, sizeof(__pyx_k_diff_in_reading_BSDataHolderToSt), 0, 1, 0, 0}, + {&__pyx_kp_u_does_not_match_the_length_of_da, __pyx_k_does_not_match_the_length_of_da, sizeof(__pyx_k_does_not_match_the_length_of_da), 0, 1, 0, 0}, + {&__pyx_kp_u_does_not_match_the_length_of_da_2, __pyx_k_does_not_match_the_length_of_da_2, sizeof(__pyx_k_does_not_match_the_length_of_da_2), 0, 1, 0, 0}, + {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1}, + {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 1, 0, 1}, + {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, + {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, + {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1}, + {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, + {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_enumString, __pyx_k_enumString, sizeof(__pyx_k_enumString), 0, 0, 1, 1}, + {&__pyx_kp_u_enumStrings, __pyx_k_enumStrings, sizeof(__pyx_k_enumStrings), 0, 1, 0, 0}, + {&__pyx_n_s_enumValue, __pyx_k_enumValue, sizeof(__pyx_k_enumValue), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, + {&__pyx_n_s_error_code, __pyx_k_error_code, sizeof(__pyx_k_error_code), 0, 0, 1, 1}, + {&__pyx_kp_u_error_code_2, __pyx_k_error_code_2, sizeof(__pyx_k_error_code_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_code_3, __pyx_k_error_code_3, sizeof(__pyx_k_error_code_3), 0, 1, 0, 0}, + {&__pyx_n_s_error_info, __pyx_k_error_info, sizeof(__pyx_k_error_info), 0, 0, 1, 1}, + {&__pyx_kp_u_error_info_2, __pyx_k_error_info_2, sizeof(__pyx_k_error_info_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_info_3, __pyx_k_error_info_3, sizeof(__pyx_k_error_info_3), 0, 1, 0, 0}, + {&__pyx_n_s_error_text, __pyx_k_error_text, sizeof(__pyx_k_error_text), 0, 0, 1, 1}, + {&__pyx_kp_u_error_text_2, __pyx_k_error_text_2, sizeof(__pyx_k_error_text_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_text_3, __pyx_k_error_text_3, sizeof(__pyx_k_error_text_3), 0, 1, 0, 0}, + {&__pyx_n_u_etNelemToRetrieveFromCache, __pyx_k_etNelemToRetrieveFromCache, sizeof(__pyx_k_etNelemToRetrieveFromCache), 0, 1, 0, 1}, + {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1}, + {&__pyx_n_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 1}, + {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, + {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 1, 0, 1}, + {&__pyx_n_s_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 0, 1, 1}, + {&__pyx_n_u_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 1, 0, 1}, + {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, + {&__pyx_n_u_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 1, 0, 1}, + {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, + {&__pyx_n_u_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 1, 0, 1}, + {&__pyx_n_s_float_2, __pyx_k_float_2, sizeof(__pyx_k_float_2), 0, 0, 1, 1}, + {&__pyx_n_u_float_2, __pyx_k_float_2, sizeof(__pyx_k_float_2), 0, 1, 0, 1}, + {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1}, + {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, + {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, + {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, + {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0}, + {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, + {&__pyx_n_s_gHandleName, __pyx_k_gHandleName, sizeof(__pyx_k_gHandleName), 0, 0, 1, 1}, + {&__pyx_n_s_gName, __pyx_k_gName, sizeof(__pyx_k_gName), 0, 0, 1, 1}, + {&__pyx_kp_u_gameSetAndMatch_list_handlePVSet, __pyx_k_gameSetAndMatch_list_handlePVSet, sizeof(__pyx_k_gameSetAndMatch_list_handlePVSet), 0, 1, 0, 0}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_getAlarmStatusSeverity, __pyx_k_getAlarmStatusSeverity, sizeof(__pyx_k_getAlarmStatusSeverity), 0, 0, 1, 1}, + {&__pyx_n_s_getArray, __pyx_k_getArray, sizeof(__pyx_k_getArray), 0, 0, 1, 1}, + {&__pyx_n_u_getArray, __pyx_k_getArray, sizeof(__pyx_k_getArray), 0, 1, 0, 1}, + {&__pyx_n_s_getArrayCache, __pyx_k_getArrayCache, sizeof(__pyx_k_getArrayCache), 0, 0, 1, 1}, + {&__pyx_n_u_getArrayCache, __pyx_k_getArrayCache, sizeof(__pyx_k_getArrayCache), 0, 1, 0, 1}, + {&__pyx_n_u_getAsyn, __pyx_k_getAsyn, sizeof(__pyx_k_getAsyn), 0, 1, 0, 1}, + {&__pyx_n_s_getCache, __pyx_k_getCache, sizeof(__pyx_k_getCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getCache_handlePV_str_dt_native, __pyx_k_getCache_handlePV_str_dt_native, sizeof(__pyx_k_getCache_handlePV_str_dt_native), 0, 1, 0, 0}, + {&__pyx_n_u_getChannelAttribute, __pyx_k_getChannelAttribute, sizeof(__pyx_k_getChannelAttribute), 0, 1, 0, 1}, + {&__pyx_n_u_getChannelDataStore, __pyx_k_getChannelDataStore, sizeof(__pyx_k_getChannelDataStore), 0, 1, 0, 1}, + {&__pyx_n_u_getChannelDevice, __pyx_k_getChannelDevice, sizeof(__pyx_k_getChannelDevice), 0, 1, 0, 1}, + {&__pyx_n_s_getChannelInfo, __pyx_k_getChannelInfo, sizeof(__pyx_k_getChannelInfo), 0, 0, 1, 1}, + {&__pyx_kp_u_getChannelInfo_handlePV, __pyx_k_getChannelInfo_handlePV, sizeof(__pyx_k_getChannelInfo_handlePV), 0, 1, 0, 0}, + {&__pyx_n_s_getCompoundList, __pyx_k_getCompoundList, sizeof(__pyx_k_getCompoundList), 0, 0, 1, 1}, + {&__pyx_kp_u_getCompoundList_handleList_str_d, __pyx_k_getCompoundList_handleList_str_d, sizeof(__pyx_k_getCompoundList_handleList_str_d), 0, 1, 0, 0}, + {&__pyx_n_s_getCompoundPVGroup, __pyx_k_getCompoundPVGroup, sizeof(__pyx_k_getCompoundPVGroup), 0, 0, 1, 1}, + {&__pyx_kp_u_getCompoundPVGroup_ghandleName_s, __pyx_k_getCompoundPVGroup_ghandleName_s, sizeof(__pyx_k_getCompoundPVGroup_ghandleName_s), 0, 1, 0, 0}, + {&__pyx_n_u_getContext, __pyx_k_getContext, sizeof(__pyx_k_getContext), 0, 1, 0, 1}, + {&__pyx_n_s_getCtrlCache, __pyx_k_getCtrlCache, sizeof(__pyx_k_getCtrlCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat, __pyx_k_getCtrlCache_handlePV_str_dt_nat, sizeof(__pyx_k_getCtrlCache_handlePV_str_dt_nat), 0, 1, 0, 0}, + {&__pyx_kp_u_getCtrl_handlePV_str_dt_native, __pyx_k_getCtrl_handlePV_str_dt_native, sizeof(__pyx_k_getCtrl_handlePV_str_dt_native), 0, 1, 0, 0}, + {&__pyx_n_u_getDataTypeInCallback, __pyx_k_getDataTypeInCallback, sizeof(__pyx_k_getDataTypeInCallback), 0, 1, 0, 1}, + {&__pyx_n_u_getDataTypeNative, __pyx_k_getDataTypeNative, sizeof(__pyx_k_getDataTypeNative), 0, 1, 0, 1}, + {&__pyx_n_u_getDataTypeRequest, __pyx_k_getDataTypeRequest, sizeof(__pyx_k_getDataTypeRequest), 0, 1, 0, 1}, + {&__pyx_n_s_getDbrBase, __pyx_k_getDbrBase, sizeof(__pyx_k_getDbrBase), 0, 0, 1, 1}, + {&__pyx_n_u_getDbrBaseInCallback, __pyx_k_getDbrBaseInCallback, sizeof(__pyx_k_getDbrBaseInCallback), 0, 1, 0, 1}, + {&__pyx_n_u_getDbrDataTypeInCallback, __pyx_k_getDbrDataTypeInCallback, sizeof(__pyx_k_getDbrDataTypeInCallback), 0, 1, 0, 1}, + {&__pyx_n_s_getDescription, __pyx_k_getDescription, sizeof(__pyx_k_getDescription), 0, 0, 1, 1}, + {&__pyx_kp_u_getDictionary_handleList_dt_cach, __pyx_k_getDictionary_handleList_dt_cach, sizeof(__pyx_k_getDictionary_handleList_dt_cach), 0, 1, 0, 0}, + {&__pyx_n_s_getEnumFromString, __pyx_k_getEnumFromString, sizeof(__pyx_k_getEnumFromString), 0, 0, 1, 1}, + {&__pyx_n_u_getEnumFromString, __pyx_k_getEnumFromString, sizeof(__pyx_k_getEnumFromString), 0, 1, 0, 1}, + {&__pyx_n_s_getEnumStrings, __pyx_k_getEnumStrings, sizeof(__pyx_k_getEnumStrings), 0, 0, 1, 1}, + {&__pyx_n_s_getGroup, __pyx_k_getGroup, sizeof(__pyx_k_getGroup), 0, 0, 1, 1}, + {&__pyx_kp_u_getGroupCache_self_ghandleName_s, __pyx_k_getGroupCache_self_ghandleName_s, sizeof(__pyx_k_getGroupCache_self_ghandleName_s), 0, 1, 0, 0}, + {&__pyx_kp_u_getGroup_ghandleName_str_dt_nati, __pyx_k_getGroup_ghandleName_str_dt_nati, sizeof(__pyx_k_getGroup_ghandleName_str_dt_nati), 0, 1, 0, 0}, + {&__pyx_n_s_getHandleFromPV, __pyx_k_getHandleFromPV, sizeof(__pyx_k_getHandleFromPV), 0, 0, 1, 1}, + {&__pyx_n_s_getHandleFromPVName, __pyx_k_getHandleFromPVName, sizeof(__pyx_k_getHandleFromPVName), 0, 0, 1, 1}, + {&__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh, __pyx_k_getHandleFromPVWithinGroup_pv_gh, sizeof(__pyx_k_getHandleFromPVWithinGroup_pv_gh), 0, 1, 0, 0}, + {&__pyx_n_s_getHandlesFromWithinGroup, __pyx_k_getHandlesFromWithinGroup, sizeof(__pyx_k_getHandlesFromWithinGroup), 0, 0, 1, 1}, + {&__pyx_n_u_getHandlesFromWithinGroup, __pyx_k_getHandlesFromWithinGroup, sizeof(__pyx_k_getHandlesFromWithinGroup), 0, 1, 0, 1}, + {&__pyx_n_s_getList, __pyx_k_getList, sizeof(__pyx_k_getList), 0, 0, 1, 1}, + {&__pyx_n_u_getList, __pyx_k_getList, sizeof(__pyx_k_getList), 0, 1, 0, 1}, + {&__pyx_n_u_getMonitorIDInCallback, __pyx_k_getMonitorIDInCallback, sizeof(__pyx_k_getMonitorIDInCallback), 0, 1, 0, 1}, + {&__pyx_kp_u_getMonitorIDs_handlePV, __pyx_k_getMonitorIDs_handlePV, sizeof(__pyx_k_getMonitorIDs_handlePV), 0, 1, 0, 0}, + {&__pyx_kp_u_getNoMonitors_handlePV, __pyx_k_getNoMonitors_handlePV, sizeof(__pyx_k_getNoMonitors_handlePV), 0, 1, 0, 0}, + {&__pyx_n_s_getNonBlocking, __pyx_k_getNonBlocking, sizeof(__pyx_k_getNonBlocking), 0, 0, 1, 1}, + {&__pyx_n_s_getPV, __pyx_k_getPV, sizeof(__pyx_k_getPV), 0, 0, 1, 1}, + {&__pyx_n_u_getPV, __pyx_k_getPV, sizeof(__pyx_k_getPV), 0, 1, 0, 1}, + {&__pyx_n_s_getPVCache, __pyx_k_getPVCache, sizeof(__pyx_k_getPVCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getPVCache_handlePV_str_dt_nativ, __pyx_k_getPVCache_handlePV_str_dt_nativ, sizeof(__pyx_k_getPVCache_handlePV_str_dt_nativ), 0, 1, 0, 0}, + {&__pyx_n_s_getPVGroup, __pyx_k_getPVGroup, sizeof(__pyx_k_getPVGroup), 0, 0, 1, 1}, + {&__pyx_n_u_getPVGroupCache, __pyx_k_getPVGroupCache, sizeof(__pyx_k_getPVGroupCache), 0, 1, 0, 1}, + {&__pyx_kp_u_getPVGroup_ghandleName_str_dt_na, __pyx_k_getPVGroup_ghandleName_str_dt_na, sizeof(__pyx_k_getPVGroup_ghandleName_str_dt_na), 0, 1, 0, 0}, + {&__pyx_n_s_getPVList, __pyx_k_getPVList, sizeof(__pyx_k_getPVList), 0, 0, 1, 1}, + {&__pyx_n_u_getPVList, __pyx_k_getPVList, sizeof(__pyx_k_getPVList), 0, 1, 0, 1}, + {&__pyx_n_s_getPrecision, __pyx_k_getPrecision, sizeof(__pyx_k_getPrecision), 0, 0, 1, 1}, + {&__pyx_n_u_getSFdbpm, __pyx_k_getSFdbpm, sizeof(__pyx_k_getSFdbpm), 0, 1, 0, 1}, + {&__pyx_kp_u_getScalarArray_handleList_str_dt, __pyx_k_getScalarArray_handleList_str_dt, sizeof(__pyx_k_getScalarArray_handleList_str_dt), 0, 1, 0, 0}, + {&__pyx_n_s_getScalarList, __pyx_k_getScalarList, sizeof(__pyx_k_getScalarList), 0, 0, 1, 1}, + {&__pyx_kp_u_getScalarList_handleList_str_dt, __pyx_k_getScalarList_handleList_str_dt, sizeof(__pyx_k_getScalarList_handleList_str_dt), 0, 1, 0, 0}, + {&__pyx_n_s_getStatus, __pyx_k_getStatus, sizeof(__pyx_k_getStatus), 0, 0, 1, 1}, + {&__pyx_n_s_getStringFromEnum, __pyx_k_getStringFromEnum, sizeof(__pyx_k_getStringFromEnum), 0, 0, 1, 1}, + {&__pyx_n_u_getStringFromEnum, __pyx_k_getStringFromEnum, sizeof(__pyx_k_getStringFromEnum), 0, 1, 0, 1}, + {&__pyx_n_s_getTimeStamp, __pyx_k_getTimeStamp, sizeof(__pyx_k_getTimeStamp), 0, 0, 1, 1}, + {&__pyx_n_s_getTimeStampAsDate, __pyx_k_getTimeStampAsDate, sizeof(__pyx_k_getTimeStampAsDate), 0, 0, 1, 1}, + {&__pyx_n_s_getUnits, __pyx_k_getUnits, sizeof(__pyx_k_getUnits), 0, 0, 1, 1}, + {&__pyx_n_s_getWFAsString, __pyx_k_getWFAsString, sizeof(__pyx_k_getWFAsString), 0, 0, 1, 1}, + {&__pyx_n_u_getWFAsString, __pyx_k_getWFAsString, sizeof(__pyx_k_getWFAsString), 0, 1, 0, 1}, + {&__pyx_kp_u_get_handlePV_dt, __pyx_k_get_handlePV_dt, sizeof(__pyx_k_get_handlePV_dt), 0, 1, 0, 0}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_ghandleName, __pyx_k_ghandleName, sizeof(__pyx_k_ghandleName), 0, 0, 1, 1}, + {&__pyx_kp_u_global_timestamp, __pyx_k_global_timestamp, sizeof(__pyx_k_global_timestamp), 0, 1, 0, 0}, + {&__pyx_n_s_gname, __pyx_k_gname, sizeof(__pyx_k_gname), 0, 0, 1, 1}, + {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0}, + {&__pyx_kp_u_groupClose_gHandleName, __pyx_k_groupClose_gHandleName, sizeof(__pyx_k_groupClose_gHandleName), 0, 1, 0, 0}, + {&__pyx_n_u_groupDefineFromCollection, __pyx_k_groupDefineFromCollection, sizeof(__pyx_k_groupDefineFromCollection), 0, 1, 0, 1}, + {&__pyx_n_s_groupHandles, __pyx_k_groupHandles, sizeof(__pyx_k_groupHandles), 0, 0, 1, 1}, + {&__pyx_kp_u_groupMemberList_self_str_gname, __pyx_k_groupMemberList_self_str_gname, sizeof(__pyx_k_groupMemberList_self_str_gname), 0, 1, 0, 0}, + {&__pyx_n_s_groupMonitorStart, __pyx_k_groupMonitorStart, sizeof(__pyx_k_groupMonitorStart), 0, 0, 1, 1}, + {&__pyx_kp_u_groupMonitorStartWithCBList_ghan, __pyx_k_groupMonitorStartWithCBList_ghan, sizeof(__pyx_k_groupMonitorStartWithCBList_ghan), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStart_ghandleName_cb, __pyx_k_groupMonitorStart_ghandleName_cb, sizeof(__pyx_k_groupMonitorStart_ghandleName_cb), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStop_ghandleName, __pyx_k_groupMonitorStop_ghandleName, sizeof(__pyx_k_groupMonitorStop_ghandleName), 0, 1, 0, 0}, + {&__pyx_n_s_groupOpen, __pyx_k_groupOpen, sizeof(__pyx_k_groupOpen), 0, 0, 1, 1}, + {&__pyx_kp_u_groupOpen_char_gname, __pyx_k_groupOpen_char_gname, sizeof(__pyx_k_groupOpen_char_gname), 0, 1, 0, 0}, + {&__pyx_kp_u_grouping_char_gname_list__pvlist, __pyx_k_grouping_char_gname_list__pvlist, sizeof(__pyx_k_grouping_char_gname_list__pvlist), 0, 1, 0, 0}, + {&__pyx_kp_u_gtsDate, __pyx_k_gtsDate, sizeof(__pyx_k_gtsDate), 0, 1, 0, 0}, + {&__pyx_n_u_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 1, 0, 1}, + {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1}, + {&__pyx_n_s_handleList, __pyx_k_handleList, sizeof(__pyx_k_handleList), 0, 0, 1, 1}, + {&__pyx_kp_u_handleMatch_list_member_should_b, __pyx_k_handleMatch_list_member_should_b, sizeof(__pyx_k_handleMatch_list_member_should_b), 0, 1, 0, 0}, + {&__pyx_n_s_handlePV, __pyx_k_handlePV, sizeof(__pyx_k_handlePV), 0, 0, 1, 1}, + {&__pyx_n_s_handlePVAction, __pyx_k_handlePVAction, sizeof(__pyx_k_handlePVAction), 0, 0, 1, 1}, + {&__pyx_kp_u_handlePVAction_list_member_shoul, __pyx_k_handlePVAction_list_member_shoul, sizeof(__pyx_k_handlePVAction_list_member_shoul), 0, 1, 0, 0}, + {&__pyx_n_s_handlePVMatch, __pyx_k_handlePVMatch, sizeof(__pyx_k_handlePVMatch), 0, 0, 1, 1}, + {&__pyx_n_s_handlePVSet, __pyx_k_handlePVSet, sizeof(__pyx_k_handlePVSet), 0, 0, 1, 1}, + {&__pyx_kp_u_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 1, 0, 0}, + {&__pyx_kp_u_handle_3, __pyx_k_handle_3, sizeof(__pyx_k_handle_3), 0, 1, 0, 0}, + {&__pyx_kp_u_handle_4, __pyx_k_handle_4, sizeof(__pyx_k_handle_4), 0, 1, 0, 0}, + {&__pyx_n_s_handle_5, __pyx_k_handle_5, sizeof(__pyx_k_handle_5), 0, 0, 1, 1}, + {&__pyx_n_s_handlesPV, __pyx_k_handlesPV, sizeof(__pyx_k_handlesPV), 0, 0, 1, 1}, + {&__pyx_n_u_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 1, 0, 1}, + {&__pyx_n_s_hasAlarmStatusSeverity, __pyx_k_hasAlarmStatusSeverity, sizeof(__pyx_k_hasAlarmStatusSeverity), 0, 0, 1, 1}, + {&__pyx_n_s_hasDescription, __pyx_k_hasDescription, sizeof(__pyx_k_hasDescription), 0, 0, 1, 1}, + {&__pyx_kp_u_has_error, __pyx_k_has_error, sizeof(__pyx_k_has_error), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_DBR_TIME, __pyx_k_hence_assuming_DBR_TIME, sizeof(__pyx_k_hence_assuming_DBR_TIME), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_default_value_GET, __pyx_k_hence_assuming_default_value_GET, sizeof(__pyx_k_hence_assuming_default_value_GET), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_default_value_GET_2, __pyx_k_hence_assuming_default_value_GET_2, sizeof(__pyx_k_hence_assuming_default_value_GET_2), 0, 1, 0, 0}, + {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1}, + {&__pyx_kp_u_hostName_s, __pyx_k_hostName_s, sizeof(__pyx_k_hostName_s), 0, 1, 0, 0}, + {&__pyx_n_s_iElem, __pyx_k_iElem, sizeof(__pyx_k_iElem), 0, 0, 1, 1}, + {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_kp_u_in_PyCafe_def_getCompundList, __pyx_k_in_PyCafe_def_getCompundList, sizeof(__pyx_k_in_PyCafe_def_getCompundList), 0, 1, 0, 0}, + {&__pyx_kp_u_in_PyCafe_def_getScalarArray, __pyx_k_in_PyCafe_def_getScalarArray, sizeof(__pyx_k_in_PyCafe_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_in_PyCafe_def_getScalarList, __pyx_k_in_PyCafe_def_getScalarList, sizeof(__pyx_k_in_PyCafe_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, + {&__pyx_n_u_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 1, 0, 1}, + {&__pyx_n_s_initCallbackComplete, __pyx_k_initCallbackComplete, sizeof(__pyx_k_initCallbackComplete), 0, 0, 1, 1}, + {&__pyx_n_u_initCallbackComplete, __pyx_k_initCallbackComplete, sizeof(__pyx_k_initCallbackComplete), 0, 1, 0, 1}, + {&__pyx_kp_u_input_argument_timeout_must_be_a, __pyx_k_input_argument_timeout_must_be_a, sizeof(__pyx_k_input_argument_timeout_must_be_a), 0, 1, 0, 0}, + {&__pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_k_input_argument_timeout_must_be_a_2, sizeof(__pyx_k_input_argument_timeout_must_be_a_2), 0, 1, 0, 0}, + {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, + {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1}, + {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 0, 1, 1}, + {&__pyx_n_u_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 1, 0, 1}, + {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1}, + {&__pyx_n_u_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 1, 0, 1}, + {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, + {&__pyx_n_u_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 1, 0, 1}, + {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1}, + {&__pyx_n_u_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 1, 0, 1}, + {&__pyx_n_s_int_2, __pyx_k_int_2, sizeof(__pyx_k_int_2), 0, 0, 1, 1}, + {&__pyx_n_u_int_2, __pyx_k_int_2, sizeof(__pyx_k_int_2), 0, 1, 0, 1}, + {&__pyx_n_s_intc, __pyx_k_intc, sizeof(__pyx_k_intc), 0, 0, 1, 1}, + {&__pyx_n_s_intp, __pyx_k_intp, sizeof(__pyx_k_intp), 0, 0, 1, 1}, + {&__pyx_kp_u_isBS_d, __pyx_k_isBS_d, sizeof(__pyx_k_isBS_d), 0, 1, 0, 0}, + {&__pyx_n_s_isConnected, __pyx_k_isConnected, sizeof(__pyx_k_isConnected), 0, 0, 1, 1}, + {&__pyx_n_u_isConnected, __pyx_k_isConnected, sizeof(__pyx_k_isConnected), 0, 1, 0, 1}, + {&__pyx_n_s_isEnum, __pyx_k_isEnum, sizeof(__pyx_k_isEnum), 0, 0, 1, 1}, + {&__pyx_n_s_isValid, __pyx_k_isValid, sizeof(__pyx_k_isValid), 0, 0, 1, 1}, + {&__pyx_kp_u_is_not_a_valid_option, __pyx_k_is_not_a_valid_option, sizeof(__pyx_k_is_not_a_valid_option), 0, 1, 0, 0}, + {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, + {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, + {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0}, + {&__pyx_n_s_keepGroupName, __pyx_k_keepGroupName, sizeof(__pyx_k_keepGroupName), 0, 0, 1, 1}, + {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, + {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_kp_u_latin_1, __pyx_k_latin_1, sizeof(__pyx_k_latin_1), 0, 1, 0, 0}, + {&__pyx_n_u_len1, __pyx_k_len1, sizeof(__pyx_k_len1), 0, 1, 0, 1}, + {&__pyx_n_u_len2, __pyx_k_len2, sizeof(__pyx_k_len2), 0, 1, 0, 1}, + {&__pyx_n_s_longlong, __pyx_k_longlong, sizeof(__pyx_k_longlong), 0, 0, 1, 1}, + {&__pyx_kp_u_lowerAlarmLimit_f, __pyx_k_lowerAlarmLimit_f, sizeof(__pyx_k_lowerAlarmLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerControlLimit_f, __pyx_k_lowerControlLimit_f, sizeof(__pyx_k_lowerControlLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerDisplayLimit_f, __pyx_k_lowerDisplayLimit_f, sizeof(__pyx_k_lowerDisplayLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerWarningLimit_f, __pyx_k_lowerWarningLimit_f, sizeof(__pyx_k_lowerWarningLimit_f), 0, 1, 0, 0}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_kp_u_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_ALARM, __pyx_k_maskHasDBE_ALARM, sizeof(__pyx_k_maskHasDBE_ALARM), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_LOG, __pyx_k_maskHasDBE_LOG, sizeof(__pyx_k_maskHasDBE_LOG), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_PROPERTY, __pyx_k_maskHasDBE_PROPERTY, sizeof(__pyx_k_maskHasDBE_PROPERTY), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_VALUE, __pyx_k_maskHasDBE_VALUE, sizeof(__pyx_k_maskHasDBE_VALUE), 0, 1, 0, 0}, + {&__pyx_n_s_mask_2, __pyx_k_mask_2, sizeof(__pyx_k_mask_2), 0, 0, 1, 1}, + {&__pyx_kp_u_matchMany_list_valSet_list_handl, __pyx_k_matchMany_list_valSet_list_handl, sizeof(__pyx_k_matchMany_list_valSet_list_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_match_double_valSet_handlePVMatc, __pyx_k_match_double_valSet_handlePVMatc, sizeof(__pyx_k_match_double_valSet_handlePVMatc), 0, 1, 0, 0}, + {&__pyx_kp_u_members_while_group_has, __pyx_k_members_while_group_has, sizeof(__pyx_k_members_while_group_has), 0, 1, 0, 0}, + {&__pyx_n_s_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 0, 1, 1}, + {&__pyx_n_u_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 1, 0, 1}, + {&__pyx_kp_u_memoryview_numpy_array_ctypes, __pyx_k_memoryview_numpy_array_ctypes, sizeof(__pyx_k_memoryview_numpy_array_ctypes), 0, 1, 0, 0}, + {&__pyx_n_u_memoryviewslice, __pyx_k_memoryviewslice, sizeof(__pyx_k_memoryviewslice), 0, 1, 0, 1}, + {&__pyx_n_u_memoryviewslice_2, __pyx_k_memoryviewslice_2, sizeof(__pyx_k_memoryviewslice_2), 0, 1, 0, 1}, + {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, + {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1}, + {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, + {&__pyx_n_s_modulo, __pyx_k_modulo, sizeof(__pyx_k_modulo), 0, 0, 1, 1}, + {&__pyx_kp_u_modulo_input_arg_should_be_of_ty, __pyx_k_modulo_input_arg_should_be_of_ty, sizeof(__pyx_k_modulo_input_arg_should_be_of_ty), 0, 1, 0, 0}, + {&__pyx_kp_u_modulo_input_argument_must_be_po, __pyx_k_modulo_input_argument_must_be_po, sizeof(__pyx_k_modulo_input_argument_must_be_po), 0, 1, 0, 0}, + {&__pyx_kp_u_monid, __pyx_k_monid, sizeof(__pyx_k_monid), 0, 1, 0, 0}, + {&__pyx_n_s_monid_2, __pyx_k_monid_2, sizeof(__pyx_k_monid_2), 0, 0, 1, 1}, + {&__pyx_n_s_monitorStart, __pyx_k_monitorStart, sizeof(__pyx_k_monitorStart), 0, 0, 1, 1}, + {&__pyx_kp_u_monitorStart_handlePV_object_cb, __pyx_k_monitorStart_handlePV_object_cb, sizeof(__pyx_k_monitorStart_handlePV_object_cb), 0, 1, 0, 0}, + {&__pyx_n_s_monitorStop, __pyx_k_monitorStop, sizeof(__pyx_k_monitorStop), 0, 0, 1, 1}, + {&__pyx_kp_u_monitorStopAll, __pyx_k_monitorStopAll, sizeof(__pyx_k_monitorStopAll), 0, 1, 0, 0}, + {&__pyx_kp_u_monitorStop_handlePV_mpid_None, __pyx_k_monitorStop_handlePV_mpid_None, sizeof(__pyx_k_monitorStop_handlePV_mpid_None), 0, 1, 0, 0}, + {&__pyx_kp_u_monitor_id, __pyx_k_monitor_id, sizeof(__pyx_k_monitor_id), 0, 1, 0, 0}, + {&__pyx_n_u_monitorid, __pyx_k_monitorid, sizeof(__pyx_k_monitorid), 0, 1, 0, 1}, + {&__pyx_n_s_monitorpolicy, __pyx_k_monitorpolicy, sizeof(__pyx_k_monitorpolicy), 0, 0, 1, 1}, + {&__pyx_n_s_mpid, __pyx_k_mpid, sizeof(__pyx_k_mpid), 0, 0, 1, 1}, + {&__pyx_n_u_mv, __pyx_k_mv, sizeof(__pyx_k_mv), 0, 1, 0, 1}, + {&__pyx_kp_u_nChannels_d, __pyx_k_nChannels_d, sizeof(__pyx_k_nChannels_d), 0, 1, 0, 0}, + {&__pyx_kp_u_nNullData_d, __pyx_k_nNullData_d, sizeof(__pyx_k_nNullData_d), 0, 1, 0, 0}, + {&__pyx_kp_u_nPV_d, __pyx_k_nPV_d, sizeof(__pyx_k_nPV_d), 0, 1, 0, 0}, + {&__pyx_kp_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 0}, + {&__pyx_kp_u_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 0}, + {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 0, 0, 1, 1}, + {&__pyx_n_s_name_4, __pyx_k_name_4, sizeof(__pyx_k_name_4), 0, 0, 1, 1}, + {&__pyx_n_u_native, __pyx_k_native, sizeof(__pyx_k_native), 0, 1, 0, 1}, + {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1}, + {&__pyx_n_u_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 1, 0, 1}, + {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, + {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, + {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, + {&__pyx_kp_u_nelem, __pyx_k_nelem, sizeof(__pyx_k_nelem), 0, 1, 0, 0}, + {&__pyx_n_s_nelem_2, __pyx_k_nelem_2, sizeof(__pyx_k_nelem_2), 0, 0, 1, 1}, + {&__pyx_kp_u_nelem_d, __pyx_k_nelem_d, sizeof(__pyx_k_nelem_d), 0, 1, 0, 0}, + {&__pyx_n_s_netrfc, __pyx_k_netrfc, sizeof(__pyx_k_netrfc), 0, 0, 1, 1}, + {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, + {&__pyx_kp_u_nhwm_d, __pyx_k_nhwm_d, sizeof(__pyx_k_nhwm_d), 0, 1, 0, 0}, + {&__pyx_kp_u_noEnumStrings_d, __pyx_k_noEnumStrings_d, sizeof(__pyx_k_noEnumStrings_d), 0, 1, 0, 0}, + {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, + {&__pyx_kp_u_not_connected, __pyx_k_not_connected, sizeof(__pyx_k_not_connected), 0, 1, 0, 0}, + {&__pyx_kp_u_not_recognized, __pyx_k_not_recognized, sizeof(__pyx_k_not_recognized), 0, 1, 0, 0}, + {&__pyx_n_s_notify_milliseconds, __pyx_k_notify_milliseconds, sizeof(__pyx_k_notify_milliseconds), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_u_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 0, 1}, + {&__pyx_kp_u_np_bool, __pyx_k_np_bool, sizeof(__pyx_k_np_bool), 0, 1, 0, 0}, + {&__pyx_kp_u_np_byte, __pyx_k_np_byte, sizeof(__pyx_k_np_byte), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float, __pyx_k_np_float, sizeof(__pyx_k_np_float), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float16, __pyx_k_np_float16, sizeof(__pyx_k_np_float16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float32, __pyx_k_np_float32, sizeof(__pyx_k_np_float32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float64, __pyx_k_np_float64, sizeof(__pyx_k_np_float64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int, __pyx_k_np_int, sizeof(__pyx_k_np_int), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int16, __pyx_k_np_int16, sizeof(__pyx_k_np_int16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int32, __pyx_k_np_int32, sizeof(__pyx_k_np_int32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int64, __pyx_k_np_int64, sizeof(__pyx_k_np_int64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int8, __pyx_k_np_int8, sizeof(__pyx_k_np_int8), 0, 1, 0, 0}, + {&__pyx_kp_u_np_intc, __pyx_k_np_intc, sizeof(__pyx_k_np_intc), 0, 1, 0, 0}, + {&__pyx_kp_u_np_long, __pyx_k_np_long, sizeof(__pyx_k_np_long), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ndarray, __pyx_k_np_ndarray, sizeof(__pyx_k_np_ndarray), 0, 1, 0, 0}, + {&__pyx_kp_u_np_short, __pyx_k_np_short, sizeof(__pyx_k_np_short), 0, 1, 0, 0}, + {&__pyx_kp_u_np_str, __pyx_k_np_str, sizeof(__pyx_k_np_str), 0, 1, 0, 0}, + {&__pyx_kp_u_np_str_2, __pyx_k_np_str_2, sizeof(__pyx_k_np_str_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_string, __pyx_k_np_string, sizeof(__pyx_k_np_string), 0, 1, 0, 0}, + {&__pyx_kp_u_np_string_2, __pyx_k_np_string_2, sizeof(__pyx_k_np_string_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint16, __pyx_k_np_uint16, sizeof(__pyx_k_np_uint16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint32, __pyx_k_np_uint32, sizeof(__pyx_k_np_uint32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint64, __pyx_k_np_uint64, sizeof(__pyx_k_np_uint64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint8, __pyx_k_np_uint8, sizeof(__pyx_k_np_uint8), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ulong, __pyx_k_np_ulong, sizeof(__pyx_k_np_ulong), 0, 1, 0, 0}, + {&__pyx_kp_u_np_unicode, __pyx_k_np_unicode, sizeof(__pyx_k_np_unicode), 0, 1, 0, 0}, + {&__pyx_kp_u_np_unicode_2, __pyx_k_np_unicode_2, sizeof(__pyx_k_np_unicode_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ushort, __pyx_k_np_ushort, sizeof(__pyx_k_np_ushort), 0, 1, 0, 0}, + {&__pyx_kp_u_nsec, __pyx_k_nsec, sizeof(__pyx_k_nsec), 0, 1, 0, 0}, + {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_n_u_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 0, 1}, + {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy_ndarray, __pyx_k_numpy_ndarray, sizeof(__pyx_k_numpy_ndarray), 0, 1, 0, 0}, + {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, + {&__pyx_kp_u_of_which_BS, __pyx_k_of_which_BS, sizeof(__pyx_k_of_which_BS), 0, 1, 0, 0}, + {&__pyx_kp_u_of_which_CA_d, __pyx_k_of_which_CA_d, sizeof(__pyx_k_of_which_CA_d), 0, 1, 0, 0}, + {&__pyx_kp_u_of_which_CA_d_i_e_all, __pyx_k_of_which_CA_d_i_e_all, sizeof(__pyx_k_of_which_CA_d_i_e_all), 0, 1, 0, 0}, + {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, + {&__pyx_kp_u_offset_input_arg_should_be_of_ty, __pyx_k_offset_input_arg_should_be_of_ty, sizeof(__pyx_k_offset_input_arg_should_be_of_ty), 0, 1, 0, 0}, + {&__pyx_kp_u_offset_input_argument_cannot_be, __pyx_k_offset_input_argument_cannot_be, sizeof(__pyx_k_offset_input_argument_cannot_be), 0, 1, 0, 0}, + {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, + {&__pyx_n_u_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 1, 0, 1}, + {&__pyx_n_u_openGroupNowAndWaitForInputGroup, __pyx_k_openGroupNowAndWaitForInputGroup, sizeof(__pyx_k_openGroupNowAndWaitForInputGroup), 0, 1, 0, 1}, + {&__pyx_n_s_openMonitorNow, __pyx_k_openMonitorNow, sizeof(__pyx_k_openMonitorNow), 0, 0, 1, 1}, + {&__pyx_kp_u_openMonitorNowAndWait_timeout, __pyx_k_openMonitorNowAndWait_timeout, sizeof(__pyx_k_openMonitorNowAndWait_timeout), 0, 1, 0, 0}, + {&__pyx_n_s_openMonitorPrepare, __pyx_k_openMonitorPrepare, sizeof(__pyx_k_openMonitorPrepare), 0, 0, 1, 1}, + {&__pyx_n_s_openNoWait, __pyx_k_openNoWait, sizeof(__pyx_k_openNoWait), 0, 0, 1, 1}, + {&__pyx_n_s_openNowAndWait, __pyx_k_openNowAndWait, sizeof(__pyx_k_openNowAndWait), 0, 0, 1, 1}, + {&__pyx_n_u_openNowAndWait, __pyx_k_openNowAndWait, sizeof(__pyx_k_openNowAndWait), 0, 1, 0, 1}, + {&__pyx_n_s_openPrepare, __pyx_k_openPrepare, sizeof(__pyx_k_openPrepare), 0, 0, 1, 1}, + {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_kp_u_overallStatus, __pyx_k_overallStatus, sizeof(__pyx_k_overallStatus), 0, 1, 0, 0}, + {&__pyx_kp_u_pGoodData_f, __pyx_k_pGoodData_f, sizeof(__pyx_k_pGoodData_f), 0, 1, 0, 0}, + {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, + {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1}, + {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, + {&__pyx_kp_u_precision_d, __pyx_k_precision_d, sizeof(__pyx_k_precision_d), 0, 1, 0, 0}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_printFlag, __pyx_k_printFlag, sizeof(__pyx_k_printFlag), 0, 0, 1, 1}, + {&__pyx_n_s_printHandle, __pyx_k_printHandle, sizeof(__pyx_k_printHandle), 0, 0, 1, 1}, + {&__pyx_n_u_printHandlesV, __pyx_k_printHandlesV, sizeof(__pyx_k_printHandlesV), 0, 1, 0, 1}, + {&__pyx_n_u_printStatusIfError, __pyx_k_printStatusIfError, sizeof(__pyx_k_printStatusIfError), 0, 1, 0, 1}, + {&__pyx_kp_u_pulseID, __pyx_k_pulseID, sizeof(__pyx_k_pulseID), 0, 1, 0, 0}, + {&__pyx_n_s_pulseID_2, __pyx_k_pulseID_2, sizeof(__pyx_k_pulseID_2), 0, 0, 1, 1}, + {&__pyx_kp_u_pulse_id_d, __pyx_k_pulse_id_d, sizeof(__pyx_k_pulse_id_d), 0, 1, 0, 0}, + {&__pyx_kp_u_pv, __pyx_k_pv, sizeof(__pyx_k_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_pvIdx, __pyx_k_pvIdx, sizeof(__pyx_k_pvIdx), 0, 1, 0, 0}, + {&__pyx_n_s_pvList, __pyx_k_pvList, sizeof(__pyx_k_pvList), 0, 0, 1, 1}, + {&__pyx_kp_u_pv_2, __pyx_k_pv_2, sizeof(__pyx_k_pv_2), 0, 1, 0, 0}, + {&__pyx_n_s_pv_3, __pyx_k_pv_3, sizeof(__pyx_k_pv_3), 0, 0, 1, 1}, + {&__pyx_n_s_pv_name, __pyx_k_pv_name, sizeof(__pyx_k_pv_name), 0, 0, 1, 1}, + {&__pyx_n_s_pv_name_2, __pyx_k_pv_name_2, sizeof(__pyx_k_pv_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_pv_value, __pyx_k_pv_value, sizeof(__pyx_k_pv_value), 0, 0, 1, 1}, + {&__pyx_n_s_pvctrl, __pyx_k_pvctrl, sizeof(__pyx_k_pvctrl), 0, 0, 1, 1}, + {&__pyx_n_s_pvdata, __pyx_k_pvdata, sizeof(__pyx_k_pvdata), 0, 0, 1, 1}, + {&__pyx_n_s_pvgroup, __pyx_k_pvgroup, sizeof(__pyx_k_pvgroup), 0, 0, 1, 1}, + {&__pyx_n_s_pvhandleList, __pyx_k_pvhandleList, sizeof(__pyx_k_pvhandleList), 0, 0, 1, 1}, + {&__pyx_n_s_pvlist, __pyx_k_pvlist, sizeof(__pyx_k_pvlist), 0, 0, 1, 1}, + {&__pyx_kp_u_py_cb_handle_connect_wrapper_CO, __pyx_k_py_cb_handle_connect_wrapper_CO, sizeof(__pyx_k_py_cb_handle_connect_wrapper_CO), 0, 1, 0, 0}, + {&__pyx_kp_u_py_cb_handle_monid_wrapper_MONI, __pyx_k_py_cb_handle_monid_wrapper_MONI, sizeof(__pyx_k_py_cb_handle_monid_wrapper_MONI), 0, 1, 0, 0}, + {&__pyx_kp_u_py_cb_handle_open_wrapper_OPEN, __pyx_k_py_cb_handle_open_wrapper_OPEN, sizeof(__pyx_k_py_cb_handle_open_wrapper_OPEN), 0, 1, 0, 0}, + {&__pyx_kp_u_py_cb_handle_wrapper_HANDLE_Han, __pyx_k_py_cb_handle_wrapper_HANDLE_Han, sizeof(__pyx_k_py_cb_handle_wrapper_HANDLE_Han), 0, 1, 0, 0}, + {&__pyx_kp_u_py_cb_wrapper_PVDATA_Handle_PVN, __pyx_k_py_cb_wrapper_PVDATA_Handle_PVN, sizeof(__pyx_k_py_cb_wrapper_PVDATA_Handle_PVN), 0, 1, 0, 0}, + {&__pyx_n_s_pymodule, __pyx_k_pymodule, sizeof(__pyx_k_pymodule), 0, 0, 1, 1}, + {&__pyx_n_s_pymodule_parts, __pyx_k_pymodule_parts, sizeof(__pyx_k_pymodule_parts), 0, 0, 1, 1}, + {&__pyx_n_s_python_version, __pyx_k_python_version, sizeof(__pyx_k_python_version), 0, 0, 1, 1}, + {&__pyx_kp_u_pyx, __pyx_k_pyx, sizeof(__pyx_k_pyx), 0, 1, 0, 0}, + {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_CafeException, __pyx_k_pyx_unpickle_CafeException, sizeof(__pyx_k_pyx_unpickle_CafeException), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_kp_u_reports_the_following_error, __pyx_k_reports_the_following_error, sizeof(__pyx_k_reports_the_following_error), 0, 1, 0, 0}, + {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, + {&__pyx_n_s_scalarOnly, __pyx_k_scalarOnly, sizeof(__pyx_k_scalarOnly), 0, 0, 1, 1}, + {&__pyx_kp_u_sec, __pyx_k_sec, sizeof(__pyx_k_sec), 0, 1, 0, 0}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1}, + {&__pyx_kp_u_setAndMatchMany_list_handlePVSet, __pyx_k_setAndMatchMany_list_handlePVSet, sizeof(__pyx_k_setAndMatchMany_list_handlePVSet), 0, 1, 0, 0}, + {&__pyx_kp_u_setAndMatch_handlePVSet_double_v, __pyx_k_setAndMatch_handlePVSet_double_v, sizeof(__pyx_k_setAndMatch_handlePVSet_double_v), 0, 1, 0, 0}, + {&__pyx_n_u_setBS, __pyx_k_setBS, sizeof(__pyx_k_setBS), 0, 1, 0, 1}, + {&__pyx_n_u_setCallbackGet, __pyx_k_setCallbackGet, sizeof(__pyx_k_setCallbackGet), 0, 1, 0, 1}, + {&__pyx_n_u_setCallbackPut, __pyx_k_setCallbackPut, sizeof(__pyx_k_setCallbackPut), 0, 1, 0, 1}, + {&__pyx_n_u_setChannelRequestPolicyGet, __pyx_k_setChannelRequestPolicyGet, sizeof(__pyx_k_setChannelRequestPolicyGet), 0, 1, 0, 1}, + {&__pyx_kp_u_setCompoundList_handleList_list, __pyx_k_setCompoundList_handleList_list, sizeof(__pyx_k_setCompoundList_handleList_list), 0, 1, 0, 0}, + {&__pyx_n_s_setDbrBase, __pyx_k_setDbrBase, sizeof(__pyx_k_setDbrBase), 0, 0, 1, 1}, + {&__pyx_n_s_setGetActionWhenMonitorPolicy, __pyx_k_setGetActionWhenMonitorPolicy, sizeof(__pyx_k_setGetActionWhenMonitorPolicy), 0, 0, 1, 1}, + {&__pyx_n_s_setGetCacheWaitPolicy, __pyx_k_setGetCacheWaitPolicy, sizeof(__pyx_k_setGetCacheWaitPolicy), 0, 0, 1, 1}, + {&__pyx_kp_u_setGroup_self_ghandleName_list_v, __pyx_k_setGroup_self_ghandleName_list_v, sizeof(__pyx_k_setGroup_self_ghandleName_list_v), 0, 1, 0, 0}, + {&__pyx_n_u_setNelem, __pyx_k_setNelem, sizeof(__pyx_k_setNelem), 0, 1, 0, 1}, + {&__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i, __pyx_k_setNelemCtrl_handlePV_unsigned_i, sizeof(__pyx_k_setNelemCtrl_handlePV_unsigned_i), 0, 1, 0, 0}, + {&__pyx_n_u_setNelemToNative, __pyx_k_setNelemToNative, sizeof(__pyx_k_setNelemToNative), 0, 1, 0, 1}, + {&__pyx_n_u_setNelemToRetrieveFromCacheToOne, __pyx_k_setNelemToRetrieveFromCacheToOne, sizeof(__pyx_k_setNelemToRetrieveFromCacheToOne), 0, 1, 0, 1}, + {&__pyx_n_u_setPulseIDBufferSize, __pyx_k_setPulseIDBufferSize, sizeof(__pyx_k_setPulseIDBufferSize), 0, 1, 0, 1}, + {&__pyx_n_s_setPyCallbackConnect, __pyx_k_setPyCallbackConnect, sizeof(__pyx_k_setPyCallbackConnect), 0, 0, 1, 1}, + {&__pyx_n_s_setPyConnectCallbackFn, __pyx_k_setPyConnectCallbackFn, sizeof(__pyx_k_setPyConnectCallbackFn), 0, 0, 1, 1}, + {&__pyx_n_u_setScalarList, __pyx_k_setScalarList, sizeof(__pyx_k_setScalarList), 0, 1, 0, 1}, + {&__pyx_kp_u_set_handlePV_valSet, __pyx_k_set_handlePV_valSet, sizeof(__pyx_k_set_handlePV_valSet), 0, 1, 0, 0}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, + {&__pyx_n_s_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 0, 1, 1}, + {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 1, 0, 1}, + {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1}, + {&__pyx_n_s_showMax, __pyx_k_showMax, sizeof(__pyx_k_showMax), 0, 0, 1, 1}, + {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1}, + {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1}, + {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, + {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1}, + {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, + {&__pyx_kp_u_source_2, __pyx_k_source_2, sizeof(__pyx_k_source_2), 0, 1, 0, 0}, + {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, + {&__pyx_kp_u_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 1, 0, 0}, + {&__pyx_n_s_statusAsString, __pyx_k_statusAsString, sizeof(__pyx_k_statusAsString), 0, 0, 1, 1}, + {&__pyx_n_s_statusList, __pyx_k_statusList, sizeof(__pyx_k_statusList), 0, 0, 1, 1}, + {&__pyx_kp_u_status_2, __pyx_k_status_2, sizeof(__pyx_k_status_2), 0, 1, 0, 0}, + {&__pyx_n_s_status_3, __pyx_k_status_3, sizeof(__pyx_k_status_3), 0, 0, 1, 1}, + {&__pyx_kp_u_status_4, __pyx_k_status_4, sizeof(__pyx_k_status_4), 0, 1, 0, 0}, + {&__pyx_kp_u_status_d, __pyx_k_status_d, sizeof(__pyx_k_status_d), 0, 1, 0, 0}, + {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, + {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, + {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1}, + {&__pyx_n_s_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 0, 1, 1}, + {&__pyx_n_u_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 1, 0, 1}, + {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0}, + {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0}, + {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0}, + {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1}, + {&__pyx_n_u_string_2, __pyx_k_string_2, sizeof(__pyx_k_string_2), 0, 1, 0, 1}, + {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, + {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, + {&__pyx_n_s_supplementHandle, __pyx_k_supplementHandle, sizeof(__pyx_k_supplementHandle), 0, 0, 1, 1}, + {&__pyx_n_u_supplementHandles, __pyx_k_supplementHandles, sizeof(__pyx_k_supplementHandles), 0, 1, 0, 1}, + {&__pyx_n_s_supplementHandlesV, __pyx_k_supplementHandlesV, sizeof(__pyx_k_supplementHandlesV), 0, 0, 1, 1}, + {&__pyx_n_u_supplementHandlesV, __pyx_k_supplementHandlesV, sizeof(__pyx_k_supplementHandlesV), 0, 1, 0, 1}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, + {&__pyx_n_s_timeit, __pyx_k_timeit, sizeof(__pyx_k_timeit), 0, 0, 1, 1}, + {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1}, + {&__pyx_n_s_timeoutMS, __pyx_k_timeoutMS, sizeof(__pyx_k_timeoutMS), 0, 0, 1, 1}, + {&__pyx_kp_u_timeoutMS_d, __pyx_k_timeoutMS_d, sizeof(__pyx_k_timeoutMS_d), 0, 1, 0, 0}, + {&__pyx_n_s_tolerance, __pyx_k_tolerance, sizeof(__pyx_k_tolerance), 0, 0, 1, 1}, + {&__pyx_kp_u_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 1, 0, 0}, + {&__pyx_kp_u_tsDate, __pyx_k_tsDate, sizeof(__pyx_k_tsDate), 0, 1, 0, 0}, + {&__pyx_n_s_tsDateAsString, __pyx_k_tsDateAsString, sizeof(__pyx_k_tsDateAsString), 0, 0, 1, 1}, + {&__pyx_n_s_tsDate_2, __pyx_k_tsDate_2, sizeof(__pyx_k_tsDate_2), 0, 0, 1, 1}, + {&__pyx_n_s_ts_2, __pyx_k_ts_2, sizeof(__pyx_k_ts_2), 0, 0, 1, 1}, + {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, + {&__pyx_kp_u_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 1, 0, 0}, + {&__pyx_n_s_type_3, __pyx_k_type_3, sizeof(__pyx_k_type_3), 0, 0, 1, 1}, + {&__pyx_n_s_ubyte, __pyx_k_ubyte, sizeof(__pyx_k_ubyte), 0, 0, 1, 1}, + {&__pyx_n_u_uchar, __pyx_k_uchar, sizeof(__pyx_k_uchar), 0, 1, 0, 1}, + {&__pyx_n_s_uint, __pyx_k_uint, sizeof(__pyx_k_uint), 0, 0, 1, 1}, + {&__pyx_n_u_uint, __pyx_k_uint, sizeof(__pyx_k_uint), 0, 1, 0, 1}, + {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1}, + {&__pyx_n_u_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 1, 0, 1}, + {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, + {&__pyx_n_u_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 1, 0, 1}, + {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1}, + {&__pyx_n_u_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 1, 0, 1}, + {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, + {&__pyx_n_u_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 1, 0, 1}, + {&__pyx_n_s_uintc, __pyx_k_uintc, sizeof(__pyx_k_uintc), 0, 0, 1, 1}, + {&__pyx_n_s_uintp, __pyx_k_uintp, sizeof(__pyx_k_uintp), 0, 0, 1, 1}, + {&__pyx_n_s_ulonglong, __pyx_k_ulonglong, sizeof(__pyx_k_ulonglong), 0, 0, 1, 1}, + {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0}, + {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0}, + {&__pyx_n_u_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 1, 0, 1}, + {&__pyx_n_s_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 0, 1, 1}, + {&__pyx_n_u_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 1, 0, 1}, + {&__pyx_kp_u_units_s, __pyx_k_units_s, sizeof(__pyx_k_units_s), 0, 1, 0, 0}, + {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, + {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_kp_u_upperAlarmLimit_f, __pyx_k_upperAlarmLimit_f, sizeof(__pyx_k_upperAlarmLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperControlLimit_f, __pyx_k_upperControlLimit_f, sizeof(__pyx_k_upperControlLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperDisplayLimit_f, __pyx_k_upperDisplayLimit_f, sizeof(__pyx_k_upperDisplayLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperWarningLimit_f, __pyx_k_upperWarningLimit_f, sizeof(__pyx_k_upperWarningLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_userArgs, __pyx_k_userArgs, sizeof(__pyx_k_userArgs), 0, 1, 0, 0}, + {&__pyx_n_s_ushort, __pyx_k_ushort, sizeof(__pyx_k_ushort), 0, 0, 1, 1}, + {&__pyx_n_u_ushort, __pyx_k_ushort, sizeof(__pyx_k_ushort), 0, 1, 0, 1}, + {&__pyx_n_u_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 1, 0, 1}, + {&__pyx_n_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 1}, + {&__pyx_kp_u_utf_8_2, __pyx_k_utf_8_2, sizeof(__pyx_k_utf_8_2), 0, 1, 0, 0}, + {&__pyx_n_s_valAction, __pyx_k_valAction, sizeof(__pyx_k_valAction), 0, 0, 1, 1}, + {&__pyx_n_s_valList, __pyx_k_valList, sizeof(__pyx_k_valList), 0, 0, 1, 1}, + {&__pyx_n_s_valSet, __pyx_k_valSet, sizeof(__pyx_k_valSet), 0, 0, 1, 1}, + {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0}, + {&__pyx_kp_u_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 1, 0, 0}, + {&__pyx_kp_u_value_3, __pyx_k_value_3, sizeof(__pyx_k_value_3), 0, 1, 0, 0}, + {&__pyx_kp_u_value_4, __pyx_k_value_4, sizeof(__pyx_k_value_4), 0, 1, 0, 0}, + {&__pyx_kp_u_value_5, __pyx_k_value_5, sizeof(__pyx_k_value_5), 0, 1, 0, 0}, + {&__pyx_n_s_value_6, __pyx_k_value_6, sizeof(__pyx_k_value_6), 0, 0, 1, 1}, + {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, + {&__pyx_n_s_vectorList, __pyx_k_vectorList, sizeof(__pyx_k_vectorList), 0, 0, 1, 1}, + {&__pyx_n_s_verify_handlepv, __pyx_k_verify_handlepv, sizeof(__pyx_k_verify_handlepv), 0, 0, 1, 1}, + {&__pyx_n_s_verify_handlepv_locals_wrapper, __pyx_k_verify_handlepv_locals_wrapper, sizeof(__pyx_k_verify_handlepv_locals_wrapper), 0, 0, 1, 1}, + {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, + {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1}, + {&__pyx_kp_u_waitForBundledEvents_self_handle, __pyx_k_waitForBundledEvents_self_handle, sizeof(__pyx_k_waitForBundledEvents_self_handle), 0, 1, 0, 0}, + {&__pyx_n_s_waitForGetEvent, __pyx_k_waitForGetEvent, sizeof(__pyx_k_waitForGetEvent), 0, 0, 1, 1}, + {&__pyx_n_u_waveform, __pyx_k_waveform, sizeof(__pyx_k_waveform), 0, 1, 0, 1}, + {&__pyx_n_s_wf, __pyx_k_wf, sizeof(__pyx_k_wf), 0, 0, 1, 1}, + {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1}, + {&__pyx_kp_u_while_list_of_callback_objects, __pyx_k_while_list_of_callback_objects, sizeof(__pyx_k_while_list_of_callback_objects), 0, 1, 0, 0}, + {&__pyx_n_s_widget, __pyx_k_widget, sizeof(__pyx_k_widget), 0, 0, 1, 1}, + {&__pyx_kp_u_with_error_status, __pyx_k_with_error_status, sizeof(__pyx_k_with_error_status), 0, 1, 0, 0}, + {&__pyx_n_s_wmpk, __pyx_k_wmpk, sizeof(__pyx_k_wmpk), 0, 0, 1, 1}, + {&__pyx_n_s_wpk, __pyx_k_wpk, sizeof(__pyx_k_wpk), 0, 0, 1, 1}, + {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1}, + {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(2, 698, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 815, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(2, 1326, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(3, 104, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 203, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 214, __pyx_L1_error) + __pyx_builtin_UserWarning = __Pyx_GetBuiltinName(__pyx_n_s_UserWarning); if (!__pyx_builtin_UserWarning) __PYX_ERR(3, 756, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(3, 1522, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(4, 1038, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 400, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 609, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 828, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "PyCafeDefs.pxi":777 + * self.alarmSeverity = -1 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings = 0 + * self.enumStrings = [] + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u__3); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "PyCafeDefs.pxi":812 + * print("value =", self.value[0], end="" ) + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_value_3); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "PyCafeDefs.pxi":828 + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_enumStrings); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "PyCafeDefs.pxi":869 + * + * def show(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(self.type) + */ + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_CafeException); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "PyCafeDefs.pxi":888 + * else: + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u__15); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + + /* "PyCafeDefs.pxi":1016 + * print("") + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_value_5); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 1016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + + /* "PyCafeDefs.pxi":1069 + * def showWithPV(self, glist): + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") # <<<<<<<<<<<<<< + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + */ + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); + + /* "PyCafeDefs.pxi":1097 + * print("PV =", grouplist[i]) + * + * print("value = ", end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + */ + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_value); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); + + /* "PyCafeDefs.pxi":1113 + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u__26); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + + /* "PyCafeDefs.pxi":1159 + * dtcheck = dtn # need a line here + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") # <<<<<<<<<<<<<< + * print("Data to be presented in native data type") + * + */ + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Valid_input_parameters_for_data); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 1159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + + /* "PyCafeDefs.pxi":1160 + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + * print("Data to be presented in native data type") # <<<<<<<<<<<<<< + * + * return dtcheck + */ + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Data_to_be_presented_in_native_d); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 1160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + + /* "PyCafeDefs.pxi":1480 + * # Should never happen + * if lenPV != len(self.BSChannel): + * print("Anomoly in BSData deepcopy. Unequal lengths. Take minimum value") # <<<<<<<<<<<<<< + * if lenPV > len(self.BSChannel): + * lenPV = len(self.BSChannel) + */ + __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Anomoly_in_BSData_deepcopy_Unequ); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 1480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + + /* "PyCafeDefs.pxi":1616 + * if self.BSChannel[i].BSEnabled and self.isBS: + * if BSCA in (None, 'BS'): + * print("---------------------------------") # <<<<<<<<<<<<<< + * print("pv= %s [%d] BS" % (self.pv[i], i)) + * if wf > 1: + */ + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u__24); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 1616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__40); + __Pyx_GIVEREF(__pyx_tuple__40); + + /* "PyCafe.pyx":88 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + __pyx_tuple__41 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_handlePV, __pyx_n_s_handle_5); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(3, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyCafe_pyx, __pyx_n_s_wrapper, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(3, 88, __pyx_L1_error) + + /* "PyCafe.pyx":203 + * + * if self._c_cafe is NULL: + * raise MemoryError("Failed to instantiate CAFE()") # <<<<<<<<<<<<<< + * + * self.cs = self._c_cafe.getCafeStatus() + */ + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_instantiate_CAFE); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(3, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + + /* "PyCafe.pyx":230 + * self.isBSinCAOnly = False + * + * print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_tuple__44 = PyTuple_Pack(1, __pyx_int_50792432); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(3, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__44); + __Pyx_GIVEREF(__pyx_tuple__44); + + /* "PyCafe.pyx":233 + * + * IF PY_EXT_C: + * print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS") # <<<<<<<<<<<<<< + * ELSE: + * print("USING API PyCafe_api.h INTERFACE FOR CALLBACKS") + */ + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(3, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + + /* "PyCafe.pyx":1779 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + * + */ + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(3, 1779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + + /* "PyCafe.pyx":1966 + * # Print Warning Message + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") # <<<<<<<<<<<<<< + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + */ + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(3, 1966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); + + /* "PyCafe.pyx":1967 + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") # <<<<<<<<<<<<<< + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + */ + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_Allowed_DBR_TYPEs_are); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(3, 1967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + + /* "PyCafe.pyx":1968 + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") # <<<<<<<<<<<<<< + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME + */ + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(3, 1968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + + /* "PyCafe.pyx":1993 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + */ + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(3, 1993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + + /* "PyCafe.pyx":1996 + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + */ + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetCacheWaitPolic); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(3, 1996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + + /* "PyCafe.pyx":1997 + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + */ + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(3, 1997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + + /* "PyCafe.pyx":2018 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + */ + __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(3, 2018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + + /* "PyCafe.pyx":2022 + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + */ + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(3, 2022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + + /* "PyCafe.pyx":2044 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(3, 2044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + + /* "PyCafe.pyx":2045 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, + */ + __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetActionWhenMoni); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(3, 2045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + + /* "PyCafe.pyx":2046 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(3, 2046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + + /* "PyCafe.pyx":2064 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(3, 2064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + + /* "PyCafe.pyx":2066 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print( + * "The value entered was", wmpk, + */ + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(3, 2066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + + /* "PyCafe.pyx":2224 + * return self.valInt + * else: + * print("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_get_shou); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(3, 2224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + + /* "PyCafe.pyx":2476 + * return None + * else: + * print("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getAsLis); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(3, 2476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + + /* "PyCafe.pyx":2693 + * + * elif art in ['array', 'array.array']: + * print( # <<<<<<<<<<<<<< + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + */ + __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_pyx_getArray_array_type_d); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(3, 2693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + + /* "PyCafe.pyx":2714 + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + */ + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(3, 2714, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__70); + __Pyx_GIVEREF(__pyx_tuple__70); + + /* "PyCafe.pyx":2715 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(3, 2715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + + /* "PyCafe.pyx":2789 + * elif art in ['array', 'array.array']: + * + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) + */ + __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(3, 2789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); + + /* "PyCafe.pyx":2955 + * elif art in ['array', 'array.array']: + * + * a = array.array('f') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_u_f); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(3, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + + /* "PyCafe.pyx":3037 + * + * elif art in ['array', 'array.array']: + * a = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + */ + __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_u_d); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(3, 3037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + + /* "PyCafe.pyx":3409 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_Error_Warning_from_def_getAsyn); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(3, 3409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + + /* "PyCafe.pyx":3441 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(3, 3441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + + /* "PyCafe.pyx":3447 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(3, 3447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + + /* "PyCafe.pyx":3464 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_waitForBundledEvent); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(3, 3464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); + + /* "PyCafe.pyx":3481 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(3, 3481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + + /* "PyCafe.pyx":3487 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(3, 3487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__80); + __Pyx_GIVEREF(__pyx_tuple__80); + + /* "PyCafe.pyx":3538 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getScalarArray); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(3, 3538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + + /* "PyCafe.pyx":3713 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_def_getScalarArray); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(3, 3713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__82); + __Pyx_GIVEREF(__pyx_tuple__82); + + /* "PyCafe.pyx":3758 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(3, 3758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + + /* "PyCafe.pyx":3764 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(3, 3764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__84); + __Pyx_GIVEREF(__pyx_tuple__84); + + /* "PyCafe.pyx":3826 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getScalarList); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(3, 3826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + + /* "PyCafe.pyx":4003 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_def_getScalarList); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(3, 4003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); + + /* "PyCafe.pyx":4032 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(3, 4032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + + /* "PyCafe.pyx":4038 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(3, 4038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); + + /* "PyCafe.pyx":4045 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(3, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + + /* "PyCafe.pyx":4126 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getCompoundList); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(3, 4126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__90); + __Pyx_GIVEREF(__pyx_tuple__90); + + /* "PyCafe.pyx":4286 + * else: + * + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if group handle, else if group name") + * + */ + __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(3, 4286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + + /* "PyCafe.pyx":4394 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(3, 4394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__92); + __Pyx_GIVEREF(__pyx_tuple__92); + + /* "PyCafe.pyx":4474 + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") # <<<<<<<<<<<<<< + * print("Datatype unknown, returning value 0") + * return 0 + */ + __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getCache); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(3, 4474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + + /* "PyCafe.pyx":4475 + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_Datatype_unknown_returning_value); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(3, 4475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__94); + __Pyx_GIVEREF(__pyx_tuple__94); + + /* "PyCafe.pyx":4958 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(3, 4958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + + /* "PyCafe.pyx":5004 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(3, 5004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__96); + __Pyx_GIVEREF(__pyx_tuple__96); + + /* "PyCafe.pyx":5050 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(3, 5050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + + /* "PyCafe.pyx":5131 + * handle = self.checkForHandle(handlePV, force=True) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(3, 5131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__98); + __Pyx_GIVEREF(__pyx_tuple__98); + + /* "PyCafe.pyx":5195 + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(3, 5195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + + /* "PyCafe.pyx":5197 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * # Legacy + */ + __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_u_Assuming_DBR_TIME); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(3, 5197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__104); + __Pyx_GIVEREF(__pyx_tuple__104); + + /* "PyCafe.pyx":5227 + * # a=inspect.getargspec(cb) + * + * print('============//1//') # <<<<<<<<<<<<<< + * print('SIGNATURE:') + * print(str(sig)) + */ + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u_1); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(3, 5227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + + /* "PyCafe.pyx":5228 + * + * print('============//1//') + * print('SIGNATURE:') # <<<<<<<<<<<<<< + * print(str(sig)) + * for param in sig.parameters.values(): + */ + __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_SIGNATURE); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(3, 5228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__106); + __Pyx_GIVEREF(__pyx_tuple__106); + + /* "PyCafe.pyx":5307 + * + * if not isinstance(cb, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * Input cb should be of type and give the list of cb objects") + * + */ + __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(3, 5307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); + + /* "PyCafe.pyx":5325 + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * No of group members doe not match the length of callback object list") + * + */ + __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(3, 5325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__110); + __Pyx_GIVEREF(__pyx_tuple__110); + + /* "PyCafe.pyx":5348 + * sig = inspect.signature(cb[i]) + * + * print('============') # <<<<<<<<<<<<<< + * print('SIGNATURE//2//:') + * print(str(sig)) + */ + __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_u__111); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(3, 5348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__112); + __Pyx_GIVEREF(__pyx_tuple__112); + + /* "PyCafe.pyx":5349 + * + * print('============') + * print('SIGNATURE//2//:') # <<<<<<<<<<<<<< + * print(str(sig)) + * for param in sig.parameters.values(): + */ + __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_u_SIGNATURE_2); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(3, 5349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__113); + __Pyx_GIVEREF(__pyx_tuple__113); + + /* "PyCafe.pyx":5451 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + */ + __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u__114); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(3, 5451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__115); + __Pyx_GIVEREF(__pyx_tuple__115); + + /* "PyCafe.pyx":5453 + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_switching_to); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(3, 5453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__116); + __Pyx_GIVEREF(__pyx_tuple__116); + + /* "PyCafe.pyx":5707 + * if status == ECA_TIMEOUT: + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) + */ + __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_swithing_to); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(3, 5707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); + + /* "PyCafe.pyx":5760 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) # <<<<<<<<<<<<<< + * print(_METHOD) + * pvg.showMax(1) + */ + __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_u__118); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(3, 5760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__119); + __Pyx_GIVEREF(__pyx_tuple__119); + + /* "PyCafe.pyx":5885 + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") # <<<<<<<<<<<<<< + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + */ + __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_u_Analysing_statusList); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(3, 5885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__120); + __Pyx_GIVEREF(__pyx_tuple__120); + + /* "PyCafe.pyx":6115 + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) + * print("dbr base type should be one of \ # <<<<<<<<<<<<<< + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D_2); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(3, 6115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__127); + __Pyx_GIVEREF(__pyx_tuple__127); + + /* "PyCafe.pyx":6237 + * + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be of type ") + * else: + */ + __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(3, 6237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__128); + __Pyx_GIVEREF(__pyx_tuple__128); + + /* "PyCafe.pyx":6413 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + __pyx_tuple__129 = PyTuple_Pack(2, __pyx_int_2, __pyx_int_6); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(3, 6413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__129); + __Pyx_GIVEREF(__pyx_tuple__129); + + /* "PyCafe.pyx":6644 + * status = self._c_cafe.setString(handle, valSetS) + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") # <<<<<<<<<<<<<< + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + */ + __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(3, 6644, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__130); + __Pyx_GIVEREF(__pyx_tuple__130); + + /* "PyCafe.pyx":6645 + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ # <<<<<<<<<<<<<< + * or not) should be of of type , or ") + * type(valSet) + */ + __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_u_Input_data_whether_within_a_list); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(3, 6645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__131); + __Pyx_GIVEREF(__pyx_tuple__131); + + /* "PyCafe.pyx":6674 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type \ + * if handles or if PVs") + */ + __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(3, 6674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__132); + __Pyx_GIVEREF(__pyx_tuple__132); + + /* "PyCafe.pyx":6720 + * pvd[i].setInt(valList[i]) + * else: + * print("This line in PyCafe def setScalarList should never appear!") # <<<<<<<<<<<<<< + * + * cdef int status = ICAFE_NORMAL + */ + __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setScala); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(3, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); + + /* "PyCafe.pyx":6762 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(3, 6762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__134); + __Pyx_GIVEREF(__pyx_tuple__134); + + /* "PyCafe.pyx":6768 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(3, 6768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__135); + __Pyx_GIVEREF(__pyx_tuple__135); + + /* "PyCafe.pyx":6827 + * + * else: + * print("This line in PyCafe def setCompoundList should never appear!") # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * Unknown data input; should be one of of type , , , ") + */ + __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setCompo); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(3, 6827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__136); + __Pyx_GIVEREF(__pyx_tuple__136); + + /* "PyCafe.pyx":6828 + * else: + * print("This line in PyCafe def setCompoundList should never appear!") + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(3, 6828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); + + /* "PyCafe.pyx":6926 + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(3, 6926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__139); + __Pyx_GIVEREF(__pyx_tuple__139); + + /* "PyCafe.pyx":6966 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(3, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__140); + __Pyx_GIVEREF(__pyx_tuple__140); + + /* "PyCafe.pyx":6970 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(3, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__141); + __Pyx_GIVEREF(__pyx_tuple__141); + + /* "PyCafe.pyx":7168 + * + * 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!") + * + */ + __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(3, 7168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__142); + __Pyx_GIVEREF(__pyx_tuple__142); + + /* "PyCafe.pyx":7345 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(3, 7345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__143); + __Pyx_GIVEREF(__pyx_tuple__143); + + /* "PyCafe.pyx":7488 + * + * if self.BSInitialized == True: + * print("Message from setBS: ONLY A SINGLE STREAM IS ALLOWED") # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_u_Message_from_setBS_ONLY_A_SINGLE); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(3, 7488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__144); + __Pyx_GIVEREF(__pyx_tuple__144); + + /* "PyCafe.pyx":7563 + * if self.BSInitialized == False: + * if self.isBSinCAOnly == False: + * print(("Message from getBS: BS stream not initialized;" # <<<<<<<<<<<<<< + * "cafe.setBS(pvList) has first to be called.")) + * return None + */ + __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_u_Message_from_getBS_BS_stream_not); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(3, 7563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__145); + __Pyx_GIVEREF(__pyx_tuple__145); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__146); + __Pyx_GIVEREF(__pyx_tuple__146); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__147); + __Pyx_GIVEREF(__pyx_tuple__147); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(4, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__148); + __Pyx_GIVEREF(__pyx_tuple__148); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(4, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__149); + __Pyx_GIVEREF(__pyx_tuple__149); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_tuple__150 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(4, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__150); + __Pyx_GIVEREF(__pyx_tuple__150); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(4, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__151); + __Pyx_GIVEREF(__pyx_tuple__151); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(4, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__152); + __Pyx_GIVEREF(__pyx_tuple__152); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + * _import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(4, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__153); + __Pyx_GIVEREF(__pyx_tuple__153); + + /* "../../../../../../../../opt/gfa/python-3.7/latest/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(4, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__154); + __Pyx_GIVEREF(__pyx_tuple__154); + + /* "View.MemoryView":133 + * + * if not self.ndim: + * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< + * + * if itemsize <= 0: + */ + __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__155); + __Pyx_GIVEREF(__pyx_tuple__155); + + /* "View.MemoryView":136 + * + * if itemsize <= 0: + * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): + */ + __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__156); + __Pyx_GIVEREF(__pyx_tuple__156); + + /* "View.MemoryView":148 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__157); + __Pyx_GIVEREF(__pyx_tuple__157); + + /* "View.MemoryView":176 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_tuple__158 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__158); + __Pyx_GIVEREF(__pyx_tuple__158); + + /* "View.MemoryView":192 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len + */ + __pyx_tuple__159 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__159); + __Pyx_GIVEREF(__pyx_tuple__159); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__160); + __Pyx_GIVEREF(__pyx_tuple__160); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + + /* "View.MemoryView":414 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) + */ + __pyx_tuple__162 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(1, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__162); + __Pyx_GIVEREF(__pyx_tuple__162); + + /* "View.MemoryView":491 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: + */ + __pyx_tuple__163 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(1, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__163); + __Pyx_GIVEREF(__pyx_tuple__163); + + /* "View.MemoryView":516 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: + */ + __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__164); + __Pyx_GIVEREF(__pyx_tuple__164); + + /* "View.MemoryView":566 + * if self.view.strides == NULL: + * + * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + */ + __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(1, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__165); + __Pyx_GIVEREF(__pyx_tuple__165); + + /* "View.MemoryView":573 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + */ + __pyx_tuple__166 = PyTuple_New(1); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__166); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_tuple__166, 0, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_tuple__166); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__167); + __Pyx_GIVEREF(__pyx_tuple__167); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__168); + __Pyx_GIVEREF(__pyx_tuple__168); + + /* "View.MemoryView":678 + * if item is Ellipsis: + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * else: + */ + __pyx_slice__169 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__169)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__169); + __Pyx_GIVEREF(__pyx_slice__169); + + /* "View.MemoryView":699 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__170); + __Pyx_GIVEREF(__pyx_tuple__170); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__171); + __Pyx_GIVEREF(__pyx_tuple__171); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__172); + __Pyx_GIVEREF(__pyx_tuple__172); + + /* "PyCafe.pyx":45 + * + * _pymodule = "PyCafe.pyx" # os.path.basename(__file__) + * _pymodule_parts = _pymodule.split(".") # <<<<<<<<<<<<<< + * _appname = _pymodule_parts[0] + * + */ + __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u__173); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(3, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__174); + __Pyx_GIVEREF(__pyx_tuple__174); + + /* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + __pyx_tuple__175 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_wrapper, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(3, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__175); + __Pyx_GIVEREF(__pyx_tuple__175); + __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyCafe_pyx, __pyx_n_s_verify_handlepv, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(3, 66, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__177 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__177); + __Pyx_GIVEREF(__pyx_tuple__177); + __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CafeException, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "View.MemoryView":286 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") + */ + __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__179); + __Pyx_GIVEREF(__pyx_tuple__179); + + /* "View.MemoryView":287 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(1, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__180); + __Pyx_GIVEREF(__pyx_tuple__180); + + /* "View.MemoryView":288 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(1, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__181); + __Pyx_GIVEREF(__pyx_tuple__181); + + /* "View.MemoryView":291 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(1, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__182); + __Pyx_GIVEREF(__pyx_tuple__182); + + /* "View.MemoryView":292 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(1, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__183); + __Pyx_GIVEREF(__pyx_tuple__183); + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__184 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__184); + __Pyx_GIVEREF(__pyx_tuple__184); + __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(3, 1, __pyx_L1_error); + __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_float_0_2 = PyFloat_FromDouble(0.2); if (unlikely(!__pyx_float_0_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_float_0_02 = PyFloat_FromDouble(0.02); if (unlikely(!__pyx_float_0_02)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_float_0_05 = PyFloat_FromDouble(0.05); if (unlikely(!__pyx_float_0_05)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_float_0_001 = PyFloat_FromDouble(0.001); if (unlikely(!__pyx_float_0_001)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_50792432 = PyInt_FromLong(50792432L); if (unlikely(!__pyx_int_50792432)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_145648516 = PyInt_FromLong(145648516L); if (unlikely(!__pyx_int_145648516)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(3, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_6PyCafe_py_cb = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_openCallbackDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_hmd = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_handleMonDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_monDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_openDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_getDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_putDictGlobal = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_handle = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_handle_open = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_cbobjt = Py_None; Py_INCREF(Py_None); + generic = Py_None; Py_INCREF(Py_None); + strided = Py_None; Py_INCREF(Py_None); + indirect = Py_None; Py_INCREF(Py_None); + contiguous = Py_None; Py_INCREF(Py_None); + indirect_contiguous = Py_None; Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 36, __pyx_L1_error) + __pyx_type_6PyCafe_CyCa.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CyCa.tp_dictoffset && __pyx_type_6PyCafe_CyCa.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CyCa.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyCa, (PyObject *)&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 36, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 36, __pyx_L1_error) + __pyx_ptype_6PyCafe_CyCa = &__pyx_type_6PyCafe_CyCa; + if (PyType_Ready(&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 663, __pyx_L1_error) + __pyx_type_6PyCafe_channelInfo.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_channelInfo.tp_dictoffset && __pyx_type_6PyCafe_channelInfo.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_channelInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_channelInfo, (PyObject *)&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 663, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 663, __pyx_L1_error) + __pyx_ptype_6PyCafe_channelInfo = &__pyx_type_6PyCafe_channelInfo; + __pyx_vtabptr_6PyCafe_pvctrl = &__pyx_vtable_6PyCafe_pvctrl; + __pyx_vtable_6PyCafe_pvctrl.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvctrl *, PyObject *))__pyx_f_6PyCafe_6pvctrl_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 753, __pyx_L1_error) + __pyx_type_6PyCafe_pvctrl.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvctrl.tp_dictoffset && __pyx_type_6PyCafe_pvctrl.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvctrl.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvctrl.tp_dict, __pyx_vtabptr_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 753, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvctrl, (PyObject *)&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 753, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 753, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvctrl = &__pyx_type_6PyCafe_pvctrl; + __pyx_type_6PyCafe_CafeException.tp_base = (&((PyTypeObject*)PyExc_Exception)[0]); + if (PyType_Ready(&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 847, __pyx_L1_error) + __pyx_type_6PyCafe_CafeException.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CafeException.tp_dictoffset && __pyx_type_6PyCafe_CafeException.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CafeException.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CafeException_2, (PyObject *)&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 847, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 847, __pyx_L1_error) + __pyx_ptype_6PyCafe_CafeException = &__pyx_type_6PyCafe_CafeException; + if (PyType_Ready(&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 909, __pyx_L1_error) + __pyx_type_6PyCafe_monitorpolicy.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_monitorpolicy.tp_dictoffset && __pyx_type_6PyCafe_monitorpolicy.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_monitorpolicy.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_monitorpolicy, (PyObject *)&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 909, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 909, __pyx_L1_error) + __pyx_ptype_6PyCafe_monitorpolicy = &__pyx_type_6PyCafe_monitorpolicy; + __pyx_vtabptr_6PyCafe_pvdata = &__pyx_vtable_6PyCafe_pvdata; + __pyx_vtable_6PyCafe_pvdata.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvdata *, PyObject *))__pyx_f_6PyCafe_6pvdata_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 956, __pyx_L1_error) + __pyx_type_6PyCafe_pvdata.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvdata.tp_dictoffset && __pyx_type_6PyCafe_pvdata.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvdata.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvdata.tp_dict, __pyx_vtabptr_6PyCafe_pvdata) < 0) __PYX_ERR(2, 956, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvdata, (PyObject *)&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 956, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 956, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvdata = &__pyx_type_6PyCafe_pvdata; + __pyx_vtabptr_6PyCafe_pvgroup = &__pyx_vtable_6PyCafe_pvgroup; + __pyx_vtable_6PyCafe_pvgroup.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvgroup *, PyObject *, PyObject *))__pyx_f_6PyCafe_7pvgroup_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1045, __pyx_L1_error) + __pyx_type_6PyCafe_pvgroup.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvgroup.tp_dictoffset && __pyx_type_6PyCafe_pvgroup.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvgroup.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvgroup.tp_dict, __pyx_vtabptr_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1045, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvgroup, (PyObject *)&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1045, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1045, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvgroup = &__pyx_type_6PyCafe_pvgroup; + if (PyType_Ready(&__pyx_type_6PyCafe_bschannel) < 0) __PYX_ERR(2, 1378, __pyx_L1_error) + __pyx_type_6PyCafe_bschannel.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_bschannel.tp_dictoffset && __pyx_type_6PyCafe_bschannel.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_bschannel.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_bschannel, (PyObject *)&__pyx_type_6PyCafe_bschannel) < 0) __PYX_ERR(2, 1378, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_bschannel) < 0) __PYX_ERR(2, 1378, __pyx_L1_error) + __pyx_ptype_6PyCafe_bschannel = &__pyx_type_6PyCafe_bschannel; + if (PyType_Ready(&__pyx_type_6PyCafe_BSData) < 0) __PYX_ERR(2, 1394, __pyx_L1_error) + __pyx_type_6PyCafe_BSData.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_BSData.tp_dictoffset && __pyx_type_6PyCafe_BSData.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_BSData.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BSData, (PyObject *)&__pyx_type_6PyCafe_BSData) < 0) __PYX_ERR(2, 1394, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_BSData) < 0) __PYX_ERR(2, 1394, __pyx_L1_error) + __pyx_ptype_6PyCafe_BSData = &__pyx_type_6PyCafe_BSData; + if (PyType_Ready(&__pyx_type_6PyCafe_SFDBPMData) < 0) __PYX_ERR(2, 1692, __pyx_L1_error) + __pyx_type_6PyCafe_SFDBPMData.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_SFDBPMData.tp_dictoffset && __pyx_type_6PyCafe_SFDBPMData.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_SFDBPMData.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SFDBPMData, (PyObject *)&__pyx_type_6PyCafe_SFDBPMData) < 0) __PYX_ERR(2, 1692, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_SFDBPMData) < 0) __PYX_ERR(2, 1692, __pyx_L1_error) + __pyx_ptype_6PyCafe_SFDBPMData = &__pyx_type_6PyCafe_SFDBPMData; + __pyx_vtabptr_6PyCafe_CyCafe = &__pyx_vtable_6PyCafe_CyCafe; + __pyx_vtable_6PyCafe_CyCafe.prepareCafeException = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *, int, PyObject *, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args))__pyx_f_6PyCafe_6CyCafe_prepareCafeException; + __pyx_vtable_6PyCafe_CyCafe.getMonitorWhenToFlushSendBuffer = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *))__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer; + __pyx_vtable_6PyCafe_CyCafe.checkForHandle = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandle *__pyx_optional_args))__pyx_f_6PyCafe_6CyCafe_checkForHandle; + __pyx_vtable_6PyCafe_CyCafe.checkForHandleList = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList *__pyx_optional_args))__pyx_f_6PyCafe_6CyCafe_checkForHandleList; + __pyx_vtable_6PyCafe_CyCafe.checkForGroupHandle = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle *__pyx_optional_args))__pyx_f_6PyCafe_6CyCafe_checkForGroupHandle; + if (PyType_Ready(&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(3, 151, __pyx_L1_error) + __pyx_type_6PyCafe_CyCafe.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CyCafe.tp_dictoffset && __pyx_type_6PyCafe_CyCafe.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CyCafe.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_CyCafe.tp_dict, __pyx_vtabptr_6PyCafe_CyCafe) < 0) __PYX_ERR(3, 151, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyCafe, (PyObject *)&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(3, 151, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(3, 151, __pyx_L1_error) + __pyx_ptype_6PyCafe_CyCafe = &__pyx_type_6PyCafe_CyCafe; + if (PyType_Ready(&__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv) < 0) __PYX_ERR(3, 66, __pyx_L1_error) + __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_dictoffset && __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv = &__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv; + __pyx_vtabptr_array = &__pyx_vtable_array; + __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; + if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + __pyx_type___pyx_array.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + __pyx_array_type = &__pyx_type___pyx_array; + if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error) + __pyx_type___pyx_MemviewEnum.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error) + __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; + __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; + __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; + __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; + __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; + __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; + __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; + __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; + __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; + if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + __pyx_type___pyx_memoryview.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + __pyx_memoryview_type = &__pyx_type___pyx_memoryview; + __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; + __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; + __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; + __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; + __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type; + if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + __pyx_type___pyx_memoryviewslice.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(8, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(4, 206, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(4, 229, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(4, 233, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(4, 242, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(4, 918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_5array_array = __Pyx_ImportType(__pyx_t_1, "array", "array", sizeof(arrayobject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(5, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION < 3 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initPyCafe(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initPyCafe(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyCafe(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + static PyThread_type_lock __pyx_t_5[8]; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'PyCafe' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(3, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("PyCafe", __pyx_methods, __pyx_k_Cython_interface_to_the_C_CAFE_l, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(3, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(3, 1, __pyx_L1_error) + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(3, 1, __pyx_L1_error) + #if CYTHON_COMPILING_IN_PYPY + Py_INCREF(__pyx_b); + #endif + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(3, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_PyCafe) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_4, __pyx_n_s_main) < 0) __PYX_ERR(3, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(3, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "PyCafe")) { + if (unlikely(PyDict_SetItemString(modules, "PyCafe", __pyx_m) < 0)) __PYX_ERR(3, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(3, 1, __pyx_L1_error) + #endif + + /* "PyCafe.pyx":14 + * """ + * + * import array # <<<<<<<<<<<<<< + * import ctypes + * import cython + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(3, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":15 + * + * import array + * import ctypes # <<<<<<<<<<<<<< + * import cython + * import inspect + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(3, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":17 + * import ctypes + * import cython + * import inspect # <<<<<<<<<<<<<< + * import numbers + * import numpy as np + */ + __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) __PYX_ERR(3, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":18 + * import cython + * import inspect + * import numbers # <<<<<<<<<<<<<< + * import numpy as np + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(3, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":19 + * import inspect + * import numbers + * import numpy as np # <<<<<<<<<<<<<< + * + * import os + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(3, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":21 + * import numpy as np + * + * import os # <<<<<<<<<<<<<< + * import sys + * import time + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(3, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":22 + * + * import os + * import sys # <<<<<<<<<<<<<< + * import time + * import timeit + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(3, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":23 + * import os + * import sys + * import time # <<<<<<<<<<<<<< + * import timeit + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(3, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":24 + * import sys + * import time + * import timeit # <<<<<<<<<<<<<< + * + * import Cython.Compiler.Options + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_timeit, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_timeit, __pyx_t_1) < 0) __PYX_ERR(3, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":26 + * import timeit + * + * import Cython.Compiler.Options # <<<<<<<<<<<<<< + * + * from collections import OrderedDict + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_Cython_Compiler_Options, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cython, __pyx_t_1) < 0) __PYX_ERR(3, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":28 + * import Cython.Compiler.Options + * + * from collections import OrderedDict # <<<<<<<<<<<<<< + * + * from copy import deepcopy + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_OrderedDict); + __Pyx_GIVEREF(__pyx_n_s_OrderedDict); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(3, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":30 + * from collections import OrderedDict + * + * from copy import deepcopy # <<<<<<<<<<<<<< + * from cython cimport view + * from cython.operator cimport dereference as deref + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_deepcopy); + __Pyx_GIVEREF(__pyx_n_s_deepcopy); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_deepcopy); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_deepcopy, __pyx_t_2) < 0) __PYX_ERR(3, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":44 + * #Cython.Compiler.Options.annotate = True + * + * _pymodule = "PyCafe.pyx" # os.path.basename(__file__) # <<<<<<<<<<<<<< + * _pymodule_parts = _pymodule.split(".") + * _appname = _pymodule_parts[0] + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pymodule, __pyx_kp_u_PyCafe_pyx) < 0) __PYX_ERR(3, 44, __pyx_L1_error) + + /* "PyCafe.pyx":45 + * + * _pymodule = "PyCafe.pyx" # os.path.basename(__file__) + * _pymodule_parts = _pymodule.split(".") # <<<<<<<<<<<<<< + * _appname = _pymodule_parts[0] + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pymodule); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pymodule_parts, __pyx_t_1) < 0) __PYX_ERR(3, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":46 + * _pymodule = "PyCafe.pyx" # os.path.basename(__file__) + * _pymodule_parts = _pymodule.split(".") + * _appname = _pymodule_parts[0] # <<<<<<<<<<<<<< + * + * _python_version = sys.version_info #[0:4] + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pymodule_parts); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_appname, __pyx_t_2) < 0) __PYX_ERR(3, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":48 + * _appname = _pymodule_parts[0] + * + * _python_version = sys.version_info #[0:4] # <<<<<<<<<<<<<< + * + * cdef object py_cb + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_python_version, __pyx_t_1) < 0) __PYX_ERR(3, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":52 + * cdef object py_cb + * + * cdef dict openCallbackDictGlobal = {} # <<<<<<<<<<<<<< + * cdef dict hmd = {} + * cdef dict handleMonDictGlobal = {} + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_openCallbackDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_openCallbackDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":53 + * + * cdef dict openCallbackDictGlobal = {} + * cdef dict hmd = {} # <<<<<<<<<<<<<< + * cdef dict handleMonDictGlobal = {} + * cdef dict monDictGlobal = {} + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_hmd); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_hmd, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":54 + * cdef dict openCallbackDictGlobal = {} + * cdef dict hmd = {} + * cdef dict handleMonDictGlobal = {} # <<<<<<<<<<<<<< + * cdef dict monDictGlobal = {} + * cdef dict openDictGlobal = {} + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_handleMonDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_handleMonDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":55 + * cdef dict hmd = {} + * cdef dict handleMonDictGlobal = {} + * cdef dict monDictGlobal = {} # <<<<<<<<<<<<<< + * cdef dict openDictGlobal = {} + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_monDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_monDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":56 + * cdef dict handleMonDictGlobal = {} + * cdef dict monDictGlobal = {} + * cdef dict openDictGlobal = {} # <<<<<<<<<<<<<< + * + * cdef dict getDictGlobal = {} + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_openDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_openDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":58 + * cdef dict openDictGlobal = {} + * + * cdef dict getDictGlobal = {} # <<<<<<<<<<<<<< + * cdef dict putDictGlobal = {} + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_getDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_getDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":59 + * + * cdef dict getDictGlobal = {} + * cdef dict putDictGlobal = {} # <<<<<<<<<<<<<< + * + * #cdef ccafe.CAFE * _c_cafe + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_putDictGlobal); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_putDictGlobal, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":3 + * + * # define threshold + * cdef int PYCAFE_PRINT_HIGH = 9 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH = 9; + + /* "PyCafeDefs.pxi":4 + * # define threshold + * cdef int PYCAFE_PRINT_HIGH = 9 + * cdef int PYCAFE_PRINT_MED = 5 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_LOW = 1 + * cdef int PYCAFE_PRINT_NONE = 0 + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_MED = 5; + + /* "PyCafeDefs.pxi":5 + * cdef int PYCAFE_PRINT_HIGH = 9 + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_NONE = 0 + * + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LOW = 1; + + /* "PyCafeDefs.pxi":6 + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 + * cdef int PYCAFE_PRINT_NONE = 0 # <<<<<<<<<<<<<< + * + * cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_NONE = 0; + + /* "PyCafeDefs.pxi":8 + * cdef int PYCAFE_PRINT_NONE = 0 + * + * cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL = __pyx_v_6PyCafe_PYCAFE_PRINT_NONE; + + /* "PyCafeDefs_pub.pxi":2 + * + * cdef object py_cb_handle = None # <<<<<<<<<<<<<< + * cdef object py_cb_handle_open = None + * + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafeDefs_pub.pxi":3 + * + * cdef object py_cb_handle = None + * cdef object py_cb_handle_open = None # <<<<<<<<<<<<<< + * + * cdef object cbobjt = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle_open); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle_open, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafeDefs_pub.pxi":5 + * cdef object py_cb_handle_open = None + * + * cdef object cbobjt = None # <<<<<<<<<<<<<< + * + * # ***********public or api*************** + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_cbobjt); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_cbobjt, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafe.pyx":66 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6PyCafe_1verify_handlepv, NULL, __pyx_n_s_PyCafe); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_verify_handlepv, __pyx_t_1) < 0) __PYX_ERR(3, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":249 + * + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":250 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setPyConnectCallbackFn); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setPyConnectCallbackFn, __pyx_t_1) < 0) __PYX_ERR(3, 250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1415 + * ############################################################################ + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1416 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_isConnected); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_isConnected, __pyx_t_1) < 0) __PYX_ERR(3, 1416, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1439 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def supplementHandle(self, handlePV): + * #decorator casts to handlePV to int + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1440 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts to handlePV to int + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_supplementHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_supplementHandle, __pyx_t_1) < 0) __PYX_ERR(3, 1440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1482 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def printHandle(self, handlePV): + * self._c_cafe.printHandle(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1483 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_printHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_printHandle, __pyx_t_1) < 0) __PYX_ERR(3, 1483, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1558 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getStatus(self, handlePV): + * return self.hh.getStatus(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1559 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getStatus, __pyx_t_1) < 0) __PYX_ERR(3, 1559, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1612 + * ############################################################################ + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1613 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getDescription); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getDescription, __pyx_t_1) < 0) __PYX_ERR(3, 1613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1623 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def hasDescription(self, handlePV): + * return self.hh.hasDescription(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1624 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_hasDescription); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_hasDescription, __pyx_t_1) < 0) __PYX_ERR(3, 1624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1628 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getUnits(self, handlePV): + * cdef string valString + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1629 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getUnits); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getUnits, __pyx_t_1) < 0) __PYX_ERR(3, 1629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1635 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getPrecision(self, handlePV): + * cdef short precision = 0 + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1636 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getPrecision); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getPrecision, __pyx_t_1) < 0) __PYX_ERR(3, 1636, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1642 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def hasAlarmStatusSeverity(self, handlePV): + * return self.hh.hasAlarmStatusSeverity(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_hasAlarmStatusSeverity); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_hasAlarmStatusSeverity, __pyx_t_1) < 0) __PYX_ERR(3, 1643, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1647 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getAlarmStatusSeverity(self, handlePV): + * cdef short aStatSev[2] + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1648 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getAlarmStatusSeverity); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getAlarmStatusSeverity, __pyx_t_1) < 0) __PYX_ERR(3, 1648, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1654 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getTimeStamp(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getTimeStamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getTimeStamp, __pyx_t_1) < 0) __PYX_ERR(3, 1655, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1667 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getTimeStampAsDate(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1668 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getTimeStampAsDate); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getTimeStampAsDate, __pyx_t_1) < 0) __PYX_ERR(3, 1668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1828 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getChannelInfo(self, handlePV): + * cdef str _METHOD = "getChannelInfo(handlePV)" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1829 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getChannelInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getChannelInfo, __pyx_t_1) < 0) __PYX_ERR(3, 1829, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1852 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def getWFAsString(self, handlePV, cache: bool = False): + * cdef str _METHOD = "getWFAsString" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1853 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getWFAsString, __pyx_t_1) < 0) __PYX_ERR(3, 1853, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1913 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def isEnum(self, handlePV): + * return self._c_cafe.isEnum(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1914 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_isEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_isEnum, __pyx_t_1) < 0) __PYX_ERR(3, 1914, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1919 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getEnumStrings(self, handlePV): + * return self.hh.getEnumStrings(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1920 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getEnumStrings); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getEnumStrings, __pyx_t_1) < 0) __PYX_ERR(3, 1920, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1924 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD = "getEnumFromString" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1925 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getEnumFromString); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getEnumFromString, __pyx_t_1) < 0) __PYX_ERR(3, 1925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1938 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1939 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getStringFromEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getStringFromEnum, __pyx_t_1) < 0) __PYX_ERR(3, 1939, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1961 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1962 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setDbrBase); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setDbrBase, __pyx_t_1) < 0) __PYX_ERR(3, 1962, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1976 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getDbrBase(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1977 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getDbrBase); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getDbrBase, __pyx_t_1) < 0) __PYX_ERR(3, 1977, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1987 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setGetCacheWaitPolicy( + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1988 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setGetCacheWaitPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1988, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setGetCacheWaitPolicy, __pyx_t_1) < 0) __PYX_ERR(3, 1988, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2038 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setGetActionWhenMonitorPolicy( + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2039 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setGetActionWhenMonitorPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setGetActionWhenMonitorPolicy, __pyx_t_1) < 0) __PYX_ERR(3, 2039, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2080 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getNonBlocking(self, handlePV): + * '''Requires cafe.ca_flush_io by user. + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2081 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getNonBlocking); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getNonBlocking, __pyx_t_1) < 0) __PYX_ERR(3, 2081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2129 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def get(self, handlePV = 0, str dt='native'): + * cdef str _METHOD = "get(handlePV, dt)" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2130 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(3, 2130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2259 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2260 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getList); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getList, __pyx_t_1) < 0) __PYX_ERR(3, 2260, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2513 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getArray(self, handlePV, str dt='native', str art='numpy'): + * ############################################################################ + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2514 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getArray, __pyx_t_1) < 0) __PYX_ERR(3, 2514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":3419 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def waitForGetEvent(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":3420 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_waitForGetEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_waitForGetEvent, __pyx_t_1) < 0) __PYX_ERR(3, 3420, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":5165 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__99 = DBR_TIME; + + /* "PyCafe.pyx":5166 + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * return self.groupMonitorStart(ghandleName, cb, dbr, mask, notify_milliseconds) + */ + __pyx_k__100 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":5172 + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, + * DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__101 = DBR_TIME; + + /* "PyCafe.pyx":5173 + * def groupMonitorStart(self, ghandleName, object cb=None, + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * ################################################################################## + */ + __pyx_k__102 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":5276 + * def groupMonitorStartWithCBList(self, + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=\ + * DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + __pyx_k__107 = DBR_TIME; + + /* "PyCafe.pyx":5278 + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=\ + * DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * ############################################################################ + */ + __pyx_k__108 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":6049 + * ############################################################################ + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__123 = DBR_TIME; + + /* "PyCafe.pyx":6050 + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * + */ + __pyx_k__124 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":6057 + * ############################################################################ + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__125 = DBR_TIME; + + /* "PyCafe.pyx":6058 + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * + */ + __pyx_k__126 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6PyCafe_3__pyx_unpickle_CafeException, NULL, __pyx_n_s_PyCafe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CafeException, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1 + * # dtutils: language = c++ # <<<<<<<<<<<<<< + * # file: PyCafe.pyx + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(3, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":209 + * info.obj = self + * + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * def __dealloc__(array self): + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_array_type); + + /* "View.MemoryView":286 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(generic); + __Pyx_DECREF_SET(generic, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":287 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(strided); + __Pyx_DECREF_SET(strided, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":288 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(indirect); + __Pyx_DECREF_SET(indirect, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":291 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(contiguous); + __Pyx_DECREF_SET(contiguous, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":292 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(indirect_contiguous); + __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":316 + * + * DEF THREAD_LOCKS_PREALLOCATED = 8 + * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< + * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ + * PyThread_allocate_lock(), + */ + __pyx_memoryview_thread_locks_used = 0; + + /* "View.MemoryView":317 + * DEF THREAD_LOCKS_PREALLOCATED = 8 + * cdef int __pyx_memoryview_thread_locks_used = 0 + * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< + * PyThread_allocate_lock(), + * PyThread_allocate_lock(), + */ + __pyx_t_5[0] = PyThread_allocate_lock(); + __pyx_t_5[1] = PyThread_allocate_lock(); + __pyx_t_5[2] = PyThread_allocate_lock(); + __pyx_t_5[3] = PyThread_allocate_lock(); + __pyx_t_5[4] = PyThread_allocate_lock(); + __pyx_t_5[5] = PyThread_allocate_lock(); + __pyx_t_5[6] = PyThread_allocate_lock(); + __pyx_t_5[7] = PyThread_allocate_lock(); + memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_5, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); + + /* "View.MemoryView":545 + * info.obj = self + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 545, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryview_type); + + /* "View.MemoryView":991 + * return self.from_object + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 991, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryviewslice_type); + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init PyCafe", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init PyCafe"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* WriteUnraisableException */ +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* UnpackUnboundCMethod */ +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + +/* CallUnboundCMethod0 */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *args, *result = NULL; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_ASSUME_SAFE_MACROS + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); +#else + args = PyTuple_Pack(1, self); + if (unlikely(!args)) goto bad; +#endif + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + Py_DECREF(args); +bad: + return result; +} + +/* py_dict_keys */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d); + else + return PyDict_Keys(d); +} + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = Py_TYPE(iter)->tp_iternext; + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(s))) { + PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); + Py_DECREF(s); + return result; + } + #endif + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* CIntToDigits */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; +#if CYTHON_PEP393_ENABLED + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); +#else + Py_UNICODE *udata; + uval = PyUnicode_FromUnicode(NULL, ulength); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_AS_UNICODE(uval); +#endif + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + uval = NULL; + PyObject *sign = NULL, *padding = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp; + PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign); + if (unlikely(!repeat)) goto done_or_error; + tmp = PyNumber_Multiply(padding, repeat); + Py_DECREF(repeat); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyNumber_Add(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyNumber_Add(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* CIntToPyUnicode */ +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned short uint16_t; + #else + typedef unsigned __int16 uint16_t; + #endif + #endif +#else + #include +#endif +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(int)*3+2]; + char *dpos, *end = digits + sizeof(int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + int remaining; + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (int) (remaining / (8*8)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (int) (remaining / (10*10)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + if (last_one_off) { + assert(*dpos == '0'); + dpos++; + } + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + CYTHON_UNUSED Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind; + Py_ssize_t i, char_pos; + void *result_udata; +#if CYTHON_PEP393_ENABLED + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + result_udata = PyUnicode_DATA(result_uval); +#else + result_uval = PyUnicode_FromUnicode(NULL, result_ulength); + if (unlikely(!result_uval)) return NULL; + result_ukind = sizeof(Py_UNICODE); + result_udata = PyUnicode_AS_UNICODE(result_uval); +#endif + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); + if (unlikely(__Pyx_PyUnicode_READY(uval))) + goto bad; + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + if (unlikely(!ulength)) + continue; + if (unlikely(char_pos + ulength < 0)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { + memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); + } else { + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + result_ulength++; + value_count++; + return PyUnicode_Join(__pyx_empty_unicode, value_tuple); +#endif +} + +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* GetAttr3 */ +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r = __Pyx_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +} + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* PyObjectFormat */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { + int ret; + _PyUnicodeWriter writer; + if (likely(PyFloat_CheckExact(obj))) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyFloat_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else if (likely(PyLong_CheckExact(obj))) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyLong_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else { + return PyObject_Format(obj, format_spec); + } + if (unlikely(ret == -1)) { + _PyUnicodeWriter_Dealloc(&writer); + return NULL; + } + return _PyUnicodeWriter_Finish(&writer); +} +#endif + +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* SetItemInt */ +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (!j) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old = PyList_GET_ITEM(o, n); + Py_INCREF(v); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 1; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return m->sq_ass_item(o, i, v); + } + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) +#else + if (is_list || PySequence_Check(o)) +#endif + { + return PySequence_SetItem(o, i, v); + } +#endif + return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); +} + +/* CallUnboundCMethod1 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + if (likely(cfunc->func)) { + int flag = cfunc->flag; + if (flag == METH_O) { + return (*(cfunc->func))(self, arg); + } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { + if (PY_VERSION_HEX >= 0x030700A0) { + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); + } else { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } + return __Pyx__CallUnboundCMethod1(cfunc, self, arg); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(2, self, arg); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + if (likely(cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + #if PY_VERSION_HEX >= 0x030700A0 + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); + #else + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + #if PY_VERSION_HEX >= 0x030700A0 + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(3); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 1, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 2, arg2); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(3, self, arg1, arg2); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + +/* dict_getitem_default */ +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + if ((1)); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); + else + value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); + } + return value; +} + +/* CIntToPyUnicode */ +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned short uint16_t; + #else + typedef unsigned __int16 uint16_t; + #endif + #endif +#else + #include +#endif +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(long)*3+2]; + char *dpos, *end = digits + sizeof(long)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + long remaining; + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (long) (remaining / (8*8)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (long) (remaining / (10*10)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (long) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + if (last_one_off) { + assert(*dpos == '0'); + dpos++; + } + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* CIntToPyUnicode */ +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned short uint16_t; + #else + typedef unsigned __int16 uint16_t; + #endif + #endif +#else + #include +#endif +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_unsigned_int(unsigned int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(unsigned int)*3+2]; + char *dpos, *end = digits + sizeof(unsigned int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + unsigned int remaining; + const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (unsigned int) (remaining / (8*8)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (unsigned int) (remaining / (10*10)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (unsigned int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + if (last_one_off) { + assert(*dpos == '0'); + dpos++; + } + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* SliceTupleAndList */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + *_length = stop - start; + *_start = start; + *_stop = stop; +} +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyList_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyList_New(0); + dest = PyList_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyListObject*)src)->ob_item + start, + ((PyListObject*)dest)->ob_item, + length); + return dest; +} +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyTuple_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyTuple_New(0); + dest = PyTuple_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyTupleObject*)src)->ob_item + start, + ((PyTupleObject*)dest)->ob_item, + length); + return dest; +} +#endif + +/* FetchCommonType */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CythonFunction */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromString(m->func.m_ml->ml_name); +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); + if (op == NULL) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + PyObject_GC_Track(op); + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a + b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* decode_c_bytes */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* BufferIndexError */ +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* MemviewSliceInit */ +static int +__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference) +{ + __Pyx_RefNannyDeclarations + int i, retval=-1; + Py_buffer *buf = &memview->view; + __Pyx_RefNannySetupContext("init_memviewslice", 0); + if (!buf) { + PyErr_SetString(PyExc_ValueError, + "buf is NULL."); + goto fail; + } else if (memviewslice->memview || memviewslice->data) { + PyErr_SetString(PyExc_ValueError, + "memviewslice is already initialized!"); + goto fail; + } + if (buf->strides) { + for (i = 0; i < ndim; i++) { + memviewslice->strides[i] = buf->strides[i]; + } + } else { + Py_ssize_t stride = buf->itemsize; + for (i = ndim - 1; i >= 0; i--) { + memviewslice->strides[i] = stride; + stride *= buf->shape[i]; + } + } + for (i = 0; i < ndim; i++) { + memviewslice->shape[i] = buf->shape[i]; + if (buf->suboffsets) { + memviewslice->suboffsets[i] = buf->suboffsets[i]; + } else { + memviewslice->suboffsets[i] = -1; + } + } + memviewslice->memview = memview; + memviewslice->data = (char *)buf->buf; + if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { + Py_INCREF(memview); + } + retval = 0; + goto no_fail; +fail: + memviewslice->memview = 0; + memviewslice->data = 0; + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} +#ifndef Py_NO_RETURN +#define Py_NO_RETURN +#endif +static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { + va_list vargs; + char msg[200]; +#ifdef HAVE_STDARG_PROTOTYPES + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + va_end(vargs); + Py_FatalError(msg); +} +static CYTHON_INLINE int +__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)++; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE int +__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)--; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE void +__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) +{ + int first_time; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (!memview || (PyObject *) memview == Py_None) + return; + if (__pyx_get_slice_count(memview) < 0) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + first_time = __pyx_add_acquisition_count(memview) == 0; + if (first_time) { + if (have_gil) { + Py_INCREF((PyObject *) memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_INCREF((PyObject *) memview); + PyGILState_Release(_gilstate); + } + } +} +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice, + int have_gil, int lineno) { + int last_time; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (!memview ) { + return; + } else if ((PyObject *) memview == Py_None) { + memslice->memview = NULL; + return; + } + if (__pyx_get_slice_count(memview) <= 0) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + last_time = __pyx_sub_acquisition_count(memview) == 1; + memslice->data = NULL; + if (last_time) { + if (have_gil) { + Py_CLEAR(memslice->memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_CLEAR(memslice->memview); + PyGILState_Release(_gilstate); + } + } else { + memslice->memview = NULL; + } +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a - b); + if (likely((x^a) >= 0 || (x^~b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + } + x = a - b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla - llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("subtract", return NULL) + result = ((double)a) - (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#endif + +/* py_dict_values */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d); + else + return PyDict_Values(d); +} + +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_FALSE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_TRUE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_TRUE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_NE)); +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/* None */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + Py_ssize_t q = a / b; + Py_ssize_t r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return q; +} + +/* decode_c_string */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_4); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; +#else + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; +#endif +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto GOOD; +BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* SetVTable */ +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) + goto bad; + if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PatchModuleWithCoroutine */ +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { +#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + int result; + PyObject *globals, *result_obj; + globals = PyDict_New(); if (unlikely(!globals)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_coroutine_type", + #ifdef __Pyx_Coroutine_USED + (PyObject*)__pyx_CoroutineType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_generator_type", + #ifdef __Pyx_Generator_USED + (PyObject*)__pyx_GeneratorType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; + result_obj = PyRun_String(py_code, Py_file_input, globals, globals); + if (unlikely(!result_obj)) goto ignore; + Py_DECREF(result_obj); + Py_DECREF(globals); + return module; +ignore: + Py_XDECREF(globals); + PyErr_WriteUnraisable(module); + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { + Py_DECREF(module); + module = NULL; + } +#else + py_code++; +#endif + return module; +} + +/* PatchInspect */ +static PyObject* __Pyx_patch_inspect(PyObject* module) { +#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) + static int inspect_patched = 0; + if (unlikely((!inspect_patched) && module)) { + module = __Pyx_Coroutine_patch_module( + module, "" +"old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n" +"if old_types is None or not isinstance(old_types, set):\n" +" old_types = set()\n" +" def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n" +" def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n" +" cy_isgenerator._cython_generator_types = cython_generator_types\n" +" return cy_isgenerator\n" +" _module.isgenerator = cy_wrap(_module.isgenerator)\n" +"old_types.add(_cython_generator_type)\n" + ); + inspect_patched = 1; + } +#else + if ((0)) return __Pyx_Coroutine_patch_module(module, NULL); +#endif + return module; +} + +/* GetNameInClass */ +static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + result = __Pyx_PyObject_GetAttrStr(nmspace, name); + if (!result) { + result = __Pyx_GetGlobalNameAfterAttributeLookup(name); + } + return result; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)) return __pyx_pw_7cpython_5array_5array_1__getbuffer__(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); + else if (__Pyx_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)) __pyx_pw_7cpython_5array_5array_3__releasebuffer__(obj, view); + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + +/* MemviewSliceIsContig */ +static int +__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) +{ + int i, index, step, start; + Py_ssize_t itemsize = mvs.memview->view.itemsize; + if (order == 'F') { + step = 1; + start = 0; + } else { + step = -1; + start = ndim - 1; + } + for (i = 0; i < ndim; i++) { + index = start + step * i; + if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) + return 0; + itemsize *= mvs.shape[index]; + } + return 1; +} + +/* OverlappingSlices */ +static void +__pyx_get_array_memory_extents(__Pyx_memviewslice *slice, + void **out_start, void **out_end, + int ndim, size_t itemsize) +{ + char *start, *end; + int i; + start = end = slice->data; + for (i = 0; i < ndim; i++) { + Py_ssize_t stride = slice->strides[i]; + Py_ssize_t extent = slice->shape[i]; + if (extent == 0) { + *out_start = *out_end = start; + return; + } else { + if (stride > 0) + end += stride * (extent - 1); + else + start += stride * (extent - 1); + } + } + *out_start = start; + *out_end = end + itemsize; +} +static int +__pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize) +{ + void *start1, *end1, *start2, *end2; + __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); + __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); + return (start1 < end2) && (start2 < end1); +} + +/* Capsule */ +static CYTHON_INLINE PyObject * +__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig) +{ + PyObject *cobj; +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(p, sig, NULL); +#else + cobj = PyCObject_FromVoidPtr(p, NULL); +#endif + return cobj; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { + const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { + const short neg_one = (short) ((short) 0 - (short) 1), const_zero = (short) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(short) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(short) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(short) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(short), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) { + const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned short) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned short) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned short) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned short), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value) { + const chtype neg_one = (chtype) ((chtype) 0 - (chtype) 1), const_zero = (chtype) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(chtype) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(chtype) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(chtype) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(chtype) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(chtype) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(chtype), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value) { + const DBR_TYPE neg_one = (DBR_TYPE) ((DBR_TYPE) 0 - (DBR_TYPE) 1), const_zero = (DBR_TYPE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(DBR_TYPE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(DBR_TYPE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(DBR_TYPE), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) ((unsigned PY_LONG_LONG) 0 - (unsigned PY_LONG_LONG) 1), const_zero = (unsigned PY_LONG_LONG) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned PY_LONG_LONG), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(ChannelWhenToFlushSendBufferPolicyKind value) { + const ChannelWhenToFlushSendBufferPolicyKind neg_one = (ChannelWhenToFlushSendBufferPolicyKind) ((ChannelWhenToFlushSendBufferPolicyKind) 0 - (ChannelWhenToFlushSendBufferPolicyKind) 1), const_zero = (ChannelWhenToFlushSendBufferPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelWhenToFlushSendBufferPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value) { + const ChannelGetCacheWaitPolicyKind neg_one = (ChannelGetCacheWaitPolicyKind) ((ChannelGetCacheWaitPolicyKind) 0 - (ChannelGetCacheWaitPolicyKind) 1), const_zero = (ChannelGetCacheWaitPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelGetCacheWaitPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetCacheWaitPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (ChannelGetActionWhenMonitorPolicyKind) ((ChannelGetActionWhenMonitorPolicyKind) 0 - (ChannelGetActionWhenMonitorPolicyKind) 1), const_zero = (ChannelGetActionWhenMonitorPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetActionWhenMonitorPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value) { + const CAFE_CFT_STATE neg_one = (CAFE_CFT_STATE) ((CAFE_CFT_STATE) 0 - (CAFE_CFT_STATE) 1), const_zero = (CAFE_CFT_STATE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CAFE_CFT_STATE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CAFE_CFT_STATE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(CAFE_CFT_STATE), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value) { + const dbr_long_t neg_one = (dbr_long_t) ((dbr_long_t) 0 - (dbr_long_t) 1), const_zero = (dbr_long_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_long_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_long_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_long_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_long_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_char_t(dbr_char_t value) { + const dbr_char_t neg_one = (dbr_char_t) ((dbr_char_t) 0 - (dbr_char_t) 1), const_zero = (dbr_char_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_char_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_char_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_char_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_char_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_enum_t(dbr_enum_t value) { + const dbr_enum_t neg_one = (dbr_enum_t) ((dbr_enum_t) 0 - (dbr_enum_t) 1), const_zero = (dbr_enum_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_enum_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_enum_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_enum_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_enum_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_enum_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_enum_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value) { + const npy_int16 neg_one = (npy_int16) ((npy_int16) 0 - (npy_int16) 1), const_zero = (npy_int16) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int16) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int16) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int16) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int16), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int16_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int16(*(__pyx_t_5numpy_int16_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int16_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int16_t value = __Pyx_PyInt_As_npy_int16(obj); + if ((value == ((npy_int16)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int16_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int8(npy_int8 value) { + const npy_int8 neg_one = (npy_int8) ((npy_int8) 0 - (npy_int8) 1), const_zero = (npy_int8) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int8) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int8) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int8) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int8), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int8_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int8(*(__pyx_t_5numpy_int8_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int8_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int8_t value = __Pyx_PyInt_As_npy_int8(obj); + if ((value == ((npy_int8)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int8_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value) { + const npy_uint8 neg_one = (npy_uint8) ((npy_uint8) 0 - (npy_uint8) 1), const_zero = (npy_uint8) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_uint8) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_uint8) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_uint8) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_uint8), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint8_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_uint8(*(__pyx_t_5numpy_uint8_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint8_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_uint8_t value = __Pyx_PyInt_As_npy_uint8(obj); + if ((value == ((npy_uint8)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_uint8_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { + const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int32) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int32) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int32) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int32), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int32_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int32(*(__pyx_t_5numpy_int32_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int32_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int32_t value = __Pyx_PyInt_As_npy_int32(obj); + if ((value == ((npy_int32)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int32_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value) { + const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_uint32) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_uint32) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_uint32) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_uint32), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint32_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_uint32(*(__pyx_t_5numpy_uint32_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint32_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_uint32_t value = __Pyx_PyInt_As_npy_uint32(obj); + if ((value == ((npy_uint32)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_uint32_t *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) { + int value = __Pyx_PyInt_As_int(obj); + if ((value == (int)-1) && PyErr_Occurred()) + return 0; + *(int *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(float *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj) { + float value = __pyx_PyFloat_AsFloat(obj); + if ((value == (float)-1) && PyErr_Occurred()) + return 0; + *(float *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(double *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) { + double value = __pyx_PyFloat_AsDouble(obj); + if ((value == (double)-1) && PyErr_Occurred()) + return 0; + *(double *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) { + const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned char) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned char) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned char), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_ERROR_STATE(CAFE_ERROR_STATE value) { + const CAFE_ERROR_STATE neg_one = (CAFE_ERROR_STATE) ((CAFE_ERROR_STATE) 0 - (CAFE_ERROR_STATE) 1), const_zero = (CAFE_ERROR_STATE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CAFE_ERROR_STATE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CAFE_ERROR_STATE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(CAFE_ERROR_STATE), + little, !is_unsigned); + } +} + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = 1.0 / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = 1.0 / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0, -1); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = 1.0 / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = 1.0 / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0, -1); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum NPY_TYPES) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum NPY_TYPES) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), + little, !is_unsigned); + } +} + +/* MemviewSliceCopyTemplate */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object) +{ + __Pyx_RefNannyDeclarations + int i; + __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_memoryview_obj *from_memview = from_mvs->memview; + Py_buffer *buf = &from_memview->view; + PyObject *shape_tuple = NULL; + PyObject *temp_int = NULL; + struct __pyx_array_obj *array_obj = NULL; + struct __pyx_memoryview_obj *memview_obj = NULL; + __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); + for (i = 0; i < ndim; i++) { + if (from_mvs->suboffsets[i] >= 0) { + PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " + "indirect dimensions (axis %d)", i); + goto fail; + } + } + shape_tuple = PyTuple_New(ndim); + if (unlikely(!shape_tuple)) { + goto fail; + } + __Pyx_GOTREF(shape_tuple); + for(i = 0; i < ndim; i++) { + temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); + if(unlikely(!temp_int)) { + goto fail; + } else { + PyTuple_SET_ITEM(shape_tuple, i, temp_int); + temp_int = NULL; + } + } + array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); + if (unlikely(!array_obj)) { + goto fail; + } + __Pyx_GOTREF(array_obj); + memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + (PyObject *) array_obj, contig_flag, + dtype_is_object, + from_mvs->memview->typeinfo); + if (unlikely(!memview_obj)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) + goto fail; + if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, + dtype_is_object) < 0)) + goto fail; + goto no_fail; +fail: + __Pyx_XDECREF(new_mvs.memview); + new_mvs.memview = NULL; + new_mvs.data = NULL; +no_fail: + __Pyx_XDECREF(shape_tuple); + __Pyx_XDECREF(temp_int); + __Pyx_XDECREF(array_obj); + __Pyx_RefNannyFinishContext(); + return new_mvs; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned int) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned int) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned int) -1; + } + } else { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyInt_As_unsigned_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned int"); + return (unsigned int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *x) { + const ChannelWhenToFlushSendBufferPolicyKind neg_one = (ChannelWhenToFlushSendBufferPolicyKind) ((ChannelWhenToFlushSendBufferPolicyKind) 0 - (ChannelWhenToFlushSendBufferPolicyKind) 1), const_zero = (ChannelWhenToFlushSendBufferPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelWhenToFlushSendBufferPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWhenToFlushSendBufferPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelWhenToFlushSendBufferPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWhenToFlushSendBufferPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelWhenToFlushSendBufferPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelWhenToFlushSendBufferPolicyKind) -1; + } + } else { + ChannelWhenToFlushSendBufferPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelWhenToFlushSendBufferPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelWhenToFlushSendBufferPolicyKind"); + return (ChannelWhenToFlushSendBufferPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelWhenToFlushSendBufferPolicyKind"); + return (ChannelWhenToFlushSendBufferPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *x) { + const ChannelWaitForResponsePolicyKind neg_one = (ChannelWaitForResponsePolicyKind) ((ChannelWaitForResponsePolicyKind) 0 - (ChannelWaitForResponsePolicyKind) 1), const_zero = (ChannelWaitForResponsePolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelWaitForResponsePolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelWaitForResponsePolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWaitForResponsePolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelWaitForResponsePolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWaitForResponsePolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelWaitForResponsePolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelWaitForResponsePolicyKind) -1; + } + } else { + ChannelWaitForResponsePolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelWaitForResponsePolicyKind) -1; + val = __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelWaitForResponsePolicyKind"); + return (ChannelWaitForResponsePolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelWaitForResponsePolicyKind"); + return (ChannelWaitForResponsePolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *x) { + const ChannelRequestPolicyKind neg_one = (ChannelRequestPolicyKind) ((ChannelRequestPolicyKind) 0 - (ChannelRequestPolicyKind) 1), const_zero = (ChannelRequestPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelRequestPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelRequestPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelRequestPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelRequestPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelRequestPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelRequestPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelRequestPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelRequestPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelRequestPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelRequestPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelRequestPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelRequestPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelRequestPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelRequestPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelRequestPolicyKind) -1; + } + } else { + ChannelRequestPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelRequestPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelRequestPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelRequestPolicyKind"); + return (ChannelRequestPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelRequestPolicyKind"); + return (ChannelRequestPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) { + const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned short) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned short) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned short) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 2 * PyLong_SHIFT) { + return (unsigned short) (((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 3 * PyLong_SHIFT) { + return (unsigned short) (((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 4 * PyLong_SHIFT) { + return (unsigned short) (((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned short) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned short) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned short) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned short, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned short) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + return (unsigned short) ((((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + return (unsigned short) ((((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) { + return (unsigned short) ((((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned short) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned short val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned short) -1; + } + } else { + unsigned short val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned short) -1; + val = __Pyx_PyInt_As_unsigned_short(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned short"); + return (unsigned short) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned short"); + return (unsigned short) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *x) { + const DBR_TYPE neg_one = (DBR_TYPE) ((DBR_TYPE) 0 - (DBR_TYPE) 1), const_zero = (DBR_TYPE) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(DBR_TYPE) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (DBR_TYPE) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (DBR_TYPE) 0; + case 1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, digit, digits[0]) + case 2: + if (8 * sizeof(DBR_TYPE) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 2 * PyLong_SHIFT) { + return (DBR_TYPE) (((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(DBR_TYPE) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 3 * PyLong_SHIFT) { + return (DBR_TYPE) (((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(DBR_TYPE) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 4 * PyLong_SHIFT) { + return (DBR_TYPE) (((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (DBR_TYPE) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(DBR_TYPE) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (DBR_TYPE) 0; + case -1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, digit, +digits[0]) + case -2: + if (8 * sizeof(DBR_TYPE) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(DBR_TYPE) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(DBR_TYPE) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 4 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(DBR_TYPE) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 4 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + } +#endif + if (sizeof(DBR_TYPE) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + DBR_TYPE val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (DBR_TYPE) -1; + } + } else { + DBR_TYPE val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (DBR_TYPE) -1; + val = __Pyx_PyInt_As_DBR_TYPE(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to DBR_TYPE"); + return (DBR_TYPE) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to DBR_TYPE"); + return (DBR_TYPE) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *x) { + const ChannelGetCacheWaitPolicyKind neg_one = (ChannelGetCacheWaitPolicyKind) ((ChannelGetCacheWaitPolicyKind) 0 - (ChannelGetCacheWaitPolicyKind) 1), const_zero = (ChannelGetCacheWaitPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelGetCacheWaitPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelGetCacheWaitPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetCacheWaitPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelGetCacheWaitPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetCacheWaitPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelGetCacheWaitPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelGetCacheWaitPolicyKind) -1; + } + } else { + ChannelGetCacheWaitPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelGetCacheWaitPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelGetCacheWaitPolicyKind"); + return (ChannelGetCacheWaitPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelGetCacheWaitPolicyKind"); + return (ChannelGetCacheWaitPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *x) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (ChannelGetActionWhenMonitorPolicyKind) ((ChannelGetActionWhenMonitorPolicyKind) 0 - (ChannelGetActionWhenMonitorPolicyKind) 1), const_zero = (ChannelGetActionWhenMonitorPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelGetActionWhenMonitorPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetActionWhenMonitorPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelGetActionWhenMonitorPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetActionWhenMonitorPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelGetActionWhenMonitorPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelGetActionWhenMonitorPolicyKind) -1; + } + } else { + ChannelGetActionWhenMonitorPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelGetActionWhenMonitorPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelGetActionWhenMonitorPolicyKind"); + return (ChannelGetActionWhenMonitorPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelGetActionWhenMonitorPolicyKind"); + return (ChannelGetActionWhenMonitorPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) ((unsigned PY_LONG_LONG) 0 - (unsigned PY_LONG_LONG) 1), const_zero = (unsigned PY_LONG_LONG) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned PY_LONG_LONG) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned PY_LONG_LONG) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned PY_LONG_LONG) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned PY_LONG_LONG) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned PY_LONG_LONG val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned PY_LONG_LONG) -1; + } + } else { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned PY_LONG_LONG) -1; + val = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { + const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(size_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (size_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(size_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) + case -2: + if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(size_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + size_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (size_t) -1; + } + } else { + size_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyInt_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *x) { + const npy_int16 neg_one = (npy_int16) ((npy_int16) 0 - (npy_int16) 1), const_zero = (npy_int16) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int16) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int16) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int16) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int16, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int16) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 2 * PyLong_SHIFT) { + return (npy_int16) (((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int16) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 3 * PyLong_SHIFT) { + return (npy_int16) (((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int16) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 4 * PyLong_SHIFT) { + return (npy_int16) (((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int16) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int16) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int16) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int16, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int16, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int16) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int16) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + return (npy_int16) ((((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int16) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + return (npy_int16) ((((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 4 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int16) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 4 * PyLong_SHIFT) { + return (npy_int16) ((((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int16) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int16 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int16) -1; + } + } else { + npy_int16 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int16) -1; + val = __Pyx_PyInt_As_npy_int16(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int16"); + return (npy_int16) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int16"); + return (npy_int16) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *x) { + const npy_int8 neg_one = (npy_int8) ((npy_int8) 0 - (npy_int8) 1), const_zero = (npy_int8) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int8) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int8) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int8) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int8, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 2 * PyLong_SHIFT) { + return (npy_int8) (((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 3 * PyLong_SHIFT) { + return (npy_int8) (((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 4 * PyLong_SHIFT) { + return (npy_int8) (((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int8) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int8) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int8) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int8, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int8, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int8) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + return (npy_int8) ((((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + return (npy_int8) ((((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 4 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 4 * PyLong_SHIFT) { + return (npy_int8) ((((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int8) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int8 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int8) -1; + } + } else { + npy_int8 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int8) -1; + val = __Pyx_PyInt_As_npy_int8(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int8"); + return (npy_int8) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int8"); + return (npy_int8) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { + const npy_uint8 neg_one = (npy_uint8) ((npy_uint8) 0 - (npy_uint8) 1), const_zero = (npy_uint8) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_uint8) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_uint8) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint8) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, digits[0]) + case 2: + if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 2 * PyLong_SHIFT) { + return (npy_uint8) (((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 3 * PyLong_SHIFT) { + return (npy_uint8) (((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 4 * PyLong_SHIFT) { + return (npy_uint8) (((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_uint8) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_uint8) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint8) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_uint8, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_uint8) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint8) ((((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint8) ((((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint8) ((((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_uint8) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_uint8 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_uint8) -1; + } + } else { + npy_uint8 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_uint8) -1; + val = __Pyx_PyInt_As_npy_uint8(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_uint8"); + return (npy_uint8) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_uint8"); + return (npy_uint8) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { + const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int32) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int32) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int32) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) { + return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) { + return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) { + return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int32) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int32) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int32) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { + return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int32) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int32 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int32) -1; + } + } else { + npy_int32 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int32) -1; + val = __Pyx_PyInt_As_npy_int32(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int32"); + return (npy_int32) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int32"); + return (npy_int32) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) { + const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_uint32) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_uint32) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint32) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, digits[0]) + case 2: + if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT) { + return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT) { + return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT) { + return (npy_uint32) (((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_uint32) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_uint32) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint32) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_uint32, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint32) ((((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_uint32) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_uint32 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_uint32) -1; + } + } else { + npy_uint32 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_uint32) -1; + val = __Pyx_PyInt_As_npy_uint32(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_uint32"); + return (npy_uint32) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_uint32"); + return (npy_uint32) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *x) { + const dbr_long_t neg_one = (dbr_long_t) ((dbr_long_t) 0 - (dbr_long_t) 1), const_zero = (dbr_long_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(dbr_long_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (dbr_long_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_long_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(dbr_long_t, digit, digits[0]) + case 2: + if (8 * sizeof(dbr_long_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 2 * PyLong_SHIFT) { + return (dbr_long_t) (((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(dbr_long_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 3 * PyLong_SHIFT) { + return (dbr_long_t) (((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(dbr_long_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 4 * PyLong_SHIFT) { + return (dbr_long_t) (((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (dbr_long_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(dbr_long_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_long_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(dbr_long_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(dbr_long_t, digit, +digits[0]) + case -2: + if (8 * sizeof(dbr_long_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(dbr_long_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_long_t) ((((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(dbr_long_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_long_t) ((((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(dbr_long_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_long_t) ((((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(dbr_long_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + dbr_long_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (dbr_long_t) -1; + } + } else { + dbr_long_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (dbr_long_t) -1; + val = __Pyx_PyInt_As_dbr_long_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to dbr_long_t"); + return (dbr_long_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to dbr_long_t"); + return (dbr_long_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { + const short neg_one = (short) ((short) 0 - (short) 1), const_zero = (short) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(short) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (short) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (short) 0; + case 1: __PYX_VERIFY_RETURN_INT(short, digit, digits[0]) + case 2: + if (8 * sizeof(short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 2 * PyLong_SHIFT) { + return (short) (((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 3 * PyLong_SHIFT) { + return (short) (((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 4 * PyLong_SHIFT) { + return (short) (((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (short) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(short) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(short, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (short) 0; + case -1: __PYX_VERIFY_RETURN_INT(short, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(short, digit, +digits[0]) + case -2: + if (8 * sizeof(short) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + return (short) ((((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + return (short) ((((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) { + return (short) ((((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + } +#endif + if (sizeof(short) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(short, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + short val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (short) -1; + } + } else { + short val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (short) -1; + val = __Pyx_PyInt_As_short(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to short"); + return (short) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to short"); + return (short) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *x) { + const dbr_char_t neg_one = (dbr_char_t) ((dbr_char_t) 0 - (dbr_char_t) 1), const_zero = (dbr_char_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(dbr_char_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (dbr_char_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_char_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(dbr_char_t, digit, digits[0]) + case 2: + if (8 * sizeof(dbr_char_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 2 * PyLong_SHIFT) { + return (dbr_char_t) (((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(dbr_char_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 3 * PyLong_SHIFT) { + return (dbr_char_t) (((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(dbr_char_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 4 * PyLong_SHIFT) { + return (dbr_char_t) (((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (dbr_char_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(dbr_char_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_char_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(dbr_char_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(dbr_char_t, digit, +digits[0]) + case -2: + if (8 * sizeof(dbr_char_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(dbr_char_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_char_t) ((((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(dbr_char_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_char_t) ((((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(dbr_char_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_char_t) ((((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(dbr_char_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + dbr_char_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (dbr_char_t) -1; + } + } else { + dbr_char_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (dbr_char_t) -1; + val = __Pyx_PyInt_As_dbr_char_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to dbr_char_t"); + return (dbr_char_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to dbr_char_t"); + return (dbr_char_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG) ((PY_LONG_LONG) 0 - (PY_LONG_LONG) 1), const_zero = (PY_LONG_LONG) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(PY_LONG_LONG) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (PY_LONG_LONG) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (PY_LONG_LONG) 0; + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0]) + case 2: + if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (PY_LONG_LONG) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (PY_LONG_LONG) 0; + case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, +digits[0]) + case -2: + if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + } +#endif + if (sizeof(PY_LONG_LONG) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + PY_LONG_LONG val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (PY_LONG_LONG) -1; + } + } else { + PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (PY_LONG_LONG) -1; + val = __Pyx_PyInt_As_PY_LONG_LONG(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { + const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned char) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) { + return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) { + return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT) { + return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned char) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { + return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned char) -1; + } + } else { + unsigned char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned char) -1; + val = __Pyx_PyInt_As_unsigned_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned char"); + return (unsigned char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned char"); + return (unsigned char) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]) + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]) + case -2: + if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (char) -1; + } + } else { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; +} + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t < '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number; + int ndim = ctx->head->field->type->ndim; +; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if (ctx->enc_type == *ts && got_Z == ctx->is_complex && + ctx->enc_packmode == ctx->new_packmode) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* TypeInfoCompare */ + static int +__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) +{ + int i; + if (!a || !b) + return 0; + if (a == b) + return 1; + if (a->size != b->size || a->typegroup != b->typegroup || + a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { + if (a->typegroup == 'H' || b->typegroup == 'H') { + return a->size == b->size; + } else { + return 0; + } + } + if (a->ndim) { + for (i = 0; i < a->ndim; i++) + if (a->arraysize[i] != b->arraysize[i]) + return 0; + } + if (a->typegroup == 'S') { + if (a->flags != b->flags) + return 0; + if (a->fields || b->fields) { + if (!(a->fields && b->fields)) + return 0; + for (i = 0; a->fields[i].type && b->fields[i].type; i++) { + __Pyx_StructField *field_a = a->fields + i; + __Pyx_StructField *field_b = b->fields + i; + if (field_a->offset != field_b->offset || + !__pyx_typeinfo_cmp(field_a->type, field_b->type)) + return 0; + } + return !a->fields[i].type && !b->fields[i].type; + } + } + return 1; +} + +/* MemviewSliceValidateAndInit */ + static int +__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) +{ + if (buf->shape[dim] <= 1) + return 1; + if (buf->strides) { + if (spec & __Pyx_MEMVIEW_CONTIG) { + if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { + if (buf->strides[dim] != sizeof(void *)) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly contiguous " + "in dimension %d.", dim); + goto fail; + } + } else if (buf->strides[dim] != buf->itemsize) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_FOLLOW) { + Py_ssize_t stride = buf->strides[dim]; + if (stride < 0) + stride = -stride; + if (stride < buf->itemsize) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + } else { + if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not contiguous in " + "dimension %d", dim); + goto fail; + } else if (spec & (__Pyx_MEMVIEW_PTR)) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not indirect in " + "dimension %d", dim); + goto fail; + } else if (buf->suboffsets) { + PyErr_SetString(PyExc_ValueError, + "Buffer exposes suboffsets but no strides"); + goto fail; + } + } + return 1; +fail: + return 0; +} +static int +__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) +{ + if (spec & __Pyx_MEMVIEW_DIRECT) { + if (buf->suboffsets && buf->suboffsets[dim] >= 0) { + PyErr_Format(PyExc_ValueError, + "Buffer not compatible with direct access " + "in dimension %d.", dim); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_PTR) { + if (!buf->suboffsets || (buf->suboffsets && buf->suboffsets[dim] < 0)) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly accessible " + "in dimension %d.", dim); + goto fail; + } + } + return 1; +fail: + return 0; +} +static int +__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) +{ + int i; + if (c_or_f_flag & __Pyx_IS_F_CONTIG) { + Py_ssize_t stride = 1; + for (i = 0; i < ndim; i++) { + if (stride * buf->itemsize != buf->strides[i] && + buf->shape[i] > 1) + { + PyErr_SetString(PyExc_ValueError, + "Buffer not fortran contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { + Py_ssize_t stride = 1; + for (i = ndim - 1; i >- 1; i--) { + if (stride * buf->itemsize != buf->strides[i] && + buf->shape[i] > 1) { + PyErr_SetString(PyExc_ValueError, + "Buffer not C contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } + return 1; +fail: + return 0; +} +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj) +{ + struct __pyx_memoryview_obj *memview, *new_memview; + __Pyx_RefNannyDeclarations + Py_buffer *buf; + int i, spec = 0, retval = -1; + __Pyx_BufFmt_Context ctx; + int from_memoryview = __pyx_memoryview_check(original_obj); + __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); + if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) + original_obj)->typeinfo)) { + memview = (struct __pyx_memoryview_obj *) original_obj; + new_memview = NULL; + } else { + memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + original_obj, buf_flags, 0, dtype); + new_memview = memview; + if (unlikely(!memview)) + goto fail; + } + buf = &memview->view; + if (buf->ndim != ndim) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + ndim, buf->ndim); + goto fail; + } + if (new_memview) { + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if ((unsigned) buf->itemsize != dtype->size) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " + "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", + buf->itemsize, + (buf->itemsize > 1) ? "s" : "", + dtype->name, + dtype->size, + (dtype->size > 1) ? "s" : ""); + goto fail; + } + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (!__pyx_check_strides(buf, i, ndim, spec)) + goto fail; + if (!__pyx_check_suboffsets(buf, i, ndim, spec)) + goto fail; + } + if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, + new_memview != NULL) == -1)) { + goto fail; + } + retval = 0; + goto no_fail; +fail: + Py_XDECREF(new_memview); + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_int, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_float, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_double, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* CheckBinaryVersion */ + static int __Pyx_check_binary_version(void) { + char ctversion[4], rtversion[4]; + PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); + PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); + if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compiletime version %s of module '%.100s' " + "does not match runtime version %s", + ctversion, __Pyx_MODULE_NAME, rtversion); + return PyErr_WarnEx(NULL, message, 1); + } + return 0; +} + +/* InitStrings */ + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/python-3.7/PyCafe.cpython-37m-x86_64-linux-gnu.so b/python-3.7/PyCafe.cpython-37m-x86_64-linux-gnu.so new file mode 100755 index 0000000..ca10492 Binary files /dev/null and b/python-3.7/PyCafe.cpython-37m-x86_64-linux-gnu.so differ diff --git a/python-3.7/PyCafe.h b/python-3.7/PyCafe.h new file mode 100644 index 0000000..8bbf0bc --- /dev/null +++ b/python-3.7/PyCafe.h @@ -0,0 +1,45 @@ +/* Generated by Cython 0.29.2 */ + +#ifndef __PYX_HAVE__PyCafe +#define __PYX_HAVE__PyCafe + + +#ifndef __PYX_HAVE_API__PyCafe + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#ifndef DL_IMPORT + #define DL_IMPORT(_T) _T +#endif + +__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder); +__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder); +__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string); +__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int); +__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string); +__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string); +__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int); +__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long); +__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int); +__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int); +__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int); +__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int); + +#endif /* !__PYX_HAVE_API__PyCafe */ + +/* WARNING: the interface of the module init function changed in CPython 3.5. */ +/* It now returns a PyModuleDef instance instead of a PyModule instance. */ + +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initPyCafe(void); +#else +PyMODINIT_FUNC PyInit_PyCafe(void); +#endif + +#endif /* !__PYX_HAVE__PyCafe */ diff --git a/python-3.7/PyCafe.pxd b/python-3.7/PyCafe.pxd new file mode 120000 index 0000000..9c5f8ad --- /dev/null +++ b/python-3.7/PyCafe.pxd @@ -0,0 +1 @@ +../PyCafe.pxd \ No newline at end of file diff --git a/python-3.7/PyCafe.pyx b/python-3.7/PyCafe.pyx new file mode 120000 index 0000000..416c394 --- /dev/null +++ b/python-3.7/PyCafe.pyx @@ -0,0 +1 @@ +../PyCafe.pyx \ No newline at end of file diff --git a/python-3.7/PyCafeDefs.pxi b/python-3.7/PyCafeDefs.pxi new file mode 120000 index 0000000..ce7529d --- /dev/null +++ b/python-3.7/PyCafeDefs.pxi @@ -0,0 +1 @@ +../PyCafeDefs.pxi \ No newline at end of file diff --git a/python-3.7/PyCafeDefs_api.pxi b/python-3.7/PyCafeDefs_api.pxi new file mode 120000 index 0000000..0b66cd4 --- /dev/null +++ b/python-3.7/PyCafeDefs_api.pxi @@ -0,0 +1 @@ +../PyCafeDefs_api.pxi \ No newline at end of file diff --git a/python-3.7/PyCafeDefs_pub.pxi b/python-3.7/PyCafeDefs_pub.pxi new file mode 120000 index 0000000..15a7df8 --- /dev/null +++ b/python-3.7/PyCafeDefs_pub.pxi @@ -0,0 +1 @@ +../PyCafeDefs_pub.pxi \ No newline at end of file diff --git a/python-3.7/README_Py3_release b/python-3.7/README_Py3_release new file mode 100644 index 0000000..299056d --- /dev/null +++ b/python-3.7/README_Py3_release @@ -0,0 +1,4 @@ +source /opt/gfa/python 3.7 +python setup3.7_release.py build_ext -i +export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib +export LD_LIBRARY_PATH=./ diff --git a/python-3.7/README_Py3_release~ b/python-3.7/README_Py3_release~ new file mode 100644 index 0000000..5ac2338 --- /dev/null +++ b/python-3.7/README_Py3_release~ @@ -0,0 +1,4 @@ +source /opt/gfa/python 3.5 +python setup3.5_release.py build_ext -i +export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib +export LD_LIBRARY_PATH=./ diff --git a/python-3.7/cNodes.xml b/python-3.7/cNodes.xml new file mode 120000 index 0000000..1cf6978 --- /dev/null +++ b/python-3.7/cNodes.xml @@ -0,0 +1 @@ +../sf_ar_cNodes.xml \ No newline at end of file diff --git a/python-3.7/examples.py b/python-3.7/examples.py new file mode 120000 index 0000000..7f4266d --- /dev/null +++ b/python-3.7/examples.py @@ -0,0 +1 @@ +../examples.py \ No newline at end of file diff --git a/python-3.7/examples.sh b/python-3.7/examples.sh new file mode 100755 index 0000000..4efab8a --- /dev/null +++ b/python-3.7/examples.sh @@ -0,0 +1,7 @@ +source /opt/gfa/python 3.5 +export SFEL_OMC_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/PythonModule +export SFEL_LAYOUT_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/scripts/VA +export PYTHONPATH=.:$SFEL_LAYOUT_PYTHONPATH:$SFEL_OMC_PYTHONPATH:/opt/gfa/cafe/python/python-3.5/latest/lib +export LD_LIBRARY_PATH=/opt/gfa/cafe/python/python-3.5/latest/lib +python examples.py + diff --git a/python-3.7/gDBPM.xml b/python-3.7/gDBPM.xml new file mode 120000 index 0000000..d32d8ae --- /dev/null +++ b/python-3.7/gDBPM.xml @@ -0,0 +1 @@ +../gDBPM.xml \ No newline at end of file diff --git a/python-3.7/makefile b/python-3.7/makefile new file mode 100644 index 0000000..7cac8b6 --- /dev/null +++ b/python-3.7/makefile @@ -0,0 +1,36 @@ +# +# Jan Chrin +# July 2015 +# + +##### CHANGE AS APPROPRIATE ################# +#Cython Version to install +CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0 + +#CAFE project base +#CAFE_BASE=${EPICS_EXTENSIONS}/CAFE +CAFE_BASE=/opt/gfa/cafe/python/python-3.5 + +CAFE_CYCAFE_BASE=${CAFE_BASE}/${CYCAFE_VERSION} + +INSTALL_PATH_AFS=/afs/psi.ch/intranet/Controls/cafe/CAFE/cycafe/$(CYCAFE_VERSION)/lib/${EPICS_HOST_ARCH} + +INSTALL_PATH= $(CAFE_CYCAFE_BASE)/lib +EXAMPLES_INSTALL_PATH= $(CAFE_CYCAFE_BASE)/examples +############################################# + + +install_local: PyCafe.cpython-35m-x86_64-linux-gnu.so + mkdir -p ${EPICS_HOST_ARCH} + cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${EPICS_HOST_ARCH} + mkdir -p ${INSTALL_PATH_AFS} + cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${INSTALL_PATH_AFS} + + +install_rel: PyCafe.cpython-35m-x86_64-linux-gnu.so + mkdir -p $(INSTALL_PATH) + cp PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH) + mkdir -p $(EXAMPLES_INSTALL_PATH) + cp examples.py $(EXAMPLES_INSTALL_PATH) + cp examples.sh $(EXAMPLES_INSTALL_PATH) + diff --git a/python-3.7/python35_header.pxi b/python-3.7/python35_header.pxi new file mode 120000 index 0000000..ca42de7 --- /dev/null +++ b/python-3.7/python35_header.pxi @@ -0,0 +1 @@ +../python35_header.pxi \ No newline at end of file diff --git a/python-3.7/setup3.5_release.py b/python-3.7/setup3.5_release.py new file mode 100644 index 0000000..02ba7f2 --- /dev/null +++ b/python-3.7/setup3.5_release.py @@ -0,0 +1,47 @@ +import sys +from distutils.core import setup +from distutils.extension import Extension +from Cython.Build import cythonize +from numpy import get_include + +#runtime_library_dirs do not override LD_LIBRARY_PATH! + +setup( + ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'], + language="c++", + include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m', + '/usr/local/epics/base/include', + '/usr/local/epics/base/include/os/Linux', + '/opt/gfa/cafe/boost/boost_1_61_0/include', + '/opt/gfa/cafe/boost/boost_1_61_0/include/boost', + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include', + '/opt/gfa/zmq/curl-7.54.1/include', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include', + '.', get_include()], + library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.5/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.5/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + libraries=['ca','Com','dl','cafe']) + ], annotate=False, + compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str', + 'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False, + 'remove_unreachable': False}, + compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True} + ) +) diff --git a/python-3.7/setup3.7_release.py b/python-3.7/setup3.7_release.py new file mode 100644 index 0000000..ec34668 --- /dev/null +++ b/python-3.7/setup3.7_release.py @@ -0,0 +1,47 @@ +import sys +from distutils.core import setup +from distutils.extension import Extension +from Cython.Build import cythonize +from numpy import get_include + +#runtime_library_dirs do not override LD_LIBRARY_PATH! + +setup( + ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'], + language="c++", + include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m', + '/usr/local/epics/base/include', + '/usr/local/epics/base/include/os/Linux', + '/opt/gfa/cafe/boost/boost_1_61_0/include', + '/opt/gfa/cafe/boost/boost_1_61_0/include/boost', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include', + '/opt/gfa/zmq/curl-7.54.1/include', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include', + '.', get_include()], + library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.7/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.7/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + libraries=['ca','Com','dl','cafe']) + ], annotate=False, + compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str', + 'c_string_encoding' : 'ascii', 'py2_import': False, 'warn.unreachable': False, + 'remove_unreachable': False}, + compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True} + ) +) diff --git a/python-3.7/setup3.7_release.py~ b/python-3.7/setup3.7_release.py~ new file mode 100644 index 0000000..1e2b92e --- /dev/null +++ b/python-3.7/setup3.7_release.py~ @@ -0,0 +1,47 @@ +import sys +from distutils.core import setup +from distutils.extension import Extension +from Cython.Build import cythonize +from numpy import get_include + +#runtime_library_dirs do not override LD_LIBRARY_PATH! + +setup( + ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'], + language="c++", + include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m', + '/usr/local/epics/base/include', + '/usr/local/epics/base/include/os/Linux', + '/opt/gfa/cafe/boost/boost_1_61_0/include', + '/opt/gfa/cafe/boost/boost_1_61_0/include/boost', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include', + '/opt/gfa/zmq/curl-7.54.1/include', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include', + '.', get_include()], + library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.7/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64', + '/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib', + '/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib', + '/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0', + '/opt/gfa/zmq/curl-7.54.1/lib', + '/opt/gfa/python-3.7/latest/lib', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64', + '/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib' + ], + libraries=['ca','Com','dl','cafe']) + ], annotate=False, + compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str', + 'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False, + 'remove_unreachable': False}, + compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True} + ) +) diff --git a/python35_header.pxi b/python35_header.pxi new file mode 100644 index 0000000..01bacd3 --- /dev/null +++ b/python35_header.pxi @@ -0,0 +1,3 @@ +cdef extern from "Python.h": + ctypedef extern class builtins.Exception[object PyBaseExceptionObject]: + pass diff --git a/python3z_header.pxi b/python3z_header.pxi new file mode 100644 index 0000000..2eddc43 --- /dev/null +++ b/python3z_header.pxi @@ -0,0 +1,13 @@ +cdef extern from "Python.h": + ctypedef enum PyGILState_STATE: + PyGILState_LOCKED = 0 + PyGILState_UNLOCKED = 1 + + void PyEval_InitThreads() + void Py_Initialize() + PyGILState_STATE PyGILState_Ensure() + void PyGILState_Release(PyGILState_STATE) + char* __FILE__ + int __LINE__ + +